Skip to content

Commit

Permalink
iwlwifi: mvm: use tdls indication from mac80211
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg authored and Emmanuel Grumbach committed Sep 3, 2014
1 parent df197c0 commit 9e84801
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions drivers/net/wireless/iwlwifi/mvm/sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,14 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm,
if (ret)
return ret;

/* The first station added is the AP, the others are TDLS STAs */
if (vif->type == NL80211_IFTYPE_STATION &&
mvmvif->ap_sta_id == IWL_MVM_STATION_COUNT)
mvmvif->ap_sta_id = sta_id;
if (vif->type == NL80211_IFTYPE_STATION) {
if (!sta->tdls) {
WARN_ON(mvmvif->ap_sta_id != IWL_MVM_STATION_COUNT);
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);

Expand Down

0 comments on commit 9e84801

Please sign in to comment.