From: Jouni Malinen Date: Thu, 18 Dec 2008 12:31:10 +0000 (+0200) Subject: ath9k: Fix key cache slot selection for splitmic X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ea6121328885640c137b0a8830f67ca6c386a24a;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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. Signed-off-by: Jouni Malinen Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 94c526669a4d..b44736782abd 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c @@ -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++) {