aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/rt2x00/066-rt2800-do-not-enable-watchdog-by-default.patch
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2019-11-05 10:48:53 +0100
committerDaniel Golle <daniel@makrotopia.org>2019-11-05 10:54:05 +0100
commit439ac8104bf68b4843b94e9848a33f99ee5a3085 (patch)
tree106d297857bbe986d10f01a57799be2d77f71c0e /package/kernel/mac80211/patches/rt2x00/066-rt2800-do-not-enable-watchdog-by-default.patch
parentd6d9f582907630c77309a13a42781010adfff441 (diff)
downloadupstream-439ac8104bf68b4843b94e9848a33f99ee5a3085.tar.gz
upstream-439ac8104bf68b4843b94e9848a33f99ee5a3085.tar.bz2
upstream-439ac8104bf68b4843b94e9848a33f99ee5a3085.zip
mac80211: rt2x00: backport upstream patches
Import patches from upstream to sync 19.07 with master: 9f3e3323e996 rt2x00: allow to specify watchdog interval 2034afe4db4a rt2800: add helpers for reading dma done index 759c5b599cf4 rt2800: initial watchdog implementation 09db3b000619 rt2800: add pre_reset_hw callback 710e6cc1595e rt2800: do not nullify initialization vector data e403fa31ed71 rt2x00: add restart hw 0f47aeeada2a rt2800: do not enable watchdog by default 41a531ffa4c5 rt2x00usb: fix rx queue hang 3b902fa811cf rt2x00usb: remove unnecessary rx flag checks 1dc244064c47 rt2x00: no need to check return value of debugfs_create functions 706f0182b1ad rt2800usb: Add new rt2800usb device PLANEX GW-USMicroN 95844124385e rt2x00: clear IV's on start to fix AP mode regression 567a9b766b47 rt2x00: do not set IEEE80211_TX_STAT_AMPDU_NO_BACK on tx status 14d5e14c8a6c rt2x00: clear up IV's on key removal 13fa451568ab Revert "rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band" --pending-- rt2800: remove errornous duplicate condition Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/kernel/mac80211/patches/rt2x00/066-rt2800-do-not-enable-watchdog-by-default.patch')
-rw-r--r--package/kernel/mac80211/patches/rt2x00/066-rt2800-do-not-enable-watchdog-by-default.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/rt2x00/066-rt2800-do-not-enable-watchdog-by-default.patch b/package/kernel/mac80211/patches/rt2x00/066-rt2800-do-not-enable-watchdog-by-default.patch
new file mode 100644
index 0000000000..37e03dbb52
--- /dev/null
+++ b/package/kernel/mac80211/patches/rt2x00/066-rt2800-do-not-enable-watchdog-by-default.patch
@@ -0,0 +1,71 @@
+From 0f47aeeada2a1fe296258eab9a08ced258009481 Mon Sep 17 00:00:00 2001
+From: Stanislaw Gruszka <sgruszka@redhat.com>
+Date: Sat, 15 Jun 2019 12:01:00 +0200
+Subject: [PATCH 07/15] rt2800: do not enable watchdog by default
+
+Make watchdog disabled by default and add module parameter to enable it.
+
+User will have to create file in /etc/modprobe.d/ with
+
+options rt2800lib watchdog=1
+
+to enable the watchdog or load "rt2800lib watchdog=1" module manually
+before loading rt2800{soc,pci,usb} module.
+
+Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+---
+ drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 12 ++++++++++--
+ drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 +
+ drivers/net/wireless/ralink/rt2x00/rt2x00link.c | 2 +-
+ 3 files changed, 12 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+@@ -41,6 +41,10 @@
+ #include "rt2800lib.h"
+ #include "rt2800.h"
+
++static bool modparam_watchdog;
++module_param_named(watchdog, modparam_watchdog, bool, S_IRUGO);
++MODULE_PARM_DESC(watchdog, "Enable watchdog to detect tx/rx hangs and reset hardware if detected");
++
+ /*
+ * Register access.
+ * All access to the CSR registers will go through the methods
+@@ -10297,8 +10301,12 @@ int rt2800_probe_hw(struct rt2x00_dev *r
+ __set_bit(REQUIRE_TASKLET_CONTEXT, &rt2x00dev->cap_flags);
+ }
+
+- __set_bit(CAPABILITY_RESTART_HW, &rt2x00dev->cap_flags);
+- rt2x00dev->link.watchdog_interval = msecs_to_jiffies(100);
++ if (modparam_watchdog) {
++ __set_bit(CAPABILITY_RESTART_HW, &rt2x00dev->cap_flags);
++ rt2x00dev->link.watchdog_interval = msecs_to_jiffies(100);
++ } else {
++ rt2x00dev->link.watchdog_disabled = true;
++ }
+
+ /*
+ * Set the rssi offset.
+--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+@@ -337,6 +337,7 @@ struct link {
+ */
+ struct delayed_work watchdog_work;
+ unsigned int watchdog_interval;
++ bool watchdog_disabled;
+
+ /*
+ * Work structure for scheduling periodic AGC adjustments.
+--- a/drivers/net/wireless/ralink/rt2x00/rt2x00link.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00link.c
+@@ -395,7 +395,7 @@ void rt2x00link_start_watchdog(struct rt
+ struct link *link = &rt2x00dev->link;
+
+ if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) &&
+- rt2x00dev->ops->lib->watchdog)
++ rt2x00dev->ops->lib->watchdog && !link->watchdog_disabled)
+ ieee80211_queue_delayed_work(rt2x00dev->hw,
+ &link->watchdog_work,
+ link->watchdog_interval);