Don't allocate or program a key for the AR5210.

The AR5210 doesn't support HAL_CIPHER_CLR ('clear encryption' keycache
slots), so don't bother - just map them to slot 0 and never program them.
This commit is contained in:
Adrian Chadd 2012-11-19 23:54:05 +00:00
parent 143cfad710
commit cc637103f6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243318

View File

@ -213,6 +213,15 @@ ath_keyset(struct ath_softc *sc, struct ieee80211vap *vap,
} else
hk.kv_type = HAL_CIPHER_CLR;
/*
* If we're installing a clear cipher key and
* the hardware doesn't support that, just succeed.
* Leave it up to the net80211 layer to figure it out.
*/
if (hk.kv_type == HAL_CIPHER_CLR && sc->sc_hasclrkey == 0) {
return (1);
}
/*
* XXX TODO: check this:
*
@ -364,6 +373,14 @@ key_alloc_single(struct ath_softc *sc,
#define N(a) (sizeof(a)/sizeof(a[0]))
u_int i, keyix;
if (sc->sc_hasclrkey == 0) {
/*
* Map to slot 0 for the AR5210.
*/
*txkeyix = *rxkeyix = 0;
return (1);
}
/* XXX try i,i+32,i+64,i+32+64 to minimize key pair conflicts */
for (i = 0; i < N(sc->sc_keymap); i++) {
u_int8_t b = sc->sc_keymap[i];