summaryrefslogtreecommitdiff
path: root/package/mac80211/patches/525-ath9k_channel_count_check.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-10-09 00:36:54 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-10-09 00:36:54 +0000
commitbbf2a906b6bde84e2b76d220c5f30ec3b52232fc (patch)
tree1379e1716cf376b3cd648e7547241d63cc270afc /package/mac80211/patches/525-ath9k_channel_count_check.patch
parentcd771e9bc58be90b12bea9671a546720c754d549 (diff)
downloadmtk-20170518-bbf2a906b6bde84e2b76d220c5f30ec3b52232fc.zip
mtk-20170518-bbf2a906b6bde84e2b76d220c5f30ec3b52232fc.tar.gz
mtk-20170518-bbf2a906b6bde84e2b76d220c5f30ec3b52232fc.tar.bz2
ath9k: implement extended channel utilization statistics via survey
SVN-Revision: 23350
Diffstat (limited to 'package/mac80211/patches/525-ath9k_channel_count_check.patch')
-rw-r--r--package/mac80211/patches/525-ath9k_channel_count_check.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/package/mac80211/patches/525-ath9k_channel_count_check.patch b/package/mac80211/patches/525-ath9k_channel_count_check.patch
new file mode 100644
index 0000000..ae74393
--- /dev/null
+++ b/package/mac80211/patches/525-ath9k_channel_count_check.patch
@@ -0,0 +1,33 @@
+--- a/drivers/net/wireless/ath/ath9k/hw.h
++++ b/drivers/net/wireless/ath/ath9k/hw.h
+@@ -61,6 +61,8 @@
+
+ #define ATH9K_RSSI_BAD -128
+
++#define ATH9K_NUM_CHANNELS 38
++
+ /* Register read/write primitives */
+ #define REG_WRITE(_ah, _reg, _val) \
+ ath9k_hw_common(_ah)->ops->write((_ah), (_val), (_reg))
+@@ -618,7 +620,7 @@ struct ath_hw {
+ struct ath9k_hw_version hw_version;
+ struct ath9k_ops_config config;
+ struct ath9k_hw_capabilities caps;
+- struct ath9k_channel channels[38];
++ struct ath9k_channel channels[ATH9K_NUM_CHANNELS];
+ struct ath9k_channel *curchan;
+
+ union {
+--- a/drivers/net/wireless/ath/ath9k/init.c
++++ b/drivers/net/wireless/ath/ath9k/init.c
+@@ -482,6 +482,10 @@ static int ath9k_init_channels_rates(str
+ {
+ void *channels;
+
++ BUILD_BUG_ON(ARRAY_SIZE(ath9k_2ghz_chantable) +
++ ARRAY_SIZE(ath9k_5ghz_chantable) !=
++ ATH9K_NUM_CHANNELS);
++
+ if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes)) {
+ channels = kmemdup(ath9k_2ghz_chantable,
+ sizeof(ath9k_2ghz_chantable), GFP_KERNEL);