aboutsummaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_var.h
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2020-08-24 13:15:08 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2020-08-24 13:15:08 +0000
commit2b9f12f6b2f5284999ab0a63037943dea5cfbedf (patch)
treedefdf18c9d25b017cd3697aa4f61ab270b6059c9 /sys/net80211/ieee80211_var.h
parenta333a508a20df6d9c94927a0176d40c896dd52de (diff)
downloadsrc-2b9f12f6b2f5284999ab0a63037943dea5cfbedf.tar.gz
src-2b9f12f6b2f5284999ab0a63037943dea5cfbedf.zip
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
Notes
Notes: svn path=/head/; revision=364673
Diffstat (limited to 'sys/net80211/ieee80211_var.h')
-rw-r--r--sys/net80211/ieee80211_var.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index 6bb9a60dd48e..651667606ac8 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -779,6 +779,10 @@ int ieee80211_add_channel_ht40(struct ieee80211_channel[], int, int *,
uint32_t ieee80211_get_channel_center_freq(const struct ieee80211_channel *);
uint32_t ieee80211_get_channel_center_freq1(const struct ieee80211_channel *);
uint32_t ieee80211_get_channel_center_freq2(const struct ieee80211_channel *);
+#define NET80211_CBW_FLAG_HT40 0x01
+#define NET80211_CBW_FLAG_VHT80 0x02
+#define NET80211_CBW_FLAG_VHT160 0x04
+#define NET80211_CBW_FLAG_VHT80P80 0x08
int ieee80211_add_channel_list_2ghz(struct ieee80211_channel[], int, int *,
const uint8_t[], int, const uint8_t[], int);
int ieee80211_add_channels_default_2ghz(struct ieee80211_channel[], int,