aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/600-0006-rt2x00-rt2800lib-init-additional-beacon-offset-regis.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-04-23 07:52:18 +0000
committerJohn Crispin <john@openwrt.org>2014-04-23 07:52:18 +0000
commit8be12510c972e15690b4e4c0cf78d6ea5f233ed2 (patch)
tree9596c36ce80b99f16b11fb6e1b27f85a138a5e11 /package/kernel/mac80211/patches/600-0006-rt2x00-rt2800lib-init-additional-beacon-offset-regis.patch
parent720a0a1df14d377832a627591a947432cbb6ab35 (diff)
downloadupstream-8be12510c972e15690b4e4c0cf78d6ea5f233ed2.tar.gz
upstream-8be12510c972e15690b4e4c0cf78d6ea5f233ed2.tar.bz2
upstream-8be12510c972e15690b4e4c0cf78d6ea5f233ed2.zip
mac80211: rt2x00: add support for the RT3662/RT3883 SoCs
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 40558
Diffstat (limited to 'package/kernel/mac80211/patches/600-0006-rt2x00-rt2800lib-init-additional-beacon-offset-regis.patch')
-rw-r--r--package/kernel/mac80211/patches/600-0006-rt2x00-rt2800lib-init-additional-beacon-offset-regis.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/600-0006-rt2x00-rt2800lib-init-additional-beacon-offset-regis.patch b/package/kernel/mac80211/patches/600-0006-rt2x00-rt2800lib-init-additional-beacon-offset-regis.patch
new file mode 100644
index 0000000000..8c527134f9
--- /dev/null
+++ b/package/kernel/mac80211/patches/600-0006-rt2x00-rt2800lib-init-additional-beacon-offset-regis.patch
@@ -0,0 +1,67 @@
+From 1bfa43ca8f30be53ce4fa79cfc3e219642a812b6 Mon Sep 17 00:00:00 2001
+From: Gabor Juhos <juhosg@openwrt.org>
+Date: Mon, 2 Sep 2013 10:58:32 +0200
+Subject: [PATCH] rt2x00: rt2800lib: init additional beacon offset registers
+
+Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+---
+ drivers/net/wireless/rt2x00/rt2800.h | 14 ++++++++++++++
+ drivers/net/wireless/rt2x00/rt2800lib.c | 24 ++++++++++++++++++++++++
+ 2 files changed, 38 insertions(+)
+
+--- a/drivers/net/wireless/rt2x00/rt2800.h
++++ b/drivers/net/wireless/rt2x00/rt2800.h
+@@ -627,6 +627,20 @@
+ */
+ #define PBF_DBG 0x043c
+
++/* BCN_OFFSET2 */
++#define BCN_OFFSET2 0x0444
++#define BCN_OFFSET2_BCN8 FIELD32(0x000000ff)
++#define BCN_OFFSET2_BCN9 FIELD32(0x0000ff00)
++#define BCN_OFFSET2_BCN10 FIELD32(0x00ff0000)
++#define BCN_OFFSET2_BCN11 FIELD32(0xff000000)
++
++/* BCN_OFFSET3 */
++#define BCN_OFFSET3 0x0448
++#define BCN_OFFSET3_BCN12 FIELD32(0x000000ff)
++#define BCN_OFFSET3_BCN13 FIELD32(0x0000ff00)
++#define BCN_OFFSET3_BCN14 FIELD32(0x00ff0000)
++#define BCN_OFFSET3_BCN15 FIELD32(0xff000000)
++
+ /*
+ * RF registers
+ */
+--- a/drivers/net/wireless/rt2x00/rt2800lib.c
++++ b/drivers/net/wireless/rt2x00/rt2800lib.c
+@@ -4618,6 +4618,30 @@ static int rt2800_init_registers(struct
+ rt2800_get_beacon_offset(rt2x00dev, 7));
+ rt2800_register_write(rt2x00dev, BCN_OFFSET1, reg);
+
++ if (drv_data->hw_beacon_count == 16) {
++ rt2800_register_read(rt2x00dev, BCN_OFFSET2, &reg);
++ rt2x00_set_field32(&reg, BCN_OFFSET2_BCN8,
++ rt2800_get_beacon_offset(rt2x00dev, 8));
++ rt2x00_set_field32(&reg, BCN_OFFSET2_BCN9,
++ rt2800_get_beacon_offset(rt2x00dev, 9));
++ rt2x00_set_field32(&reg, BCN_OFFSET2_BCN10,
++ rt2800_get_beacon_offset(rt2x00dev, 10));
++ rt2x00_set_field32(&reg, BCN_OFFSET2_BCN11,
++ rt2800_get_beacon_offset(rt2x00dev, 11));
++ rt2800_register_write(rt2x00dev, BCN_OFFSET2, reg);
++
++ rt2800_register_read(rt2x00dev, BCN_OFFSET3, &reg);
++ rt2x00_set_field32(&reg, BCN_OFFSET3_BCN12,
++ rt2800_get_beacon_offset(rt2x00dev, 12));
++ rt2x00_set_field32(&reg, BCN_OFFSET3_BCN13,
++ rt2800_get_beacon_offset(rt2x00dev, 13));
++ rt2x00_set_field32(&reg, BCN_OFFSET3_BCN14,
++ rt2800_get_beacon_offset(rt2x00dev, 14));
++ rt2x00_set_field32(&reg, BCN_OFFSET3_BCN15,
++ rt2800_get_beacon_offset(rt2x00dev, 15));
++ rt2800_register_write(rt2x00dev, BCN_OFFSET3, reg);
++ }
++
+ rt2800_register_write(rt2x00dev, LEGACY_BASIC_RATE, 0x0000013f);
+ rt2800_register_write(rt2x00dev, HT_BASIC_RATE, 0x00008003);
+