diff options
author | Rostislav Lisovy <lisovy@gmail.com> | 2014-04-15 14:37:55 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-04-25 17:38:23 +0200 |
commit | ea077c1cea36a6b5ded1256dcd56c72ff2a22c62 (patch) | |
tree | bf071f6c59f762aed4ebe077ab8272bfb5379b4b /net/wireless/chan.c | |
parent | mac80211: change return value of notifier function (diff) | |
download | linux-ea077c1cea36a6b5ded1256dcd56c72ff2a22c62.tar.xz linux-ea077c1cea36a6b5ded1256dcd56c72ff2a22c62.zip |
cfg80211: Add attributes describing prohibited channel bandwidth
Since there are frequency bands (e.g. 5.9GHz) allowing channels
with only 10 or 5 MHz bandwidth, this patch adds attributes that
allow keeping track about this information.
When channel attributes are reported to user-space, make sure to
not break old tools, i.e. if the 'split wiphy dump' is enabled,
report the extra attributes (if present) describing the bandwidth
restrictions. If the 'split wiphy dump' is not enabled,
completely omit those channels that have flags set to either
IEEE80211_CHAN_NO_10MHZ or IEEE80211_CHAN_NO_20MHZ.
Add the check for new bandwidth restriction flags in
cfg80211_chandef_usable() to comply with the restrictions.
Signed-off-by: Rostislav Lisovy <rostislav.lisovy@fel.cvut.cz>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/chan.c')
-rw-r--r-- | net/wireless/chan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c index 2adf7b2eccbc..84d686e2dbd0 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -616,12 +616,14 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy, width = 5; break; case NL80211_CHAN_WIDTH_10: + prohibited_flags |= IEEE80211_CHAN_NO_10MHZ; width = 10; break; case NL80211_CHAN_WIDTH_20: if (!ht_cap->ht_supported) return false; case NL80211_CHAN_WIDTH_20_NOHT: + prohibited_flags |= IEEE80211_CHAN_NO_20MHZ; width = 20; break; case NL80211_CHAN_WIDTH_40: |