aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ht.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-03-01 05:43:30 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-03-06 10:36:02 -0500
commit4f4b9357e45c121e3b350b938adc33781d6834fd (patch)
tree167f1574de9b00ebb8c3df765439f310a5ac9f42 /net/mac80211/ht.c
parent1861b8455351cd426fb7dec8743ac312aafbe93d (diff)
mac80211: don't apply HT overrides to TDLS peers
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>
Diffstat (limited to 'net/mac80211/ht.c')
-rw-r--r--net/mac80211/ht.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 0db25d4bb223..4515fc33abff 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,
40 if (!ht_cap->ht_supported) 40 if (!ht_cap->ht_supported)
41 return; 41 return;
42 42
43 if (sdata->vif.type != NL80211_IFTYPE_STATION) {
44 /* AP interfaces call this code when adding new stations,
45 * so just silently ignore non station interfaces.
46 */
47 return;
48 }
49
50 /* NOTE: If you add more over-rides here, update register_hw 43 /* NOTE: If you add more over-rides here, update register_hw
51 * ht_capa_mod_msk logic in main.c as well. 44 * ht_capa_mod_msk logic in main.c as well.
52 * And, if this method can ever change ht_cap.ht_supported, fix 45 * 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,
184 apply: 177 apply:
185 /* 178 /*
186 * If user has specified capability over-rides, take care 179 * If user has specified capability over-rides, take care
187 * of that here. 180 * of that if the station we're setting up is the AP that
181 * we advertised a restricted capability set to.
188 */ 182 */
189 ieee80211_apply_htcap_overrides(sdata, &ht_cap); 183 if (sdata->vif.type == NL80211_IFTYPE_STATION &&
184 !test_sta_flag(sta, WLAN_STA_TDLS_PEER))
185 ieee80211_apply_htcap_overrides(sdata, &ht_cap);
190 186
191 changed = memcmp(&sta->sta.ht_cap, &ht_cap, sizeof(ht_cap)); 187 changed = memcmp(&sta->sta.ht_cap, &ht_cap, sizeof(ht_cap));
192 188