From patchwork Thu Jul 27 23:06:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 9867675 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 325446038C for ; Thu, 27 Jul 2017 23:07:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25B3620001 for ; Thu, 27 Jul 2017 23:07:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A9BC268AE; Thu, 27 Jul 2017 23:07:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FDC420001 for ; Thu, 27 Jul 2017 23:07:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751678AbdG0XHt (ORCPT ); Thu, 27 Jul 2017 19:07:49 -0400 Received: from mail-dm3nam03on0053.outbound.protection.outlook.com ([104.47.41.53]:39360 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751524AbdG0XHr (ORCPT ); Thu, 27 Jul 2017 19:07:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quantenna.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=B8AuK+AY9SftyMd0hfkHYNuuOJQ+XMli07bbsdk8iBw=; b=PLPBe67JZLvyP7Su4tB7rDouwrCTPWDaLqvUGHYgBC0ZUcXpBkyXbfaqkmZLuCMSfCLA7gaDiTeTF/D6Q4oKQsKe/R4a0Y+R9VIgBoGElEWXJ1KQb5pvzmx17R1+QZkZJE3/CwrWvyxY/n+lA7Pm0JnazmPzIKK7yCT2qbSPgVg= Received: from bars.quantenna.com (195.182.157.78) by BY2PR05MB1928.namprd05.prod.outlook.com (10.163.32.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1304.10; Thu, 27 Jul 2017 23:07:43 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Igor Mitsyanko , Avinash Patil , Sergey Matyukevich Subject: [PATCH v2 09/12] qtnfmac: implement scan timeout Date: Fri, 28 Jul 2017 02:06:51 +0300 Message-Id: <20170727230654.30850-10-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170727230654.30850-1-sergey.matyukevich.os@quantenna.com> References: <20170727230654.30850-1-sergey.matyukevich.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [195.182.157.78] X-ClientProxiedBy: MWHPR11CA0019.namprd11.prod.outlook.com (10.172.48.157) To BY2PR05MB1928.namprd05.prod.outlook.com (10.163.32.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ddc8dde3-177d-4f4b-c9d0-08d4d5444ac9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254116)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR05MB1928; X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 3:/ZiWvy4kZocww9rVrFP91S9+EIj9W7A0pzfeWEo1hU8c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8juMmQvdVGny5tGaC10bhO2jGpuM69NDYbp9Trnk7aBLI3ygrFo2kSD?= =?us-ascii?Q?U/9CdUw6e2bFcEC1JnT+IskbWszJj2wX2xhVujducXrNTEOma55DnJYNgBjX?= =?us-ascii?Q?vVE5mctADnWD/PIXZmOVsWGY81e6TUNutRZCQO3pTpWIKpowWijjmgfeTcLH?= =?us-ascii?Q?mBokKBY7cx1i8D3dMAc5ffAD/j0UXIMJZGAwlr8kIHJum9CX5SNU+Zccgrme?= =?us-ascii?Q?p7DJAtYk1HhBowcsWu8E3SbTDFYOfjYuB+7RiAUgNBy8RUhlOW90guCUcW/k?= =?us-ascii?Q?F8xFM73rc/NCfY5AIDrYSqiy0S/mV0Vch8CI60E0cvcDFFaVxlCSGNC30sff?= =?us-ascii?Q?wwLEgH5sMsvfxDH/CkDJFv5y4IkUo06Jbrsz+r0sOC4Jm27/Hs5KTRIst/yc?= =?us-ascii?Q?2+/Zjme/0irEu9ZWelgxfj063KWvC37pcTSKBoY+KuHGkNy3D7yomc8Y5pKl?= =?us-ascii?Q?P2H066JuDDSk134vP9ofbHuRxRIFQJn/MwsAk4Ep3jwaxgZaTldueb5/VsnG?= =?us-ascii?Q?Z2itOgCFZxEpOdyxPh0kc49HY18lrFFXme34BDs6as/HlLJtzJED4QtWtvbr?= =?us-ascii?Q?Ho9fxsLbzamWLWFnTonZUpSS20T91eCc5yLapZTmOoovOspfSHQkPRUztPIw?= =?us-ascii?Q?6E2xCzoHRARCMbfCpwQvCsGl0dix4uWy7iDzlDduhSQKU9dhaDvJas3sdji8?= =?us-ascii?Q?+Cqkaf1Q2NiISOTp2C85fBgLswOepjN3022O4mUKSQGuAJKt3msOZStt2cVw?= =?us-ascii?Q?8VQ5Wv8cgZg9HYLyHgpQaTlVlYEwJAyErF071AN41nrov1t/l4KRirVBoZtK?= =?us-ascii?Q?lY=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 31:Jfebp7U90YTdCoGy62xyFQxRdub0dH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+UOJW8zyrGiC332PDCrPyZtqEn1XLkFMddIac9UI/Yq1ZwU4OQQz3vNwgJqJqyKlwVVlnmdA7XGwuGT0JvBNqlSQ7OIqdYUieTeshZB58+OzQgpv0el0XDotin X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6041248)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR05MB1928; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR05MB1928; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR05MB1928; 4:wUfMfYpVCm2uCIFpaIrKmNJ58BU0MtUaxDSkkzbXch?= =?us-ascii?Q?cQ5O+Xi2lhIYrcnOq2gQUq7uJanBZ9xoJnlqh589oSgzE6eI1TgBlwq5GX0/?= =?us-ascii?Q?Y+PffWLtn6gZ8A6faSo2XzV4CPiGmXsqWbLAk55eUPwG+EDwqWZMFyuHZ8W9?= =?us-ascii?Q?kPr2hfCvZSP9pLCBS1oR+Q/Bjg2YbDWGYllwDVcy7lAwgyvrj2z3KPtfpGL+?= =?us-ascii?Q?rJN0hPQGS70Od6hAd+qalAkqVcKqxPhynT9Dy5nnT4Ae9GeoLkUft0veaKjc?= =?us-ascii?Q?cvCSW5ZpDN2RMYkrhq8Vcl4B/CbJ7+m8SJuFFl8i19y3aca17s7fGqjPjZcI?= =?us-ascii?Q?jtpvmyJ6+MoeDURIcEeLjKSqjWncdKyYVwxBoDUx6nGtv9W/eU40aEo1QM3b?= =?us-ascii?Q?RjwLu5k2/fcdUNyRPMN/hzEpIgnybdtjW0ylnkBcsBMq2xGov8zA2UP5znji?= =?us-ascii?Q?B7JaEI/97a9gbwxQ8ZVVTogvnW+/BpSP6as+OYngZjwPQwERND6woBYioX5V?= =?us-ascii?Q?HILn5WTgSUGSHRQg+Vp2VYtKZy3fMffkBnABP4OeddzrtYu36ny9pBi49MAK?= =?us-ascii?Q?jMpGMX60+IDPRJFzjE0EWnZEVqt9tcy/Es8QPihrTBCOI48F5B/RvQbYHdsU?= =?us-ascii?Q?EmRTqTRxoFbPf5GSvK+cUL77vZYyoHCTS+fkUkTw71+9jREHATJuOQz2YzSq?= =?us-ascii?Q?IxJN139xYMFOTAoqrRQAbi7YOt8+hMUQG1MK+T5ZAA1ZDgxr/yfaQLcl1M1I?= =?us-ascii?Q?Q9ARQUGrZlTwU0Q1bAhuIEX6SEj4vPFNCT4yEOQuvJgTSpzfKbsvjCzBv8SA?= =?us-ascii?Q?H1QEOBLb2MVPo+j26r8iIpjDQtyjLQ8g7Ahk4FoAxsDmPncuOpUcRBSV6Ag0?= =?us-ascii?Q?6FoqD/3GHw9diqRJpx/LxiIBT6FtEVJSrzjFuylc7+jsR8KHgz1MotmaxNEQ?= =?us-ascii?Q?j+R4yusUvVpUpmirhQcnkoV/r874K+JTwOmu7/ahqWenIDwK/8Blf4kpiMa7?= =?us-ascii?Q?YcVUSFc+yCF+xAKBtJyBLgTef+ZVrJSpCLQI2jgK7veXWhredRWMjJuzrOh8?= =?us-ascii?Q?qaGqWIB1yyyjzhhE4AeL/kyigDmv+pqWGgpOtNHak0N37551Uo0liSeYZRQH?= =?us-ascii?Q?gOXbMkbgYLv69kBxnnrTS3FsXla0gZ?= X-Forefront-PRVS: 03818C953D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39450400003)(39830400002)(39400400002)(39410400002)(199003)(189002)(50226002)(66066001)(86362001)(110136004)(53936002)(107886003)(50986999)(38730400002)(4326008)(68736007)(50466002)(305945005)(7736002)(6916009)(2950100002)(76176999)(25786009)(478600001)(1076002)(6116002)(54906002)(6666003)(6486002)(101416001)(69596002)(3846002)(189998001)(103116003)(7350300001)(2906002)(5003940100001)(97736004)(5660300001)(105586002)(2351001)(48376002)(81156014)(81166006)(8676002)(2361001)(53416004)(36756003)(106356001)(42186005)(47776003)(33646002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR05MB1928; H:bars.quantenna.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR05MB1928; 23:oWMV+GZ1sZt3DyXicf5oqSqHxe+vyJf+WlkpuWnkV?= =?us-ascii?Q?xGp4xHN0SbipHCuBkNrxt225zX4lM0LQVy7FyFwpwegjqVn19PNsxuw4FMxa?= =?us-ascii?Q?L6uhOUb9H/AjL2kPB/S+ajC9e6skqht32975yvagHTqU0anwPQtj2lHg81NG?= =?us-ascii?Q?oyIpU/LmYgbAoi9QEpHK8QRL7K2Obufr7Gb/T/BDyA2/tG9uPb/atLNnhjSb?= =?us-ascii?Q?qhdzJO8geUBiHkk9Ko8JGy113tdugYXowtXUffJe+aeas3k0jjT1+RhCkl6/?= =?us-ascii?Q?sz0xFhRSA2dityDZbKhTpqlVNBlyfq0mGTsK8srHjDbDkGAD4Qk2StkZqSS+?= =?us-ascii?Q?dB0Sgn79nTCdYj/r5Xitio4TIpo02PeHv4nh5oWhQdEYVI4l9bcoioIBOXEJ?= =?us-ascii?Q?2W1PGTntfm5hppnZZzeQfJ4tg2qEd8dV+iYmrRi/GJKPx4q+qiH4nxWvUOC4?= =?us-ascii?Q?q7/vwrT5L1xLq5zOVXjbnDJTh750fr09mX8p66YL3uw7CmDu857MLGNTrFSf?= =?us-ascii?Q?eFyBWBy8+ENBX805qybFO+dnNHgZ1IBZTUlDUfKMVLl3iQmnHQAWw1PuqYoA?= =?us-ascii?Q?wJaZlz+gqJu563q8/M7oBCs3XIXCAAdNScUJmq6lDCUjau8Z2AOgqfPLABJh?= =?us-ascii?Q?bAAme34d0M+dw1DxVkjn12UFOK+0o5wpsPGguTq4kVJPmKvEzE7HPvIOA0r7?= =?us-ascii?Q?gwjUDvRMgYXHzt1piJ+DneJf+V9l+OpT0uC+5cBykQAitTdXssp57Z5Ge6gm?= =?us-ascii?Q?3d1UA2qjrCUfxXAhf5ztK85hqVyanLeGK3QPR4qwYb2zYjDfB+illjFPybCc?= =?us-ascii?Q?inZRkGUusueU50PwoOCYl3RJ7in2CHnnDkIIfHv6McNDduQogrKEJWltOYnf?= =?us-ascii?Q?Tbpc0Z0DpCqqjGNyIVgq1+7+dQrcYZOEAbdKfi6Qz2fBcSjxCkneURdRwYLX?= =?us-ascii?Q?Z8EZdunjUabIltUA/MRqxyxZvnaxjPorgUfbzxewuSaU1K3hcGxLeVNPS+rm?= =?us-ascii?Q?O6IoFHZVKVpwKJoaxjiEg1NTuhLxyNrt7lE+s0BQLiGjRtusQtjNrpLAMg4O?= =?us-ascii?Q?hBXswX4/fGlEvjpVi002fSjVy5PpNGJdHIApMG2RSmRHjre10DGp/isJArrp?= =?us-ascii?Q?jLmZHvC49FlPYLpY8AY6hL1TpeAg8N7uQxzqgM4fsZFdW/9J5WG+j4FRtMM4?= =?us-ascii?Q?1PF72dYcYvyyeG7mP8A5Z1BK8k09LJwy9D6QUtC31jIXG4MrdPpK0Y8cb0+V?= =?us-ascii?Q?pBThJFeoYdeJRmFtuBqOUrUAzHgDOLsNwG7W+lk1QsQN3XDOCras6b3EvIPN?= =?us-ascii?Q?vArm0Fcny3ghwswPSCWngC1/eQRHh5QZOI7N+LMSvDB?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR05MB1928; 6:BPJxx3Kk3+QlsYmjAYCopb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f6J+n5DXwZrBIC7w/1CujfUD6TrXR4uCmXGkIhmbVr0XekAGmjgLt2UBFKQ8Xx/P1crVbjj+2QOezHhrFIHuo+3JUy7PI6XsE//rLlYoQATRv7zSsBOtjIYeRUc0OefBt15muF4bkv52Fts1A1FtI1mkH8M+kYLnrGqQiB5kmIeDf1yL/4vEA+276cQiMldmM31CGcc3UZC315ZRWqTG3Fv67Jk81jULn2ozOr70gNiDTtinuLhB9Qqcn4M5KAZ2VRL7gzK0L+SejvdIvyAeXgt3exaWLrlZLnDdbHCMwv9T65QCBl1sKaXVNiLXmwaYlt53BEPFJhJzB+AAFkuaSkIKhlU/sS0WKo0NcXn1iatnTJV7RyVwB5Mx6IhUTQrI2/5qoY1EIHUUnTy2qabAJmhqz/gxTsIRxYkLUwl1eg9lGC1suHgyBeqXxE60M53MOtSS//b8+ot9SrpeRdYgC5fKYkOFk5anIfRaAbkgGb7t/4EIdWeHaFYienYUvf6OS9DyedpEe+NyeV+/K3c/cq1c/R6nv6mVWWpQjgoWh3hdMa/X9MzsQXoYRiz/dAreMHMVrcWoQDjEXG4MxbQQiu8ZkFcO0HrFKQtwderEAtkOm5js2nln6O5Qds= X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2017 23:07:43.7500 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR05MB1928 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Userspace tools may hang on scan in the case when scan completion event is not returned by firmware. This patch implements the scan timeout to avoid such situation. Signed-off-by: Igor Mitsyanko Signed-off-by: Sergey Matyukevich Signed-off-by: Avinash Patil --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 22 ++++++++++++++++++---- drivers/net/wireless/quantenna/qtnfmac/cfg80211.h | 4 ++++ drivers/net/wireless/quantenna/qtnfmac/core.c | 2 ++ drivers/net/wireless/quantenna/qtnfmac/core.h | 3 +++ drivers/net/wireless/quantenna/qtnfmac/event.c | 2 ++ 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index ac8fdc1db482..856fa6e8327e 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -579,19 +579,33 @@ qtnf_del_station(struct wiphy *wiphy, struct net_device *dev, return ret; } +static void qtnf_scan_timeout(unsigned long data) +{ + struct qtnf_wmac *mac = (struct qtnf_wmac *)data; + + pr_warn("mac%d scan timed out\n", mac->macid); + qtnf_scan_done(mac, true); +} + static int qtnf_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) { struct qtnf_wmac *mac = wiphy_priv(wiphy); - int ret; mac->scan_req = request; - ret = qtnf_cmd_send_scan(mac); - if (ret) + if (qtnf_cmd_send_scan(mac)) { pr_err("MAC%u: failed to start scan\n", mac->macid); + mac->scan_req = NULL; + return -EFAULT; + } - return ret; + mac->scan_timeout.data = (unsigned long)mac; + mac->scan_timeout.function = qtnf_scan_timeout; + mod_timer(&mac->scan_timeout, + jiffies + QTNF_SCAN_TIMEOUT_SEC * HZ); + + return 0; } static int diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.h b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.h index 5bd33124a7c8..6a4af52522b8 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.h +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.h @@ -34,10 +34,14 @@ static inline void qtnf_scan_done(struct qtnf_wmac *mac, bool aborted) .aborted = aborted, }; + mutex_lock(&mac->mac_lock); + if (mac->scan_req) { cfg80211_scan_done(mac->scan_req, &info); mac->scan_req = NULL; } + + mutex_unlock(&mac->mac_lock); } #endif /* _QTN_FMAC_CFG80211_H_ */ diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.c b/drivers/net/wireless/quantenna/qtnfmac/core.c index 17d17e332a8b..5e60180482d1 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.c +++ b/drivers/net/wireless/quantenna/qtnfmac/core.c @@ -288,6 +288,8 @@ static struct qtnf_wmac *qtnf_core_mac_alloc(struct qtnf_bus *bus, mac->iflist[i].mac = mac; mac->iflist[i].vifid = i; qtnf_sta_list_init(&mac->iflist[i].sta_list); + mutex_init(&mac->mac_lock); + init_timer(&mac->scan_timeout); } qtnf_mac_init_primary_intf(mac); diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.h b/drivers/net/wireless/quantenna/qtnfmac/core.h index 099aad76afeb..066fcd1095a0 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.h +++ b/drivers/net/wireless/quantenna/qtnfmac/core.h @@ -46,6 +46,7 @@ #define QTNF_MAX_EVENT_QUEUE_LEN 255 #define QTNF_DEFAULT_BG_SCAN_PERIOD 300 #define QTNF_MAX_BG_SCAN_PERIOD 0xffff +#define QTNF_SCAN_TIMEOUT_SEC 15 #define QTNF_DEF_BSS_PRIORITY 0 #define QTNF_DEF_WDOG_TIMEOUT 5 @@ -147,6 +148,8 @@ struct qtnf_wmac { struct cfg80211_scan_request *scan_req; struct cfg80211_chan_def chandef; struct cfg80211_chan_def csa_chandef; + struct mutex mac_lock; /* lock during wmac speicific ops */ + struct timer_list scan_timeout; }; struct qtnf_hw_info { diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.c b/drivers/net/wireless/quantenna/qtnfmac/event.c index 43d2e7fd6e02..0fc2814eafad 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.c +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c @@ -345,6 +345,8 @@ qtnf_event_handle_scan_complete(struct qtnf_wmac *mac, return -EINVAL; } + if (timer_pending(&mac->scan_timeout)) + del_timer_sync(&mac->scan_timeout); qtnf_scan_done(mac, le32_to_cpu(status->flags) & QLINK_SCAN_ABORTED); return 0;