aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/rt2x00/015-rt2x00-remove-unneeded-check.patch
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2019-02-13 19:47:18 +0100
committerDaniel Golle <daniel@makrotopia.org>2019-02-19 09:05:34 +0100
commitd4c999bb891725b71ae38416cc6d5cfa99938ae4 (patch)
tree092236b7f1a2b7c2de42af33619b290c3ea088ec /package/kernel/mac80211/patches/rt2x00/015-rt2x00-remove-unneeded-check.patch
parent331963717bf4781ead1ff03b56de2802b9e05164 (diff)
downloadupstream-d4c999bb891725b71ae38416cc6d5cfa99938ae4.tar.gz
upstream-d4c999bb891725b71ae38416cc6d5cfa99938ae4.tar.bz2
upstream-d4c999bb891725b71ae38416cc6d5cfa99938ae4.zip
mac80211: rt2x00: backport accepted and pending patches from upstream
backport from wireless-drivers-next, replacing some existing patches in our tree (marked with '=' are those which were already present): f483039cf51a rt2x00: use simple_read_from_buffer() =5c656c71b1bf rt2800: move usb specific txdone/txstatus routines to rt2800lib =0b0d556e0ebb rt2800mmio: use txdone/txstatus routines from lib =5022efb50f62 rt2x00: do not check for txstatus timeout every time on tasklet =adf26a356f13 rt2x00: use different txstatus timeouts when flushing =0240564430c0 rt2800: flush and txstatus rework for rt2800mmio 6eba8fd22352 rt2x00: rt2400pci: mark expected switch fall-through 10bb92217747 rt2x00: rt2500pci: mark expected switch fall-through 916e6bbcfcff rt2x00: rt2800lib: mark expected switch fall-throughs 641dd8068ecb rt2x00: rt61pci: mark expected switch fall-through 750afb08ca71 cross-tree: phase out dma_zalloc_coherent() =c2e28ef7711f rt2x00: reduce tx power to nominal level on RT6352 a4296994eb80 rt2x00: Work around a firmware bug with shared keys 2587791d5758 rt2x00: no need to check return value of debugfs_create functions pending on linux-wireless: rt2x00: remove unneeded check rt2x00: remove confusing AGC register rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band rt2800: enable TX_PIN_CFG_RFRX_EN only for MT7620 rt2800: comment and simplify AGC init for RT6352 rt2x00: do not print error when queue is full rt2800: partially restore old mmio txstatus behaviour rt2800: new flush implementation for SoC devices rt2800: move txstatus pending routine rt2800mmio: fetch tx status changes rt2800mmio: use timer and work for handling tx statuses timeouts rt2x00: remove last_nostatus_check rt2x00: remove not used entry field rt2x00mmio: remove legacy comment While at it also rename some existing patches now that there are separate folders with patches for each driver to make things a bit nicer to handle. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/kernel/mac80211/patches/rt2x00/015-rt2x00-remove-unneeded-check.patch')
-rw-r--r--package/kernel/mac80211/patches/rt2x00/015-rt2x00-remove-unneeded-check.patch136
1 files changed, 136 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/rt2x00/015-rt2x00-remove-unneeded-check.patch b/package/kernel/mac80211/patches/rt2x00/015-rt2x00-remove-unneeded-check.patch
new file mode 100644
index 0000000000..f896ea5bcb
--- /dev/null
+++ b/package/kernel/mac80211/patches/rt2x00/015-rt2x00-remove-unneeded-check.patch
@@ -0,0 +1,136 @@
+From 0bffbc98e6999bba38d8185a0ddb1ee77369eaec Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tomislav=20Po=C5=BEega?= <pozega.tomislav@gmail.com>
+Date: Wed, 13 Feb 2019 11:09:12 +0100
+Subject: [PATCH 15/28] rt2x00: remove unneeded check
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Remove band check from rf53xx channel config routine since all chips
+using it are single band.
+
+Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
+Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
+---
+ .../net/wireless/ralink/rt2x00/rt2800lib.c | 103 +++++++++---------
+ 1 file changed, 50 insertions(+), 53 deletions(-)
+
+--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+@@ -2966,6 +2966,7 @@ static void rt2800_config_channel_rf53xx
+ struct channel_info *info)
+ {
+ u8 rfcsr;
++ int idx = rf->channel-1;
+
+ rt2800_rfcsr_write(rt2x00dev, 8, rf->rf1);
+ rt2800_rfcsr_write(rt2x00dev, 9, rf->rf3);
+@@ -3003,60 +3004,56 @@ static void rt2800_config_channel_rf53xx
+
+ rt2800_freq_cal_mode1(rt2x00dev);
+
+- if (rf->channel <= 14) {
+- int idx = rf->channel-1;
++ if (rt2x00_has_cap_bt_coexist(rt2x00dev)) {
++ if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390F)) {
++ /* r55/r59 value array of channel 1~14 */
++ static const char r55_bt_rev[] = {0x83, 0x83,
++ 0x83, 0x73, 0x73, 0x63, 0x53, 0x53,
++ 0x53, 0x43, 0x43, 0x43, 0x43, 0x43};
++ static const char r59_bt_rev[] = {0x0e, 0x0e,
++ 0x0e, 0x0e, 0x0e, 0x0b, 0x0a, 0x09,
++ 0x07, 0x07, 0x07, 0x07, 0x07, 0x07};
++
++ rt2800_rfcsr_write(rt2x00dev, 55,
++ r55_bt_rev[idx]);
++ rt2800_rfcsr_write(rt2x00dev, 59,
++ r59_bt_rev[idx]);
++ } else {
++ static const char r59_bt[] = {0x8b, 0x8b, 0x8b,
++ 0x8b, 0x8b, 0x8b, 0x8b, 0x8a, 0x89,
++ 0x88, 0x88, 0x86, 0x85, 0x84};
+
+- if (rt2x00_has_cap_bt_coexist(rt2x00dev)) {
+- if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390F)) {
+- /* r55/r59 value array of channel 1~14 */
+- static const char r55_bt_rev[] = {0x83, 0x83,
+- 0x83, 0x73, 0x73, 0x63, 0x53, 0x53,
+- 0x53, 0x43, 0x43, 0x43, 0x43, 0x43};
+- static const char r59_bt_rev[] = {0x0e, 0x0e,
+- 0x0e, 0x0e, 0x0e, 0x0b, 0x0a, 0x09,
+- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07};
+-
+- rt2800_rfcsr_write(rt2x00dev, 55,
+- r55_bt_rev[idx]);
+- rt2800_rfcsr_write(rt2x00dev, 59,
+- r59_bt_rev[idx]);
+- } else {
+- static const char r59_bt[] = {0x8b, 0x8b, 0x8b,
+- 0x8b, 0x8b, 0x8b, 0x8b, 0x8a, 0x89,
+- 0x88, 0x88, 0x86, 0x85, 0x84};
++ rt2800_rfcsr_write(rt2x00dev, 59, r59_bt[idx]);
++ }
++ } else {
++ if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390F)) {
++ static const char r55_nonbt_rev[] = {0x23, 0x23,
++ 0x23, 0x23, 0x13, 0x13, 0x03, 0x03,
++ 0x03, 0x03, 0x03, 0x03, 0x03, 0x03};
++ static const char r59_nonbt_rev[] = {0x07, 0x07,
++ 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
++ 0x07, 0x07, 0x06, 0x05, 0x04, 0x04};
++
++ rt2800_rfcsr_write(rt2x00dev, 55,
++ r55_nonbt_rev[idx]);
++ rt2800_rfcsr_write(rt2x00dev, 59,
++ r59_nonbt_rev[idx]);
++ } else if (rt2x00_rt(rt2x00dev, RT5390) ||
++ rt2x00_rt(rt2x00dev, RT5392) ||
++ rt2x00_rt(rt2x00dev, RT6352)) {
++ static const char r59_non_bt[] = {0x8f, 0x8f,
++ 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8d,
++ 0x8a, 0x88, 0x88, 0x87, 0x87, 0x86};
++
++ rt2800_rfcsr_write(rt2x00dev, 59,
++ r59_non_bt[idx]);
++ } else if (rt2x00_rt(rt2x00dev, RT5350)) {
++ static const char r59_non_bt[] = {0x0b, 0x0b,
++ 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0a,
++ 0x0a, 0x09, 0x08, 0x07, 0x07, 0x06};
+
+- rt2800_rfcsr_write(rt2x00dev, 59, r59_bt[idx]);
+- }
+- } else {
+- if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390F)) {
+- static const char r55_nonbt_rev[] = {0x23, 0x23,
+- 0x23, 0x23, 0x13, 0x13, 0x03, 0x03,
+- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03};
+- static const char r59_nonbt_rev[] = {0x07, 0x07,
+- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
+- 0x07, 0x07, 0x06, 0x05, 0x04, 0x04};
+-
+- rt2800_rfcsr_write(rt2x00dev, 55,
+- r55_nonbt_rev[idx]);
+- rt2800_rfcsr_write(rt2x00dev, 59,
+- r59_nonbt_rev[idx]);
+- } else if (rt2x00_rt(rt2x00dev, RT5390) ||
+- rt2x00_rt(rt2x00dev, RT5392) ||
+- rt2x00_rt(rt2x00dev, RT6352)) {
+- static const char r59_non_bt[] = {0x8f, 0x8f,
+- 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8d,
+- 0x8a, 0x88, 0x88, 0x87, 0x87, 0x86};
+-
+- rt2800_rfcsr_write(rt2x00dev, 59,
+- r59_non_bt[idx]);
+- } else if (rt2x00_rt(rt2x00dev, RT5350)) {
+- static const char r59_non_bt[] = {0x0b, 0x0b,
+- 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0a,
+- 0x0a, 0x09, 0x08, 0x07, 0x07, 0x06};
+-
+- rt2800_rfcsr_write(rt2x00dev, 59,
+- r59_non_bt[idx]);
+- }
++ rt2800_rfcsr_write(rt2x00dev, 59,
++ r59_non_bt[idx]);
+ }
+ }
+ }