aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ht.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-12-28 09:01:57 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 07:01:45 -0500
commit21add825f90a50407e0121833c8b7cd2c071c478 (patch)
tree63fc940e421d5585fc9f63c89ccdb9c4a0878d29 /net/mac80211/ht.c
parent1c06ef9831c78648f719a174e4598ae2600b0cf7 (diff)
mac80211: unset peer's HT 40 MHz support if not usable
When an interface is configured to a 20 MHz channel and the device as well as the peer are 40 MHz capable the HT capabilities of the peer are not restricted to 20 MHz, even though they're supposed to be restricted to the currently possible capabilities. Unset the 40 MHz HT capability bits in this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ht.c')
-rw-r--r--net/mac80211/ht.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index df46cd8e55f5..61ac7c48ac0c 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -120,6 +120,21 @@ void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata,
120 IEEE80211_HT_CAP_SGI_20 | 120 IEEE80211_HT_CAP_SGI_20 |
121 IEEE80211_HT_CAP_SGI_40 | 121 IEEE80211_HT_CAP_SGI_40 |
122 IEEE80211_HT_CAP_DSSSCCK40)); 122 IEEE80211_HT_CAP_DSSSCCK40));
123
124 /* Unset 40 MHz if we're not using a 40 MHz channel */
125 switch (sdata->vif.bss_conf.chandef.width) {
126 case NL80211_CHAN_WIDTH_20_NOHT:
127 case NL80211_CHAN_WIDTH_20:
128 ht_cap->cap &= ~IEEE80211_HT_CAP_SGI_40;
129 ht_cap->cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
130 break;
131 case NL80211_CHAN_WIDTH_40:
132 case NL80211_CHAN_WIDTH_80:
133 case NL80211_CHAN_WIDTH_80P80:
134 case NL80211_CHAN_WIDTH_160:
135 break;
136 }
137
123 /* 138 /*
124 * The STBC bits are asymmetric -- if we don't have 139 * The STBC bits are asymmetric -- if we don't have
125 * TX then mask out the peer's RX and vice versa. 140 * TX then mask out the peer's RX and vice versa.