summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath5k/pcu.c
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2008-11-27 00:17:25 +0300
committerJohn W. Linville <linville@tuxdriver.com>2008-12-05 17:32:13 +0300
commitf650470a8f506bc33a15778432ebb8cdcf89175b (patch)
tree91d563ae28beaa01d229682ca7a299d70f047f74 /drivers/net/wireless/ath5k/pcu.c
parent671434904633876f89be70af415c35c89fb90115 (diff)
downloadlinux-f650470a8f506bc33a15778432ebb8cdcf89175b.tar.xz
ath5k: enable combined michael mic in key cache
For mac revisions >= "Griffin," the hardware allows the mic tx and rx authenticator keys to share the same cache line, whereas earlier hardware can only store the rx. Enable the combined mic on hardware that supports it. Changes to ath5k.h Changes-licensed-under: 3-Clause-BSD Changes to attach.c, pcu.c, reg.h Changes-licensed-under: ISC Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/pcu.c')
-rw-r--r--drivers/net/wireless/ath5k/pcu.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath5k/pcu.c b/drivers/net/wireless/ath5k/pcu.c
index ad7ea36502bd..dabe42219e2a 100644
--- a/drivers/net/wireless/ath5k/pcu.c
+++ b/drivers/net/wireless/ath5k/pcu.c
@@ -1096,20 +1096,20 @@ int ath5k_hw_set_key(struct ath5k_hw *ah, u16 entry,
/* Install rx/tx MIC */
rxmic = (__le32 *) &key->key[16];
txmic = (__le32 *) &key->key[24];
-#if 0
- /* MISC_MODE register & 0x04 - for mac srev >= griffin */
- key_v[0] = rxmic[0];
- key_v[1] = (txmic[0] >> 16) & 0xffff;
- key_v[2] = rxmic[1];
- key_v[3] = txmic[0] & 0xffff;
- key_v[4] = txmic[1];
-#else
- key_v[0] = rxmic[0];
- key_v[1] = 0;
- key_v[2] = rxmic[1];
- key_v[3] = 0;
- key_v[4] = 0;
-#endif
+
+ if (ah->ah_combined_mic) {
+ key_v[0] = rxmic[0];
+ key_v[1] = (txmic[0] >> 16) & 0xffff;
+ key_v[2] = rxmic[1];
+ key_v[3] = txmic[0] & 0xffff;
+ key_v[4] = txmic[1];
+ } else {
+ key_v[0] = rxmic[0];
+ key_v[1] = 0;
+ key_v[2] = rxmic[1];
+ key_v[3] = 0;
+ key_v[4] = 0;
+ }
for (i = 0; i < ARRAY_SIZE(key_v); i++)
ath5k_hw_reg_write(ah, le32_to_cpu(key_v[i]),
AR5K_KEYTABLE_OFF(micentry, i));