aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-09-01 11:40:38 +0000
committerJohn Crispin <blogic@openwrt.org>2014-09-01 11:40:38 +0000
commit40bf3736f8ebd8a47e4a3e1f166f594d259968d2 (patch)
treefce20a388a5bd60a1476bac6a2444a9fa3516efb /package/kernel/mac80211
parentad99cc2f444d63c444dda38dd99a26eefaca3903 (diff)
downloadupstream-40bf3736f8ebd8a47e4a3e1f166f594d259968d2.tar.gz
upstream-40bf3736f8ebd8a47e4a3e1f166f594d259968d2.tar.bz2
upstream-40bf3736f8ebd8a47e4a3e1f166f594d259968d2.zip
mac80211: rt2x00 correctly set ht20/ht40 filter
Simple patch to correct ht20/ht40 switching. Tested with rt3290/rt3352/rt5350 Signed-off-by: Serge Vasilugin <vasilugin@yandex.ru> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42348 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211')
-rw-r--r--package/kernel/mac80211/patches/621-rt2x00-ht20_40_fix.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/621-rt2x00-ht20_40_fix.patch b/package/kernel/mac80211/patches/621-rt2x00-ht20_40_fix.patch
new file mode 100644
index 0000000000..84e2de380c
--- /dev/null
+++ b/package/kernel/mac80211/patches/621-rt2x00-ht20_40_fix.patch
@@ -0,0 +1,33 @@
+Index: compat-wireless-2014-05-22/drivers/net/wireless/rt2x00/rt2800.h
+===================================================================
+--- compat-wireless-2014-05-22.orig/drivers/net/wireless/rt2x00/rt2800.h 2014-08-31 05:04:55.600142409 +0200
++++ compat-wireless-2014-05-22/drivers/net/wireless/rt2x00/rt2800.h 2014-08-31 05:11:02.068145882 +0200
+@@ -2346,6 +2346,8 @@
+ #define RFCSR30_RX_H20M FIELD8(0x04)
+ #define RFCSR30_RX_VCM FIELD8(0x18)
+ #define RFCSR30_RF_CALIBRATION FIELD8(0x80)
++#define RF3322_RFCSR30_TX_H20M FIELD8(0x01)
++#define RF3322_RFCSR30_RX_H20M FIELD8(0x02)
+
+ /*
+ * RFCSR 31:
+Index: compat-wireless-2014-05-22/drivers/net/wireless/rt2x00/rt2800lib.c
+===================================================================
+--- compat-wireless-2014-05-22.orig/drivers/net/wireless/rt2x00/rt2800lib.c 2014-08-31 05:04:55.604142409 +0200
++++ compat-wireless-2014-05-22/drivers/net/wireless/rt2x00/rt2800lib.c 2014-08-31 05:15:02.176148157 +0200
+@@ -3928,8 +3928,13 @@
+ rt2x00_rf(rt2x00dev, RF5390) ||
+ rt2x00_rf(rt2x00dev, RF5392)) {
+ rt2800_rfcsr_read(rt2x00dev, 30, &rfcsr);
+- rt2x00_set_field8(&rfcsr, RFCSR30_TX_H20M, 0);
+- rt2x00_set_field8(&rfcsr, RFCSR30_RX_H20M, 0);
++ if(rt2x00_rf(rt2x00dev, RF3322)) {
++ rt2x00_set_field8(&rfcsr, RF3320_RFCSR30_TX_H20M, conf_is_ht40(conf));
++ rt2x00_set_field8(&rfcsr, RF3322_RFCSR30_RX_H20M, conf_is_ht40(conf));
++ } else {
++ rt2x00_set_field8(&rfcsr, RFCSR30_TX_H20M, conf_is_ht40(conf));
++ rt2x00_set_field8(&rfcsr, RFCSR30_RX_H20M, conf_is_ht40(conf));
++ }
+ rt2800_rfcsr_write(rt2x00dev, 30, rfcsr);
+
+ rt2800_rfcsr_read(rt2x00dev, 3, &rfcsr);