aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-08-04 08:33:42 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-09-03 15:49:11 -0400
commit9e848010bfa1c0da21292afb7a98957b5c35622d (patch)
treeb692cdc3d940923b8cffb03275aa65cf8ac5a830
parentdf197c00bf1dbdee888aa886e5e93b49b42a268b (diff)
iwlwifi: mvm: use tdls indication from mac80211
Instead of checking whether a given station is the first to be added on a client interface check for the new TDLS flag and warn in the unexpected cases. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-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