summaryrefslogtreecommitdiff
path: root/package/kernel/mac80211/patches/600-0017-rt2x00-rt2800lib-add-RFCSR-initialization-for-RT3883.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-02-24 11:57:27 +0100
committerFelix Fietkau <nbd@nbd.name>2017-02-24 12:22:29 +0100
commit703515f889124248480f39d65f8704548cbf1c09 (patch)
treecd06f11ec2cc4e6ddb75c8982ecaab9882d3a9ed /package/kernel/mac80211/patches/600-0017-rt2x00-rt2800lib-add-RFCSR-initialization-for-RT3883.patch
parentd27dd6298b0f9a66199758b32ce19c0932ef2ee0 (diff)
downloadmtk-20170518-703515f889124248480f39d65f8704548cbf1c09.zip
mtk-20170518-703515f889124248480f39d65f8704548cbf1c09.tar.gz
mtk-20170518-703515f889124248480f39d65f8704548cbf1c09.tar.bz2
mac80211: sync with master branch as of 9edff13abd97
Includes the following changes: 9edff13abd mac80211: disable potentially harmful PS software retry for A-MPDU sessions 75216a76b0 mac80211: backport upstream fix for CSA in IBSS mode 368cc8ef47 mac80211: update brcmfmac backporting brcmf_err cleanups 66a63d25c4 mac80211: fix build on linux 3.18 9eacb9d7fc rt2x00: mt7620: lots of improvements fd94fa61a7 mac80211: brcmfmac: update Raspberry Pi patches for linux 4.9 649e766a64 mac80211: update to wireless-testing 2017-01-31 47540afa5d ath9k: add a warning to the tx99 config option b367eef21d mac80211: rt2x00: add support for external LNA on MT7620 9200e168f2 mac80211: move (& update) upstream accepted brcmfmac patches Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/600-0017-rt2x00-rt2800lib-add-RFCSR-initialization-for-RT3883.patch')
-rw-r--r--package/kernel/mac80211/patches/600-0017-rt2x00-rt2800lib-add-RFCSR-initialization-for-RT3883.patch178
1 files changed, 0 insertions, 178 deletions
diff --git a/package/kernel/mac80211/patches/600-0017-rt2x00-rt2800lib-add-RFCSR-initialization-for-RT3883.patch b/package/kernel/mac80211/patches/600-0017-rt2x00-rt2800lib-add-RFCSR-initialization-for-RT3883.patch
deleted file mode 100644
index 936fa35..0000000
--- a/package/kernel/mac80211/patches/600-0017-rt2x00-rt2800lib-add-RFCSR-initialization-for-RT3883.patch
+++ /dev/null
@@ -1,178 +0,0 @@
-From 99c659cf345640fd0f733cbcaf4583cc2c868ec0 Mon Sep 17 00:00:00 2001
-From: Gabor Juhos <juhosg@openwrt.org>
-Date: Mon, 29 Apr 2013 13:21:48 +0200
-Subject: [PATCH] rt2x00: rt2800lib: add RFCSR initialization for RT3883
-
-Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
----
- drivers/net/wireless/ralink/rt2x00/rt2800.h | 1 +
- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 141 +++++++++++++++++++++++++++++++
- 2 files changed, 142 insertions(+)
-
---- a/drivers/net/wireless/ralink/rt2x00/rt2800.h
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2800.h
-@@ -2171,6 +2171,7 @@ struct mac_iveiv_entry {
- /*
- * RFCSR 2:
- */
-+#define RFCSR2_RESCAL_BP FIELD8(0x40)
- #define RFCSR2_RESCAL_EN FIELD8(0x80)
-
- /*
---- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -6820,6 +6820,144 @@ static void rt2800_init_rfcsr_3593(struc
- /* TODO: enable stream mode support */
- }
-
-+static void rt2800_init_rfcsr_3883(struct rt2x00_dev *rt2x00dev)
-+{
-+ u8 rfcsr;
-+
-+ /* TODO: get the actual ECO value from the SoC */
-+ const unsigned int eco = 5;
-+
-+ rt2800_rf_init_calibration(rt2x00dev, 2);
-+
-+ rt2800_rfcsr_write(rt2x00dev, 0, 0xe0);
-+ rt2800_rfcsr_write(rt2x00dev, 1, 0x03);
-+ rt2800_rfcsr_write(rt2x00dev, 2, 0x50);
-+ rt2800_rfcsr_write(rt2x00dev, 3, 0x20);
-+ rt2800_rfcsr_write(rt2x00dev, 4, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 5, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 6, 0x40);
-+ rt2800_rfcsr_write(rt2x00dev, 7, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 8, 0x5b);
-+ rt2800_rfcsr_write(rt2x00dev, 9, 0x08);
-+ rt2800_rfcsr_write(rt2x00dev, 10, 0xd3);
-+ rt2800_rfcsr_write(rt2x00dev, 11, 0x48);
-+ rt2800_rfcsr_write(rt2x00dev, 12, 0x1a);
-+ rt2800_rfcsr_write(rt2x00dev, 13, 0x12);
-+ rt2800_rfcsr_write(rt2x00dev, 14, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 15, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 16, 0x00);
-+
-+ /* RFCSR 17 will be initialized later based on the
-+ * frequency offset stored in the EEPROM
-+ */
-+
-+ rt2800_rfcsr_write(rt2x00dev, 18, 0x40);
-+ rt2800_rfcsr_write(rt2x00dev, 19, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 20, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 21, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 22, 0x20);
-+ rt2800_rfcsr_write(rt2x00dev, 23, 0xc0);
-+ rt2800_rfcsr_write(rt2x00dev, 24, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 25, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 26, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 27, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 28, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 29, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 30, 0x10);
-+ rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
-+ rt2800_rfcsr_write(rt2x00dev, 32, 0x80);
-+ rt2800_rfcsr_write(rt2x00dev, 33, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 34, 0x20);
-+ rt2800_rfcsr_write(rt2x00dev, 35, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 36, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 37, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 38, 0x86);
-+ rt2800_rfcsr_write(rt2x00dev, 39, 0x23);
-+ rt2800_rfcsr_write(rt2x00dev, 40, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 41, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 42, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 43, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 44, 0x93);
-+ rt2800_rfcsr_write(rt2x00dev, 45, 0xbb);
-+ rt2800_rfcsr_write(rt2x00dev, 46, 0x60);
-+ rt2800_rfcsr_write(rt2x00dev, 47, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 48, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 49, 0x8e);
-+ rt2800_rfcsr_write(rt2x00dev, 50, 0x86);
-+ rt2800_rfcsr_write(rt2x00dev, 51, 0x51);
-+ rt2800_rfcsr_write(rt2x00dev, 52, 0x05);
-+ rt2800_rfcsr_write(rt2x00dev, 53, 0x76);
-+ rt2800_rfcsr_write(rt2x00dev, 54, 0x76);
-+ rt2800_rfcsr_write(rt2x00dev, 55, 0x76);
-+ rt2800_rfcsr_write(rt2x00dev, 56, 0xdb);
-+ rt2800_rfcsr_write(rt2x00dev, 57, 0x3e);
-+ rt2800_rfcsr_write(rt2x00dev, 58, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 59, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 60, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 61, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 62, 0x00);
-+ rt2800_rfcsr_write(rt2x00dev, 63, 0x00);
-+
-+ /* TODO: rx filter calibration? */
-+
-+ rt2800_bbp_write(rt2x00dev, 137, 0x0f);
-+
-+ rt2800_bbp_write(rt2x00dev, 163, 0x9d);
-+
-+ rt2800_bbp_write(rt2x00dev, 105, 0x05);
-+
-+ rt2800_bbp_write(rt2x00dev, 179, 0x02);
-+ rt2800_bbp_write(rt2x00dev, 180, 0x00);
-+ rt2800_bbp_write(rt2x00dev, 182, 0x40);
-+ rt2800_bbp_write(rt2x00dev, 180, 0x01);
-+ rt2800_bbp_write(rt2x00dev, 182, 0x9c);
-+
-+ rt2800_bbp_write(rt2x00dev, 179, 0x00);
-+
-+ rt2800_bbp_write(rt2x00dev, 142, 0x04);
-+ rt2800_bbp_write(rt2x00dev, 143, 0x3b);
-+ rt2800_bbp_write(rt2x00dev, 142, 0x06);
-+ rt2800_bbp_write(rt2x00dev, 143, 0xa0);
-+ rt2800_bbp_write(rt2x00dev, 142, 0x07);
-+ rt2800_bbp_write(rt2x00dev, 143, 0xa1);
-+ rt2800_bbp_write(rt2x00dev, 142, 0x08);
-+ rt2800_bbp_write(rt2x00dev, 143, 0xa2);
-+ rt2800_bbp_write(rt2x00dev, 148, 0xc8);
-+
-+ if (eco == 5) {
-+ rt2800_rfcsr_write(rt2x00dev, 32, 0xd8);
-+ rt2800_rfcsr_write(rt2x00dev, 33, 0x32);
-+ }
-+
-+ rt2800_rfcsr_read(rt2x00dev, 2, &rfcsr);
-+ rt2x00_set_field8(&rfcsr, RFCSR2_RESCAL_BP, 0);
-+ rt2x00_set_field8(&rfcsr, RFCSR2_RESCAL_EN, 1);
-+ rt2800_rfcsr_write(rt2x00dev, 2, rfcsr);
-+ msleep(1);
-+ rt2x00_set_field8(&rfcsr, RFCSR2_RESCAL_EN, 0);
-+ rt2800_rfcsr_write(rt2x00dev, 2, rfcsr);
-+
-+ rt2800_rfcsr_read(rt2x00dev, 1, &rfcsr);
-+ rt2x00_set_field8(&rfcsr, RFCSR1_RF_BLOCK_EN, 1);
-+ rt2800_rfcsr_write(rt2x00dev, 1, rfcsr);
-+
-+ rt2800_rfcsr_read(rt2x00dev, 6, &rfcsr);
-+ rfcsr |= 0xc0;
-+ rt2800_rfcsr_write(rt2x00dev, 6, rfcsr);
-+
-+ rt2800_rfcsr_read(rt2x00dev, 22, &rfcsr);
-+ rfcsr |= 0x20;
-+ rt2800_rfcsr_write(rt2x00dev, 22, rfcsr);
-+
-+ rt2800_rfcsr_read(rt2x00dev, 46, &rfcsr);
-+ rfcsr |= 0x20;
-+ rt2800_rfcsr_write(rt2x00dev, 46, rfcsr);
-+
-+ rt2800_rfcsr_read(rt2x00dev, 20, &rfcsr);
-+ rfcsr &= ~0xee;
-+ rt2800_rfcsr_write(rt2x00dev, 20, rfcsr);
-+}
-+
- static void rt2800_init_rfcsr_5390(struct rt2x00_dev *rt2x00dev)
- {
- rt2800_rf_init_calibration(rt2x00dev, 2);
-@@ -7051,6 +7189,9 @@ static void rt2800_init_rfcsr(struct rt2
- case RT3390:
- rt2800_init_rfcsr_3390(rt2x00dev);
- break;
-+ case RT3883:
-+ rt2800_init_rfcsr_3883(rt2x00dev);
-+ break;
- case RT3572:
- rt2800_init_rfcsr_3572(rt2x00dev);
- break;