提交 ea612132 编写于 作者: J Jouni Malinen 提交者: John W. Linville

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: NJouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 aa33de09
...@@ -756,12 +756,12 @@ static int ath_reserve_key_cache_slot(struct ath_softc *sc) ...@@ -756,12 +756,12 @@ static int ath_reserve_key_cache_slot(struct ath_softc *sc)
(test_bit(i , sc->sc_keymap) || (test_bit(i , sc->sc_keymap) ||
test_bit(i + 32, sc->sc_keymap) || test_bit(i + 32, sc->sc_keymap) ||
test_bit(i + 64 + 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) && if (!test_bit(i + 64 + 32, sc->sc_keymap) &&
(test_bit(i, sc->sc_keymap) || (test_bit(i, sc->sc_keymap) ||
test_bit(i + 32, sc->sc_keymap) || test_bit(i + 32, sc->sc_keymap) ||
test_bit(i + 64, sc->sc_keymap))) test_bit(i + 64, sc->sc_keymap)))
return i; return i + 64 + 32;
} }
} else { } else {
for (i = IEEE80211_WEP_NKID; i < sc->sc_keymax / 2; i++) { for (i = IEEE80211_WEP_NKID; i < sc->sc_keymax / 2; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册