Skip to contentSkip to conversation

ath9k: Fix key cache slot selection for splitmic

PATCH New Jouni Malinen 1 participant 1 message Dec 18, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: Fix key cache slot selection for splitmic

ath_reserve_key_cache_slot() was obviously supposed to return an index to a free slot, not reserved one. This could have caused problems with hardware revisions that use splitmic.

---
 drivers/net/wireless/ath9k/main.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath9k/main.c +2 -2
@@ -756,12 +756,12 @@ static int ath_reserve_key_cache_slot(st
 			    (test_bit(i , sc->sc_keymap) ||
 			     test_bit(i + 32, sc->sc_keymap) ||
 			     test_bit(i + 64 + 32, sc->sc_keymap)))
-				return i;
+				return i + 64;
 			if (!test_bit(i + 64 + 32, sc->sc_keymap) &&
 			    (test_bit(i, sc->sc_keymap) ||
 			     test_bit(i + 32, sc->sc_keymap) ||
 			     test_bit(i + 64, sc->sc_keymap)))
-				return i;
+				return i + 64 + 32;
 		}
 	} else {
 		for (i = IEEE80211_WEP_NKID; i < sc->sc_keymax / 2; i++) {
Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA