svn commit: r243318 - head/sys/dev/ath
Adrian Chadd
adrian at FreeBSD.org
Mon Nov 19 23:54:05 UTC 2012
Author: adrian
Date: Mon Nov 19 23:54:05 2012
New Revision: 243318
URL: http://svnweb.freebsd.org/changeset/base/243318
Log:
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.
Modified:
head/sys/dev/ath/if_ath_keycache.c
Modified: head/sys/dev/ath/if_ath_keycache.c
==============================================================================
--- head/sys/dev/ath/if_ath_keycache.c Mon Nov 19 23:42:46 2012 (r243317)
+++ head/sys/dev/ath/if_ath_keycache.c Mon Nov 19 23:54:05 2012 (r243318)
@@ -214,6 +214,15 @@ ath_keyset(struct ath_softc *sc, struct
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:
*
* Group keys on hardware that supports multicast frame
@@ -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];
More information about the svn-src-head
mailing list