summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-05-03 21:55:02 +0000
committersam <sam@FreeBSD.org>2008-05-03 21:55:02 +0000
commit0cabcd8279358de2fe1c18b8f6403831e37f9967 (patch)
tree3ec0411a3874e2c298df0b4bd6cd29c42844a3f7 /sys/dev
parent41da951d6c93945bee7b6a5e08257ef43b6b16b2 (diff)
downloadFreeBSD-src-0cabcd8279358de2fe1c18b8f6403831e37f9967.zip
FreeBSD-src-0cabcd8279358de2fe1c18b8f6403831e37f9967.tar.gz
o unbreak handling of TKIP tx-only keys for splitmic chips
o yank compat support for hal's older than 0.9.20.3; leave a CTASSERT in place just in case
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ath/if_ath.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 80ec1ed..3f08c35 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -85,6 +85,11 @@ __FBSDID("$FreeBSD$");
#endif
/*
+ * We require a HAL w/ the changes for split tx/rx MIC.
+ */
+CTASSERT(HAL_ABI_VERSION > 0x06052200);
+
+/*
* ATH_BCBUF determines the number of vap's that can transmit
* beacons and also (currently) the number of vap's that can
* have unique mac addresses/bssid. When staggering beacons
@@ -2067,13 +2072,11 @@ ath_keyprint(struct ath_softc *sc, const char *tag, u_int ix,
printf(" %s ", sc->sc_splitmic ? "mic" : "rxmic");
for (i = 0; i < sizeof(hk->kv_mic); i++)
printf("%02x", hk->kv_mic[i]);
-#if HAL_ABI_VERSION > 0x06052200
if (!sc->sc_splitmic) {
printf(" txmic ");
for (i = 0; i < sizeof(hk->kv_txmic); i++)
printf("%02x", hk->kv_txmic[i]);
}
-#endif
}
printf("\n");
}
@@ -2116,18 +2119,19 @@ ath_keyset_tkip(struct ath_softc *sc, const struct ieee80211_key *k,
* will handle the rest.
*/
memcpy(hk->kv_mic, k->wk_rxmic, sizeof(hk->kv_mic));
-#if HAL_ABI_VERSION > 0x06052200
memcpy(hk->kv_txmic, k->wk_txmic, sizeof(hk->kv_txmic));
-#endif
KEYPRINTF(sc, k->wk_keyix, hk, mac);
return ath_hal_keyset(ah, k->wk_keyix, hk, mac);
}
} else if (k->wk_flags & IEEE80211_KEY_XMIT) {
-#if HAL_ABI_VERSION > 0x06052200
- memcpy(hk->kv_txmic, k->wk_txmic, sizeof(hk->kv_txmic));
-#else
- memcpy(hk->kv_mic, k->wk_mic, sizeof(hk->kv_mic));
-#endif
+ if (sc->sc_splitmic) {
+ /*
+ * NB: must pass MIC key in expected location when
+ * the keycache only holds one MIC key per entry.
+ */
+ memcpy(hk->kv_mic, k->wk_txmic, sizeof(hk->kv_txmic));
+ } else
+ memcpy(hk->kv_txmic, k->wk_txmic, sizeof(hk->kv_txmic));
KEYPRINTF(sc, k->wk_keyix, hk, mac);
return ath_hal_keyset(ah, k->wk_keyix, hk, mac);
} else if (k->wk_flags & IEEE80211_KEY_RECV) {
OpenPOWER on IntegriCloud