wil6210: fix false "scan timeout"
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Wed, 6 Aug 2014 07:31:57 +0000 (10:31 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 25 Aug 2014 20:17:36 +0000 (16:17 -0400)
When sending scan request, if hardware is not ready, scan timer was started
and scan timeout mis-reported.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/wil6210/cfg80211.c

index ee8a0e588d6e8e8ddb216b595b01e0a2730069b0..a00f31881df94ba0068b40891afea709066090de 100644 (file)
@@ -311,8 +311,10 @@ static int wil_cfg80211_scan(struct wiphy *wiphy,
        rc = wmi_send(wil, WMI_START_SCAN_CMDID, &cmd, sizeof(cmd.cmd) +
                        cmd.cmd.num_channels * sizeof(cmd.cmd.channel_list[0]));
 
-       if (rc)
+       if (rc) {
+               del_timer_sync(&wil->scan_timer);
                wil->scan_request = NULL;
+       }
 
        return rc;
 }