Return-path: Received: from sabertooth02.qualcomm.com ([65.197.215.38]:63222 "EHLO sabertooth02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755191AbaHFHch (ORCPT ); Wed, 6 Aug 2014 03:32:37 -0400 From: Dedy Lansky To: "John W . Linville" CC: Vladimir Kondratiev , , Subject: [PATCH v2 09/13] wil6210: fix false "scan timeout" Date: Wed, 6 Aug 2014 10:31:57 +0300 Message-ID: <1407310322-22568-10-git-send-email-qca_dlansky@qca.qualcomm.com> (sfid-20140806_093241_103804_E1A91A09) In-Reply-To: <1407310322-22568-1-git-send-email-qca_dlansky@qca.qualcomm.com> References: <1407310322-22568-1-git-send-email-qca_dlansky@qca.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org List-ID: From: Vladimir Kondratiev When sending scan request, if hardware is not ready, scan timer was started and scan timeout mis-reported. Signed-off-by: Vladimir Kondratiev --- drivers/net/wireless/ath/wil6210/cfg80211.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index ee8a0e5..a00f318 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c @@ -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; } -- 1.8.5.2