diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2019-06-15 13:00:59 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-06-25 08:10:12 +0300 |
commit | e403fa31ed71e87de8e5991e23406b8377c9c894 (patch) | |
tree | bdaae03726e9b2d48e4695f0425b0c9ff08cc9d5 /drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | |
parent | 710e6cc1595e25378c4b9977f7a8b4ad4a72a109 (diff) | |
download | linux-e403fa31ed71e87de8e5991e23406b8377c9c894.tar.xz |
rt2x00: add restart hw
Add ieee80211_restart_hw() to watchdog and debugfs file for testing
if restart works as expected.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ralink/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c index a6c374c483c2..35414f97a978 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c @@ -1258,8 +1258,14 @@ int rt2x00lib_start(struct rt2x00_dev *rt2x00dev) { int retval; - if (test_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags)) - return 0; + if (test_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags)) { + /* + * This is special case for ieee80211_restart_hw(), otherwise + * mac80211 never call start() two times in row without stop(); + */ + rt2x00dev->ops->lib->pre_reset_hw(rt2x00dev); + rt2x00lib_stop(rt2x00dev); + } /* * If this is the first interface which is added, |