Skip to content

Commit

Permalink
mac80211: don't apply HT overrides to TDLS peers
Browse files Browse the repository at this point in the history
The HT overrides are intended only for the connection
to the AP, not for any other purpose. Therefore, don't
apply them to TDLS peers that are also stations added
to a managed station interface.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Mar 6, 2013
1 parent 1861b84 commit 4f4b935
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions net/mac80211/ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
if (!ht_cap->ht_supported)
return;

if (sdata->vif.type != NL80211_IFTYPE_STATION) {
/* AP interfaces call this code when adding new stations,
* so just silently ignore non station interfaces.
*/
return;
}

/* NOTE: If you add more over-rides here, update register_hw
* ht_capa_mod_msk logic in main.c as well.
* And, if this method can ever change ht_cap.ht_supported, fix
Expand Down Expand Up @@ -184,9 +177,12 @@ bool ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata,
apply:
/*
* If user has specified capability over-rides, take care
* of that here.
* of that if the station we're setting up is the AP that
* we advertised a restricted capability set to.
*/
ieee80211_apply_htcap_overrides(sdata, &ht_cap);
if (sdata->vif.type == NL80211_IFTYPE_STATION &&
!test_sta_flag(sta, WLAN_STA_TDLS_PEER))
ieee80211_apply_htcap_overrides(sdata, &ht_cap);

changed = memcmp(&sta->sta.ht_cap, &ht_cap, sizeof(ht_cap));

Expand Down

0 comments on commit 4f4b935

Please sign in to comment.