|
@@ -0,0 +1,35 @@
|
|
|
+Content-Type: text/plain; charset="utf-8"
|
|
|
+MIME-Version: 1.0
|
|
|
+Content-Transfer-Encoding: 7bit
|
|
|
+X-Patchwork-Submitter: Stanislaw Gruszka <[email protected]>
|
|
|
+X-Patchwork-Id: 11161981
|
|
|
+From: Stanislaw Gruszka <[email protected]>
|
|
|
+To: [email protected]
|
|
|
+Subject: [PATCH] rt2x00: initialize last_reset
|
|
|
+Date: Thu, 26 Sep 2019 10:54:33 +0200
|
|
|
+Message-Id: <[email protected]>
|
|
|
+Sender: [email protected]
|
|
|
+List-ID: <linux-wireless.vger.kernel.org>
|
|
|
+X-Mailing-List: [email protected]
|
|
|
+
|
|
|
+Initialize last_reset variable to INITIAL_JIFFIES, otherwise it is not
|
|
|
+possible to test H/W reset for first 5 minutes of system run.
|
|
|
+
|
|
|
+Fixes: e403fa31ed71 ("rt2x00: add restart hw")
|
|
|
+Reported-and-tested-by: Jonathan Liu <[email protected]>
|
|
|
+Signed-off-by: Stanislaw Gruszka <[email protected]>
|
|
|
+---
|
|
|
+ drivers/net/wireless/ralink/rt2x00/rt2x00debug.c | 2 +-
|
|
|
+ 1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
+
|
|
|
+--- a/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
|
|
|
++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
|
|
|
+@@ -575,7 +575,7 @@ static ssize_t rt2x00debug_write_restart
|
|
|
+ {
|
|
|
+ struct rt2x00debug_intf *intf = file->private_data;
|
|
|
+ struct rt2x00_dev *rt2x00dev = intf->rt2x00dev;
|
|
|
+- static unsigned long last_reset;
|
|
|
++ static unsigned long last_reset = INITIAL_JIFFIES;
|
|
|
+
|
|
|
+ if (!rt2x00_has_cap_restart_hw(rt2x00dev))
|
|
|
+ return -EOPNOTSUPP;
|