|
@@ -150,6 +150,15 @@ static void wil_connect_timer_fn(ulong x)
|
|
|
schedule_work(&wil->disconnect_worker);
|
|
|
}
|
|
|
|
|
|
+static void wil_scan_timer_fn(ulong x)
|
|
|
+{
|
|
|
+ struct wil6210_priv *wil = (void *)x;
|
|
|
+
|
|
|
+ clear_bit(wil_status_fwready, &wil->status);
|
|
|
+ wil_err(wil, "Scan timeout detected, start fw error recovery\n");
|
|
|
+ schedule_work(&wil->fw_error_worker);
|
|
|
+}
|
|
|
+
|
|
|
static void wil_fw_error_worker(struct work_struct *work)
|
|
|
{
|
|
|
struct wil6210_priv *wil = container_of(work,
|
|
@@ -248,6 +257,7 @@ int wil_priv_init(struct wil6210_priv *wil)
|
|
|
|
|
|
wil->pending_connect_cid = -1;
|
|
|
setup_timer(&wil->connect_timer, wil_connect_timer_fn, (ulong)wil);
|
|
|
+ setup_timer(&wil->scan_timer, wil_scan_timer_fn, (ulong)wil);
|
|
|
|
|
|
INIT_WORK(&wil->connect_worker, wil_connect_worker);
|
|
|
INIT_WORK(&wil->disconnect_worker, wil_disconnect_worker);
|
|
@@ -280,6 +290,7 @@ void wil6210_disconnect(struct wil6210_priv *wil, const u8 *bssid)
|
|
|
|
|
|
void wil_priv_deinit(struct wil6210_priv *wil)
|
|
|
{
|
|
|
+ del_timer_sync(&wil->scan_timer);
|
|
|
cancel_work_sync(&wil->disconnect_worker);
|
|
|
cancel_work_sync(&wil->fw_error_worker);
|
|
|
mutex_lock(&wil->mutex);
|
|
@@ -411,6 +422,7 @@ int wil_reset(struct wil6210_priv *wil)
|
|
|
if (wil->scan_request) {
|
|
|
wil_dbg_misc(wil, "Abort scan_request 0x%p\n",
|
|
|
wil->scan_request);
|
|
|
+ del_timer_sync(&wil->scan_timer);
|
|
|
cfg80211_scan_done(wil->scan_request, true);
|
|
|
wil->scan_request = NULL;
|
|
|
}
|
|
@@ -540,6 +552,7 @@ static int __wil_down(struct wil6210_priv *wil)
|
|
|
napi_disable(&wil->napi_tx);
|
|
|
|
|
|
if (wil->scan_request) {
|
|
|
+ del_timer_sync(&wil->scan_timer);
|
|
|
cfg80211_scan_done(wil->scan_request, true);
|
|
|
wil->scan_request = NULL;
|
|
|
}
|