[LEDE-DEV] [PATCH v2 2/2] mac80211: add patch 560-ath9k-Update-AR9340-initvals-for-txgain-table-mode-4

Alexander Couzens lynxis at fe80.eu
Fri May 20 04:10:37 PDT 2016


Fix low tx power on TpLink cpe510 devices

Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 ...e-AR9340-initvals-for-txgain-table-mode-4.patch | 53 ++++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 package/kernel/mac80211/patches/560-ath9k-Update-AR9340-initvals-for-txgain-table-mode-4.patch

diff --git a/package/kernel/mac80211/patches/560-ath9k-Update-AR9340-initvals-for-txgain-table-mode-4.patch b/package/kernel/mac80211/patches/560-ath9k-Update-AR9340-initvals-for-txgain-table-mode-4.patch
new file mode 100644
index 0000000..573c55d
--- /dev/null
+++ b/package/kernel/mac80211/patches/560-ath9k-Update-AR9340-initvals-for-txgain-table-mode-4.patch
@@ -0,0 +1,53 @@
+From 1ed019d85314dfc029c99c05da4a00a2d66b23c1 Mon Sep 17 00:00:00 2001
+From: Alexander Couzens <lynxis at fe80.eu>
+Date: Fri, 20 May 2016 01:43:41 +0200
+Subject: [PATCH] ath9k: Update AR9340 initvals for txgain table mode 4
+
+Changing the table for 5Ghz HT20/HT40 to fix a 10dbm signal difference
+on the client side when running LEDE on the AP (TpLink CPE510) instead
+of the vendor driver. These values are taken from a TpLink CPE510 running
+the vendor firmware using a small script that retrieved the same registers
+as already defined in the tx gain table.
+
+Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
+---
+
+Because I don't have any datasheets about this wireless chip I can not
+really say, what I'm changing.
+
+ drivers/net/wireless/ath/ath9k/ar9340_initvals.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/net/wireless/ath/ath9k/ar9340_initvals.h b/drivers/net/wireless/ath/ath9k/ar9340_initvals.h
+index 2eb163f..ac5767e 100644
+--- a/drivers/net/wireless/ath/ath9k/ar9340_initvals.h
++++ b/drivers/net/wireless/ath/ath9k/ar9340_initvals.h
+@@ -827,7 +827,7 @@ static const u32 ar9340Modes_mixed_ob_db_tx_gain_table_1p0[][5] = {
+ 	{0x0000a2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
+ 	{0x0000a2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
+ 	{0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
+-	{0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
++	{0x0000a410, 0x000050da, 0x000050da, 0x000050d9, 0x000050d9},
+ 	{0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ 	{0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
+ 	{0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004},
+@@ -912,12 +912,12 @@ static const u32 ar9340Modes_mixed_ob_db_tx_gain_table_1p0[][5] = {
+ 	{0x0000b2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
+ 	{0x0000b2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
+ 	{0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
+-	{0x00016044, 0x056db2db, 0x056db2db, 0x03b6d2e4, 0x03b6d2e4},
+-	{0x00016048, 0x24925666, 0x24925666, 0x8e481266, 0x8e481266},
++	{0x00016044, 0x056db2e4, 0x056db2e4, 0x03b6d2e4, 0x03b6d2e4},
++	{0x00016048, 0x64925666, 0x64925666, 0x8e481266, 0x8e481266},
+ 	{0x00016280, 0x01000015, 0x01000015, 0x01001015, 0x01001015},
+ 	{0x00016288, 0x30318000, 0x30318000, 0x00318000, 0x00318000},
+-	{0x00016444, 0x056db2db, 0x056db2db, 0x03b6d2e4, 0x03b6d2e4},
+-	{0x00016448, 0x24925666, 0x24925666, 0x8e481266, 0x8e481266},
++	{0x00016444, 0x056db2e4, 0x056db2e4, 0x03b6d2e4, 0x03b6d2e4},
++	{0x00016448, 0x64925666, 0x64925666, 0x8e481266, 0x8e481266},
+ };
+ 
+ static const u32 ar9340Modes_low_ob_db_and_spur_tx_gain_table_1p0[][5] = {
+-- 
+2.8.2
+
-- 
2.8.2




More information about the Lede-dev mailing list