Commit d0be7cc7 authored by Senthil Balasubramanian's avatar Senthil Balasubramanian Committed by John W. Linville

ath9k: connectivity is lost after Group rekeying is done

Connectivtiy is lost after Group rekeying is done. The keytype
maintained by ath9k is reset when group key is updated. Though
sc_keytype can be reset only for broadcast key the proper fix
would be to use mac80211 provided key type from txinfo during
xmit and get rid of sc_keytype from ath9k ath_softc.
Signed-off-by: default avatarVasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: default avatarSenthil Balasubramanian <senthilkumar@atheros.com>
Tested-by: default avatarSteven Noonan <steven@uplinklabs.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ad55dcaf
...@@ -974,7 +974,6 @@ struct ath_softc { ...@@ -974,7 +974,6 @@ struct ath_softc {
u32 sc_keymax; /* size of key cache */ u32 sc_keymax; /* size of key cache */
DECLARE_BITMAP(sc_keymap, ATH_KEYMAX); /* key use bit map */ DECLARE_BITMAP(sc_keymap, ATH_KEYMAX); /* key use bit map */
u8 sc_splitmic; /* split TKIP MIC keys */ u8 sc_splitmic; /* split TKIP MIC keys */
int sc_keytype;
/* RX */ /* RX */
struct list_head sc_rxbuf; struct list_head sc_rxbuf;
......
...@@ -206,8 +206,6 @@ static int ath_key_config(struct ath_softc *sc, ...@@ -206,8 +206,6 @@ static int ath_key_config(struct ath_softc *sc,
if (!ret) if (!ret)
return -EIO; return -EIO;
if (mac)
sc->sc_keytype = hk.kv_type;
return 0; return 0;
} }
...@@ -778,7 +776,6 @@ static int ath9k_set_key(struct ieee80211_hw *hw, ...@@ -778,7 +776,6 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
case DISABLE_KEY: case DISABLE_KEY:
ath_key_delete(sc, key); ath_key_delete(sc, key);
clear_bit(key->keyidx, sc->sc_keymap); clear_bit(key->keyidx, sc->sc_keymap);
sc->sc_keytype = ATH9K_CIPHER_CLR;
break; break;
default: default:
ret = -EINVAL; ret = -EINVAL;
......
...@@ -315,11 +315,11 @@ static int ath_tx_prepare(struct ath_softc *sc, ...@@ -315,11 +315,11 @@ static int ath_tx_prepare(struct ath_softc *sc,
txctl->keyix = tx_info->control.hw_key->hw_key_idx; txctl->keyix = tx_info->control.hw_key->hw_key_idx;
txctl->frmlen += tx_info->control.icv_len; txctl->frmlen += tx_info->control.icv_len;
if (sc->sc_keytype == ATH9K_CIPHER_WEP) if (tx_info->control.hw_key->alg == ALG_WEP)
txctl->keytype = ATH9K_KEY_TYPE_WEP; txctl->keytype = ATH9K_KEY_TYPE_WEP;
else if (sc->sc_keytype == ATH9K_CIPHER_TKIP) else if (tx_info->control.hw_key->alg == ALG_TKIP)
txctl->keytype = ATH9K_KEY_TYPE_TKIP; txctl->keytype = ATH9K_KEY_TYPE_TKIP;
else if (sc->sc_keytype == ATH9K_CIPHER_AES_CCM) else if (tx_info->control.hw_key->alg == ALG_CCMP)
txctl->keytype = ATH9K_KEY_TYPE_AES; txctl->keytype = ATH9K_KEY_TYPE_AES;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment