Skip to content

Commit

Permalink
rtw88: fill zeros to words 0x06 and 0x07 of security cam entry
Browse files Browse the repository at this point in the history
8723D adds some experimental features to word 0x06 of cam entry, so fill
zeros to initialize them to off state. For existing chips, these two words
are reserved and always zeros, so this change is harmless for them.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200512102621.5148-9-yhchuang@realtek.com
  • Loading branch information
Ping-Ke Shih authored and Kalle Valo committed May 13, 2020
1 parent d1391c4 commit 504e2b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/wireless/realtek/rtw88/sec.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void rtw_sec_write_cam(struct rtw_dev *rtwdev,

write_cmd = RTW_SEC_CMD_WRITE_ENABLE | RTW_SEC_CMD_POLLING;
addr = hw_key_idx << RTW_SEC_CAM_ENTRY_SHIFT;
for (i = 5; i >= 0; i--) {
for (i = 7; i >= 0; i--) {
switch (i) {
case 0:
content = ((key->keyidx & 0x3)) |
Expand All @@ -60,6 +60,10 @@ void rtw_sec_write_cam(struct rtw_dev *rtwdev,
(cam->addr[4] << 16) |
(cam->addr[5] << 24);
break;
case 6:
case 7:
content = 0;
break;
default:
j = (i - 2) << 2;
content = (key->key[j]) |
Expand Down

0 comments on commit 504e2b2

Please sign in to comment.