Skip to content

Commit 8e54610

Browse files
Jouni Malinenlinvjw
authored andcommitted
ath: Fix clearing of secondary key cache entry for TKIP
All register writes to the key cache have to be done in pairs. However, the clearing of a separate MIC entry with hardware revisions that use combined MIC key layout did not do that with one of the registers. Add the matching register write to the following register to make the KEY4 register write actually complete. This is mostly a fix for a theoretical issue since the incorrect entry that could potentially be left behind in the key cache would not match with received frames. Anyway, better make this code clean the entry correctly using paired register writes. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 8c99f69 commit 8e54610

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • drivers/net/wireless/ath

‎drivers/net/wireless/ath/key.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ bool ath_hw_keyreset(struct ath_common *common, u16 entry)
5858
REG_WRITE(ah, AR_KEYTABLE_KEY1(micentry), 0);
5959
REG_WRITE(ah, AR_KEYTABLE_KEY2(micentry), 0);
6060
REG_WRITE(ah, AR_KEYTABLE_KEY3(micentry), 0);
61-
if (common->crypt_caps & ATH_CRYPT_CAP_MIC_COMBINED)
61+
if (common->crypt_caps & ATH_CRYPT_CAP_MIC_COMBINED) {
6262
REG_WRITE(ah, AR_KEYTABLE_KEY4(micentry), 0);
63+
REG_WRITE(ah, AR_KEYTABLE_TYPE(micentry),
64+
AR_KEYTABLE_TYPE_CLR);
65+
}
6366

6467
}
6568

0 commit comments

Comments
 (0)