diff options
author | Hamad Kadmany <qca_hkadmany@qca.qualcomm.com> | 2015-10-04 10:23:27 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2015-10-09 11:39:21 +0300 |
commit | f13e0630826f961732f3192282a6c249bb6208c1 (patch) | |
tree | e687baa30371bc55f2a8bfdeb8e40fef44f67a87 /drivers/net/wireless/ath/wil6210/main.c | |
parent | 7dc47258a00d026ba1268133687b3b1940e36e58 (diff) | |
download | lwn-f13e0630826f961732f3192282a6c249bb6208c1.tar.gz lwn-f13e0630826f961732f3192282a6c249bb6208c1.zip |
wil6210: Do no schedule firmware recovery during reset flow
During reset flow, ignore firmware errors detected prior
to the actual hardware reset as the recovery flow would
make additional unnecessary reset.
Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/main.c')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c index de6e3c279f97..aade16b126c4 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c @@ -767,6 +767,8 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw) if (wil->hw_version == HW_VER_UNKNOWN) return -ENODEV; + set_bit(wil_status_resetting, wil->status); + cancel_work_sync(&wil->disconnect_worker); wil6210_disconnect(wil, NULL, WLAN_REASON_DEAUTH_LEAVING, false); wil_bcast_fini(wil); @@ -853,6 +855,12 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw) void wil_fw_error_recovery(struct wil6210_priv *wil) { wil_dbg_misc(wil, "starting fw error recovery\n"); + + if (test_bit(wil_status_resetting, wil->status)) { + wil_info(wil, "Reset already in progress\n"); + return; + } + wil->recovery_state = fw_recovery_pending; schedule_work(&wil->fw_error_worker); } |