summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorThomas Pedersen <thomas@cozybit.com>2012-04-18 19:24:14 -0700
committerAndy Green <andy.green@linaro.org>2012-06-22 10:14:58 +0800
commit5d25cbfdda33b1a21146d1b3f4785916993719b4 (patch)
tree42c6cfb7c682b3f50ad272bd59453216e7b7d280 /net/mac80211
parent5abeef85391d22c96d77b9e753e0b43a7bd92244 (diff)
mac80211: fix STA channel width field
According to IEEE 802.11 8.4.2.59, set the "STA channel width" bit to 0 if transmitting STA is using a 20mhz channel. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 89c1e5b9ba94..577942bfc024 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1684,7 +1684,9 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
ht_oper->ht_param = IEEE80211_HT_PARAM_CHA_SEC_NONE;
break;
}
- if (ht_cap->cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)
+ if (ht_cap->cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40 &&
+ channel_type != NL80211_CHAN_NO_HT &&
+ channel_type != NL80211_CHAN_HT20)
ht_oper->ht_param |= IEEE80211_HT_PARAM_CHAN_WIDTH_ANY;
/*