aboutsummaryrefslogtreecommitdiff
path: root/sys/net80211
diff options
context:
space:
mode:
authorAndriy Voskoboinyk <avos@FreeBSD.org>2019-01-26 17:00:55 +0000
committerAndriy Voskoboinyk <avos@FreeBSD.org>2019-01-26 17:00:55 +0000
commitb84b36380eb1404f1cf06224cc8af5f805edb090 (patch)
tree78a10851bffb6a6345858a405612c5c98406d2a2 /sys/net80211
parent34fd9d700086e421db256d9d8b1807f918513079 (diff)
downloadsrc-b84b36380eb1404f1cf06224cc8af5f805edb090.tar.gz
src-b84b36380eb1404f1cf06224cc8af5f805edb090.zip
Remove 2GHz channel list copies from wireless drivers.
Wrap ieee80211_add_channel_list_2ghz into another function which supplies default (1-14) channel list to it and drop its copies from drivers. Checked with RTL8188EE, country US / JP / KR / UA. MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=343474
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211.c11
-rw-r--r--sys/net80211/ieee80211_var.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c
index a0b36f2866bb..699728ee6909 100644
--- a/sys/net80211/ieee80211.c
+++ b/sys/net80211/ieee80211.c
@@ -1632,6 +1632,17 @@ ieee80211_add_channel_list_2ghz(struct ieee80211_channel chans[], int maxchans,
}
int
+ieee80211_add_channels_default_2ghz(struct ieee80211_channel chans[],
+ int maxchans, int *nchans, const uint8_t bands[], int ht40)
+{
+ const uint8_t default_chan_list[] =
+ { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 };
+
+ return (ieee80211_add_channel_list_2ghz(chans, maxchans, nchans,
+ default_chan_list, nitems(default_chan_list), bands, ht40));
+}
+
+int
ieee80211_add_channel_list_5ghz(struct ieee80211_channel chans[], int maxchans,
int *nchans, const uint8_t ieee[], int nieee, const uint8_t bands[],
int ht40)
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index 0839baef885a..24ffbe106ba4 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -734,6 +734,8 @@ uint32_t ieee80211_get_channel_center_freq1(const struct ieee80211_channel *);
uint32_t ieee80211_get_channel_center_freq2(const struct ieee80211_channel *);
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,
+ int *, const uint8_t[], int);
int ieee80211_add_channel_list_5ghz(struct ieee80211_channel[], int, int *,
const uint8_t[], int, const uint8_t[], int);
struct ieee80211_channel *ieee80211_find_channel(struct ieee80211com *,