diff options
author | Lazar Alexei <qca_ailizaro@qca.qualcomm.com> | 2016-08-18 16:52:14 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2016-08-19 13:11:19 +0300 |
commit | b0c0e688e523eba14abf21ac246b7dd88f5574fa (patch) | |
tree | 64fcb1c6e974030dd5029eec40a87782a65d1dd6 /drivers | |
parent | d35c2b6f8ffa75d430fd0fbbc5062f738c44f6e4 (diff) | |
download | linux-stable-b0c0e688e523eba14abf21ac246b7dd88f5574fa.tar.gz linux-stable-b0c0e688e523eba14abf21ac246b7dd88f5574fa.tar.bz2 linux-stable-b0c0e688e523eba14abf21ac246b7dd88f5574fa.zip |
wil6210: Fix driver down flow
Stations disconnection is executed as part of wil_reset so no
need to do it in wil_down.
Removal of the disconnect operation will also preserve the lock
of wil->mutex during the whole reset flow and prevent handling of
connect event while resetting.
Set wil_status_resetting in earlier stage in the flow to prevent
double resetting call in case communication with FW fails while
bringing the interface down.
Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/main.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c index bbc54ee9ad30..dd0ee7fe39bd 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c @@ -1035,10 +1035,10 @@ int wil_up(struct wil6210_priv *wil) int __wil_down(struct wil6210_priv *wil) { - int rc; - WARN_ON(!mutex_is_locked(&wil->mutex)); + set_bit(wil_status_resetting, wil->status); + if (wil->platform_ops.bus_request) wil->platform_ops.bus_request(wil->platform_handle, 0); @@ -1064,18 +1064,6 @@ int __wil_down(struct wil6210_priv *wil) wil->scan_request = NULL; } - if (test_bit(wil_status_fwconnected, wil->status) || - test_bit(wil_status_fwconnecting, wil->status)) { - - mutex_unlock(&wil->mutex); - rc = wmi_call(wil, WMI_DISCONNECT_CMDID, NULL, 0, - WMI_DISCONNECT_EVENTID, NULL, 0, - WIL6210_DISCONNECT_TO_MS); - mutex_lock(&wil->mutex); - if (rc) - wil_err(wil, "timeout waiting for disconnect\n"); - } - wil_reset(wil, false); return 0; |