From 104182d3af551081a9402d1134f50c7826ebb8b3 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 28 Dec 2012 15:01:57 +0100 Subject: [PATCH] --- yaml --- r: 351771 b: refs/heads/master c: 21add825f90a50407e0121833c8b7cd2c071c478 h: refs/heads/master i: 351769: eae40b1da859c7e42e7893258a5058339054d7e0 351767: 77184746690c58e5f5f4486b6ca2ae379aba685b v: v3 --- [refs] | 2 +- trunk/net/mac80211/ht.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 6b7962ffea0c..83e23824a9d2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1c06ef9831c78648f719a174e4598ae2600b0cf7 +refs/heads/master: 21add825f90a50407e0121833c8b7cd2c071c478 diff --git a/trunk/net/mac80211/ht.c b/trunk/net/mac80211/ht.c index df46cd8e55f5..61ac7c48ac0c 100644 --- a/trunk/net/mac80211/ht.c +++ b/trunk/net/mac80211/ht.c @@ -120,6 +120,21 @@ void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata, IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_DSSSCCK40)); + + /* Unset 40 MHz if we're not using a 40 MHz channel */ + switch (sdata->vif.bss_conf.chandef.width) { + case NL80211_CHAN_WIDTH_20_NOHT: + case NL80211_CHAN_WIDTH_20: + ht_cap->cap &= ~IEEE80211_HT_CAP_SGI_40; + ht_cap->cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; + break; + case NL80211_CHAN_WIDTH_40: + case NL80211_CHAN_WIDTH_80: + case NL80211_CHAN_WIDTH_80P80: + case NL80211_CHAN_WIDTH_160: + break; + } + /* * The STBC bits are asymmetric -- if we don't have * TX then mask out the peer's RX and vice versa.