mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-07 14:28:50 +00:00
439ac8104b
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>
57 lines
2.0 KiB
Diff
57 lines
2.0 KiB
Diff
From 9f3e3323e9966d9f21bea0c81b1acb36c0e15cec Mon Sep 17 00:00:00 2001
|
|
From: Stanislaw Gruszka <sgruszka@redhat.com>
|
|
Date: Sat, 15 Jun 2019 12:00:54 +0200
|
|
Subject: [PATCH 01/15] rt2x00: allow to specify watchdog interval
|
|
|
|
Allow subdriver to change watchdog interval by intialize
|
|
link->watchdog_interval value before rt2x00link_register().
|
|
|
|
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
|
|
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
---
|
|
drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 +
|
|
drivers/net/wireless/ralink/rt2x00/rt2x00link.c | 13 +++++++++----
|
|
2 files changed, 10 insertions(+), 4 deletions(-)
|
|
|
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
|
@@ -336,6 +336,7 @@ struct link {
|
|
* to bring the device/driver back into the desired state.
|
|
*/
|
|
struct delayed_work watchdog_work;
|
|
+ unsigned int watchdog_interval;
|
|
|
|
/*
|
|
* Work structure for scheduling periodic AGC adjustments.
|
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00link.c
|
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00link.c
|
|
@@ -398,7 +398,7 @@ void rt2x00link_start_watchdog(struct rt
|
|
rt2x00dev->ops->lib->watchdog)
|
|
ieee80211_queue_delayed_work(rt2x00dev->hw,
|
|
&link->watchdog_work,
|
|
- WATCHDOG_INTERVAL);
|
|
+ link->watchdog_interval);
|
|
}
|
|
|
|
void rt2x00link_stop_watchdog(struct rt2x00_dev *rt2x00dev)
|
|
@@ -424,11 +424,16 @@ static void rt2x00link_watchdog(struct w
|
|
if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
|
|
ieee80211_queue_delayed_work(rt2x00dev->hw,
|
|
&link->watchdog_work,
|
|
- WATCHDOG_INTERVAL);
|
|
+ link->watchdog_interval);
|
|
}
|
|
|
|
void rt2x00link_register(struct rt2x00_dev *rt2x00dev)
|
|
{
|
|
- INIT_DELAYED_WORK(&rt2x00dev->link.watchdog_work, rt2x00link_watchdog);
|
|
- INIT_DELAYED_WORK(&rt2x00dev->link.work, rt2x00link_tuner);
|
|
+ struct link *link = &rt2x00dev->link;
|
|
+
|
|
+ INIT_DELAYED_WORK(&link->work, rt2x00link_tuner);
|
|
+ INIT_DELAYED_WORK(&link->watchdog_work, rt2x00link_watchdog);
|
|
+
|
|
+ if (link->watchdog_interval == 0)
|
|
+ link->watchdog_interval = WATCHDOG_INTERVAL;
|
|
}
|