Commit 9e848010 authored by Johannes Berg's avatar Johannes Berg Committed by Emmanuel Grumbach

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: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent df197c00
...@@ -252,10 +252,14 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm, ...@@ -252,10 +252,14 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm,
if (ret) if (ret)
return ret; return ret;
/* The first station added is the AP, the others are TDLS STAs */ if (vif->type == NL80211_IFTYPE_STATION) {
if (vif->type == NL80211_IFTYPE_STATION && if (!sta->tdls) {
mvmvif->ap_sta_id == IWL_MVM_STATION_COUNT) WARN_ON(mvmvif->ap_sta_id != IWL_MVM_STATION_COUNT);
mvmvif->ap_sta_id = sta_id; mvmvif->ap_sta_id = sta_id;
} else {
WARN_ON(mvmvif->ap_sta_id == IWL_MVM_STATION_COUNT);
}
}
rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta); rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment