Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7cefa44f authored by Vasanthakumar Thiagarajan's avatar Vasanthakumar Thiagarajan Committed by Kalle Valo
Browse files

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: default avatarVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent fde57764
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -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,
		   __func__, key_index, key->key_len, key_type,
		   key_usage, key->seq_len);
		   key_usage, key->seq_len);


	vif->def_txkey_index = key_index;

	if (vif->nw_type == AP_NETWORK && !pairwise &&
	if (vif->nw_type == AP_NETWORK && !pairwise &&
	    (key_type == TKIP_CRYPT || key_type == AES_CRYPT) && params) {
	    (key_type == TKIP_CRYPT || key_type == AES_CRYPT) && params) {
		ar->ap_mode_bkey.valid = true;
		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 0;
	}
	}


	return ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx,
	return ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx, key_index,
				     vif->def_txkey_index,
				     key_type, key_usage, key->key_len,
				     key_type, key_usage, key->key_len,
				     key->seq, key->seq_len, key->key,
				     key->seq, key->seq_len, key->key,
				     KEY_OP_INIT_VAL,
				     KEY_OP_INIT_VAL,