Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Jouni Malinen and committed by
John W. Linville
8e546104 8c99f691

+4 -1
+4 -1
drivers/net/wireless/ath/key.c
··· 58 58 REG_WRITE(ah, AR_KEYTABLE_KEY1(micentry), 0); 59 59 REG_WRITE(ah, AR_KEYTABLE_KEY2(micentry), 0); 60 60 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) { 62 62 REG_WRITE(ah, AR_KEYTABLE_KEY4(micentry), 0); 63 + REG_WRITE(ah, AR_KEYTABLE_TYPE(micentry), 64 + AR_KEYTABLE_TYPE_CLR); 65 + } 63 66 64 67 } 65 68