From: Vasanthakumar Thiagarajan Date: Fri, 11 Nov 2011 15:03:00 +0000 (+0530) Subject: ath6kl: Fix bug in setting default key index for tx in AP mode X-Git-Tag: firefly_0821_release~3680^2~2381^2~57^2~287^2~219 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7cefa44f140bc88def4f68f38c76d37d5fd61630;p=firefly-linux-kernel-4.4.55.git ath6kl: Fix bug in setting default key index for tx in AP mode vif->def_txkey_index is set to key_index in ath6kl_cfg80211_add_key(). If the interface is configured with multiple static wep keys, vif->def_txkey_index would be holding the index of the last key configured, not the default tx key index. Remove this unnecessary default key index setting in ath6kl_cfg80211_add_key() to configure the right key index in WEP thereby make it work when multiple wep keys are configured. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 41260c8b8876..0ef844220278 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -997,8 +997,6 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, __func__, key_index, key->key_len, key_type, key_usage, key->seq_len); - vif->def_txkey_index = key_index; - if (vif->nw_type == AP_NETWORK && !pairwise && (key_type == TKIP_CRYPT || key_type == AES_CRYPT) && params) { ar->ap_mode_bkey.valid = true; @@ -1033,8 +1031,7 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, return 0; } - return ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx, - vif->def_txkey_index, + return ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx, key_index, key_type, key_usage, key->key_len, key->seq, key->seq_len, key->key, KEY_OP_INIT_VAL,