aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/sta.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/sta.c b/drivers/net/wireless/iwlwifi/mvm/sta.c
index 960687bf92f9..ccfc256b710a 100644
--- a/drivers/net/wireless/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/iwlwifi/mvm/sta.c
@@ -252,10 +252,14 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm,
252 if (ret) 252 if (ret)
253 return ret; 253 return ret;
254 254
255 /* The first station added is the AP, the others are TDLS STAs */ 255 if (vif->type == NL80211_IFTYPE_STATION) {
256 if (vif->type == NL80211_IFTYPE_STATION && 256 if (!sta->tdls) {
257 mvmvif->ap_sta_id == IWL_MVM_STATION_COUNT) 257 WARN_ON(mvmvif->ap_sta_id != IWL_MVM_STATION_COUNT);
258 mvmvif->ap_sta_id = sta_id; 258 mvmvif->ap_sta_id = sta_id;
259 } else {
260 WARN_ON(mvmvif->ap_sta_id == IWL_MVM_STATION_COUNT);
261 }
262 }
259 263
260 rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta); 264 rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta);
261 265