* [PATCH] mac80211: don't apply HT overrides to TDLS peers
@ 2013-03-01 10:44 Johannes Berg
2013-03-04 15:35 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2013-03-01 10:44 UTC (permalink / raw)
To: linux-wireless; +Cc: greearb, Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
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>
---
net/mac80211/ht.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 0db25d4..4515fc3 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -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
@@ -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));
--
1.8.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mac80211: don't apply HT overrides to TDLS peers
2013-03-01 10:44 [PATCH] mac80211: don't apply HT overrides to TDLS peers Johannes Berg
@ 2013-03-04 15:35 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2013-03-04 15:35 UTC (permalink / raw)
To: linux-wireless; +Cc: greearb
On Fri, 2013-03-01 at 11:44 +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> 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.
Applied.
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-04 15:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-01 10:44 [PATCH] mac80211: don't apply HT overrides to TDLS peers Johannes Berg
2013-03-04 15:35 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).