]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
net80211: enhance getflags*() and ieee80211_add_channel*()
authorbz <bz@FreeBSD.org>
Mon, 24 Aug 2020 13:15:08 +0000 (13:15 +0000)
committerbz <bz@FreeBSD.org>
Mon, 24 Aug 2020 13:15:08 +0000 (13:15 +0000)
commit1c5d114956efc7f6c92d45c7609ff46881462056
treedefdf18c9d25b017cd3697aa4f61ab270b6059c9
parentaf396b3a28c08f170681282d8662d7cdfdf97044
net80211: enhance getflags*() and ieee80211_add_channel*()

For ieee80211_add_channel+*() we are passing in an int flag for
ht40 and in some cases another int flag for vht80 where we'd only
need two bits really.
Convert these variables to a bitflag and fold them together into one.
This also allows for VHT160 and VHT80P80 and whatever may come to
be considered. Define the various options currently needed.

Change the drivers (rtwn and rsu) which actually set this bit to non-0.
For convenience the "1" currently used for HT40 is preserved.

Enahnce getflags_5ghz() to handle the full set of VHT flags based
on the input flags from the the driver.

Update the regdomain implementation as well to make use of the new
flags and deal with higher [V]HT bandwidths.

ieee80211_add_channel() specifically did not take flags so it will
not support naything beyond 20Mhz channels.

Note: I am not entirely happy with the "cbw_flag[s]" name, but we
do use chan_flags elsewhere already.

MFC after: 2 weeks
Reviewed by: adrian, gnn
Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")
Differential revision: https://reviews.freebsd.org/D26091
sys/dev/rtwn/if_rtwn.c
sys/dev/usb/wlan/if_rsu.c
sys/net80211/ieee80211.c
sys/net80211/ieee80211_regdomain.c
sys/net80211/ieee80211_var.h