diff options
author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2020-10-18 00:27:20 +0000 |
---|---|---|
committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2020-10-18 00:27:20 +0000 |
commit | 04e7bb08a575058fc9826ddada8584781cbc1545 (patch) | |
tree | 18910eb8ae63d6edad3076fc9fba8d3ea94ae0fd /sbin/ifconfig | |
parent | 3d8a0ab61da10c861e90c7b3029c006bbfd3dbe1 (diff) | |
download | src-04e7bb08a575058fc9826ddada8584781cbc1545.tar.gz src-04e7bb08a575058fc9826ddada8584781cbc1545.zip |
net80211: update for (more) VHT160 support
Implement two macros IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ()
and its 80+80 counter part to check in vhtcaps for appropriate
levels of support and use the macros throughout the code.
Add vht160_chan_ranges/is_vht160_valid_freq and handle analogue
to vht80 in various parts of the code.
Add ieee80211_add_channel_cbw() which also takes the CBW flag
fields and make the former ieee80211_add_channel() a wrapper to it.
With the CBW flags we can add HT/VHT channels passing them to
getflags() for the 2/5ghz functions.
In ifconfig(8) add the regdomain_addchans() support for VHT160
and VHT80P80.
With this (+ regdoain.xml updates) VHT160 channels can be
configured, listed, and pass regdomain where appropriate.
Tested with: iwlwifi
Reviewed by: adrian
MFC after: 10 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26712
Notes
Notes:
svn path=/head/; revision=366800
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r-- | sbin/ifconfig/ifieee80211.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index 5d2f462147c1..b2032127c3f7 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -2405,7 +2405,31 @@ regdomain_makechannels( &dc->dc_chaninfo); } - /* XXX TODO: VHT80P80, VHT160 */ + /* VHT160 */ + if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ( + dc->dc_vhtcaps)) { + regdomain_addchans(ci, &rd->bands_11ac, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U | + IEEE80211_CHAN_VHT160, + &dc->dc_chaninfo); + regdomain_addchans(ci, &rd->bands_11ac, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D | + IEEE80211_CHAN_VHT160, + &dc->dc_chaninfo); + } + + /* VHT80P80 */ + if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ( + dc->dc_vhtcaps)) { + regdomain_addchans(ci, &rd->bands_11ac, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U | + IEEE80211_CHAN_VHT80P80, + &dc->dc_chaninfo); + regdomain_addchans(ci, &rd->bands_11ac, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D | + IEEE80211_CHAN_VHT80P80, + &dc->dc_chaninfo); + } } if (!LIST_EMPTY(&rd->bands_11ng) && dc->dc_htcaps != 0) { |