Skip to content

Commit

Permalink
ath9k: Fix key cache slot selection for splitmic
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Jouni Malinen authored and John W. Linville committed Dec 19, 2008
1 parent aa33de0 commit ea61213
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,12 +756,12 @@ static int ath_reserve_key_cache_slot(struct ath_softc *sc)
(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++) {
Expand Down

0 comments on commit ea61213

Please sign in to comment.