Browse Source

ath10k: avoid to set WEP key for TDLS peer

TDLS peer do not need WEP key. Setting WEP key will lead
to TDLS setup failure. Add fix to avoid setting WEP key
for TDLS peer.

Signed-off-by: Yingying Tang <yintang@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Yingying Tang 7 years ago
parent
commit
c3816c9ee1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/net/wireless/ath/ath10k/mac.c

+ 1 - 1
drivers/net/wireless/ath/ath10k/mac.c

@@ -2977,7 +2977,7 @@ static int ath10k_station_assoc(struct ath10k *ar,
 		}
 		}
 
 
 		/* Plumb cached keys only for static WEP */
 		/* Plumb cached keys only for static WEP */
-		if (arvif->def_wep_key_idx != -1) {
+		if ((arvif->def_wep_key_idx != -1) && (!sta->tdls)) {
 			ret = ath10k_install_peer_wep_keys(arvif, sta->addr);
 			ret = ath10k_install_peer_wep_keys(arvif, sta->addr);
 			if (ret) {
 			if (ret) {
 				ath10k_warn(ar, "failed to install peer wep keys for vdev %i: %d\n",
 				ath10k_warn(ar, "failed to install peer wep keys for vdev %i: %d\n",