diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-10-13 10:28:16 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-10-13 10:28:43 +0200 |
commit | 985f2c87a7109a42cac93f56ea595353d53a1746 (patch) | |
tree | 69fe0acbbfeb6a348d6f4c64750d278e56b935b3 /net/mac80211/mlme.c | |
parent | 4d57c67827d7bb79c4fcf6618bf80930808e50c6 (diff) | |
parent | 6623c60dc28ee966cd85c6f12aa2fc3c952d0179 (diff) | |
download | lwn-985f2c87a7109a42cac93f56ea595353d53a1746.tar.gz lwn-985f2c87a7109a42cac93f56ea595353d53a1746.zip |
Merge remote-tracking branch 'net-next/master' into mac80211-next
Merge net-next to get some driver changes that patches depend
on (in order to avoid conflicts).
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 88047bf6c0e0..56ef9a8e151c 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -4218,6 +4218,8 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata, struct ieee80211_supported_band *sband; struct cfg80211_chan_def chandef; int ret; + u32 i; + bool have_80mhz; sband = local->hw.wiphy->bands[cbss->channel->band]; @@ -4268,6 +4270,20 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata, } } + /* Allow VHT if at least one channel on the sband supports 80 MHz */ + have_80mhz = false; + for (i = 0; i < sband->n_channels; i++) { + if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED | + IEEE80211_CHAN_NO_80MHZ)) + continue; + + have_80mhz = true; + break; + } + + if (!have_80mhz) + ifmgd->flags |= IEEE80211_STA_DISABLE_VHT; + ifmgd->flags |= ieee80211_determine_chantype(sdata, sband, cbss->channel, ht_cap, ht_oper, vht_oper, |