From patchwork Tue Jun 20 19:55:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 9800149 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 A8710600F5 for ; Tue, 20 Jun 2017 19:56:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9ECBE223B3 for ; Tue, 20 Jun 2017 19:56:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9350228161; Tue, 20 Jun 2017 19:56:20 +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 04B1F223B3 for ; Tue, 20 Jun 2017 19:56:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752151AbdFTT4S (ORCPT ); Tue, 20 Jun 2017 15:56:18 -0400 Received: from mail-co1nam03on0062.outbound.protection.outlook.com ([104.47.40.62]:63680 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752117AbdFTT4Q (ORCPT ); Tue, 20 Jun 2017 15:56:16 -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=kjkjihLaZjs5khsBcKrWmdeOTR6M4rtyY1Z6ZlumFJE=; b=BYtPXh3xl+pic4pc2X+maxfF5IIzV87yLW7x4tBtSEOf62RRO03DNfMQrfn/DXM9rnkJWJmmGMIr2AjpenrUiJBGtyk6Lb5/V3JQahBbQ5GDTFIShhav7/WoRou4tNgIWzY43wWvYaOpzZRYvPcbvHkHYqZmTwihbj/BFdhqszM= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=quantenna.com; Received: from bars.quantenna.com (195.182.157.76) by CY1PR05MB1931.namprd05.prod.outlook.com (10.162.216.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.6; Tue, 20 Jun 2017 19:56:12 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Igor Mitsyanko , Avinash Patil , Sergey Matyukevich Subject: [PATCH 8/8] qtnfmac: implement scan timeout Date: Tue, 20 Jun 2017 22:55:17 +0300 Message-Id: <20170620195517.18373-9-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170620195517.18373-1-sergey.matyukevich.os@quantenna.com> References: <20170620195517.18373-1-sergey.matyukevich.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [195.182.157.76] X-ClientProxiedBy: HK2PR0401CA0005.apcprd04.prod.outlook.com (10.170.145.15) To CY1PR05MB1931.namprd05.prod.outlook.com (10.162.216.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c7f43005-4798-4215-b239-08d4b81668cd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR05MB1931; X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1931; 3:oWxX1q9d3+l0fwvBZ4f0TvBCSf0b7O98rlsQG9m1OivFWC17FXn/B3Zs0p7pwrg5R74dCDniEuS3u0GmaAnT/2LuDi+KiF0y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fYOkKsrSDUlGi6fD/kfGiQZ1ptzt1ueoVHN9sKg5D+qmhassV5gpLgv49ZTC3BIkOOYvVXI0rqsW2CYhHOzg5IG7E6KPE4mzptryMF+7cvCnZAfHyAKccSFGMIpQW2moC/5Nb/It6K0Jdrbfwl4auu9kBaryqTwR8tqSAoV8d8h+q2/5u1BO4trQm1X0L2Dbaw+nFFThr28uSOqbagYl09m509zQszxpxplfq3DfoN22O4vYfQgAXRLPLEQsluSVmnoROdVuuYOUeSt1E2ZEPSj1ZN3PGQvKm6iUigJuHTeGbyGyt7SgKIxU9A5bqxqKvFJzXdHk1pSXNtX2yNVmD0hKH6YrclImpTvUdwBKodqAyoQNq4+7k8FRUMdsttlEs6 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR05MB1931; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR05MB1931; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR05MB1931; 4:ZOiJ2a0nYp4lC2Z1NYnKHGful+R5uPDY2wwjWejckO?= =?us-ascii?Q?Qd5mwyntn/D2qX49oHsoajqghrWq+ZHAfWgU5KIc0DN2ukwcvvzsjtXPAmgv?= =?us-ascii?Q?OV9nZPXKgVFns5FD5ZI97cu1fqHXbZ9LDFEUrqc9nKBIkCXjcSOxykj3HxG4?= =?us-ascii?Q?w1UnZlZRHeJiMst7s4aetw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s3u?= =?us-ascii?Q?K5QopqzhY+iFC4Z8MoT08Qz3mEPwbMygoZ3PNg9oDb0iL9OjnJR1imI4nWD9?= =?us-ascii?Q?K89LedYqovGEvcw3K51b5NfvAjuBVH?= X-Forefront-PRVS: 03449D5DD1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39400400002)(39410400002)(39450400003)(39830400002)(6916009)(2950100002)(110136004)(107886003)(38730400002)(2361001)(53416004)(54906002)(53936002)(36756003)(2351001)(66066001)(47776003)(50986999)(189998001)(76176999)(42186005)(8676002)(6486002)(103116003)(305945005)(7736002)(4326008)(5660300001)(1076002)(50226002)(86362001)(575784001)(5003940100001)(48376002)(33646002)(478600001)(25786009)(50466002)(2906002)(3846002)(6116002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR05MB1931; H:bars.quantenna.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR05MB1931; 23:Ce+fz+aEH4tmhJWjrg3Tip2aMqeAkj4+ntIrVW7oK?= =?us-ascii?Q?R+LMz0u+5cjbUmVBXb0P6C+sqbZJasm0iIkCE94yGlXwG2Wg81Yq/NERh0n2?= =?us-ascii?Q?Vo3DQ9jrpa4meVFBlpqqMwokVLNCeCdfPNqb00RDoGRK2k2lZixXEKwwf7qV?= =?us-ascii?Q?c6PDMZwRhkiLRxSzcfsXsswjJL/+3sAbxsevM6fxPL2bmbOSx4u60os5lqxt?= =?us-ascii?Q?/g0xlr7UlngXWl0FRYUbQAqRPB51g6oqbS+NHzhDK2MQuUyR6szO27dGFSL7?= =?us-ascii?Q?hRvUxPoP0xiTpBRQ9BY50qst9mtRn6UZ8ymjZoLekIgscNS1lsY38DH8c3uD?= =?us-ascii?Q?VnMCVfFfsoGnMRiBsMn9ft8eR3x+7r66exwqS0qBeV8ee3h7Hjwnp3K9Xe2v?= =?us-ascii?Q?Z3Y9yWFHANQJ0rM9Za48mtuMVdCTXGSLr6Y0KRtOtSKVaOaq+3jSiQ49gI6h?= =?us-ascii?Q?TBao/gn779atWoCBL0+C4DeXbZCD7W/4ZY/gzLngh5lUZm2WevYmPamEHBJm?= =?us-ascii?Q?cnCKsGzHzq0/aoYwJO7yfVy+M6xI53DbCYsRpFQR/kbKUBK+dgBY62G6apkf?= =?us-ascii?Q?Cev43acMxyfKOLUJAQ0G+U9/OCF/+wloaWhpGsXZNcN+IGYq/u+Hvzyk9JlF?= =?us-ascii?Q?4tIyzcZ57lQ8c60yHoV4UamTGxR+OlgoS/R4mzh75bctjvB88MVm26vg6473?= =?us-ascii?Q?v04mtNtEHgZCp+Rat069Su7cXiAQHRAc3caMOllpjg+p4m1mddsJeRfpCoe/?= =?us-ascii?Q?n4Cv7TYWjJ4Q/pA0ZY0PX+VHZvW3RFkArStzLg/tM3jnnRIPv2aqDmE/r1wd?= =?us-ascii?Q?clvQLSuIsfw1PcOafEGX81buucawG8evs8YyQIajcsataEXlpIwa4UhFwadv?= =?us-ascii?Q?+sSZa+u/SLn5I1BxEN25qBmXqR47O037vp1J5YIYjDmsepuM2UuhaUCoCIFj?= =?us-ascii?Q?9An6tyu4FpEF1bB5CCPghuBbXxOccS9/GDkBF0kiK0l9VVy6z3Sp+qWKar3B?= =?us-ascii?Q?uF48k/Vy6PYGtNkdBDTvD4sbfCmrmqw1N+8YoHsdmSKZAhrYzFGR+Wvht/u6?= =?us-ascii?Q?gyDHpRTq0AzpgdxHMkFZ2VD+rEMddkQMiGn6XqEc9/I0cmqx3F2acCo7uYMF?= =?us-ascii?Q?S8K+tkIC5w=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR05MB1931; 6:yM9uVdR8RhiMHoKd+jDLEmttb9g6Z38C5VSmR1czSo?= =?us-ascii?Q?I8oADlFtUShwAUSwTcVSDYATsiUYQPGi1V+t0NWkLKIqvHl6JLIOMfFtiHUu?= =?us-ascii?Q?ZnN3RpRSuOzIvthk6yU5AGLoWhs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?Q?8=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1931; 5:dfTI5FyNuD7j8+0Rcf5bnCRbP6Hkc8cw6F1blsCRRcr+cIZhLmyQbTJMsTvHSnqDQtWAmQeTOHYf4e8MD4I6xpGrZIMIs7GcpdLX0e27E7rIt79umWoUVGzIBSa+gxAtFiWVjfblTm7U2vKKeGtKVuNCDTS06Nfwe2M+hLbXrAAmuIC/hm3TkJmyqBWXu64P7ul0Ttv8csKLBYBYjidYZw1FWWS9NSzAOVSGMiyrp74R0EaXOoVO60EOigiUolXsYcQGIpJKMA558lQOwXnx1RppZUsxNP/rB0MFJy9ajiOINRkHYp7xdcf2DgXeVJ4AqvvHL8WkMW/bCy08YGXZFxuBaIIHZpyF53m/UkbMhyW23k1UhanV4ASoX7VqFHp9J9cegKLWo/84uLz3XLoBANHqIy7SfrMG0P8hKXyWYgpTgXKjpHkXjOUOp0xh5U8HJChkV9ln0hZRT5LqBsndFL06ih+8RdEckMFGP+VW/nOyVjy7OI5cVBuZVPIBdca3; 24:/zbinr25Qhz2GdOWnCsD6nBd+9Y+tr228DCSeqOjENfRZdhSk4BG6vNnNZaLpKoMxcA1d/RpU0p3mX2x2MepQ3wXez3IR+bsE4tr3aW0CwU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1931; 7:ZIBzyx5S+4tP3O6twxFg8o4HdrqVt7hczYyT227/3TrrqY/KALJi3rknzk44fGEMXaPKecci1aOtxyvylbRJ1QLoKeSKcgHSGttS1E2vWrev23E+B7+OSI5g7QTOKNo4s7eD766xfunqPl3yoCzi3StdS6PkYAYzLU6JAMznzu/pDaXiSLbYnMUtfY5fo84ievBpR4kdDl3qQNfa3g9wfC9xJXLzqht2R96amngJ4i4BqC2cW0gHIJ5lQUaQ+Zncu9lb9YxRu99iv12Q4pfDEnbdEOXrXlLNKS3/GvcIHI9bXDoikT5L1kfI9DWv3nLy9runil1by/vmTHJCIebql0RKRzKdcBgJ90SzNhxOLSDWbfZXJutdHsKJOsTsHqWlQNAI5nnmhRPMjh8xGM0gmF/e7f3E8gdk2HDcm0yHK7GEVpLT1fl88yev1H9dlaKP0pMOQlnbc9rz2lD7Tc6yY/Q87K/hmNy5Jsg1DAWf5x2UDHmMuDy2kefxaL5glwWLM2jLWL7ZNJyOQFNR/MjAGydYs6tjL7apbdVWjfAAXzNCTyJwOfCy5K1pejb+ZO27QGcug7Zj14Gjlk/OoZjdW4kNDphle2/J8AAos1UNB6UIBeoOJ121qBjq/6Rwe+OuunID5f4gvHlkwwyQtgSOoX2xjep4c/+Fmr7FqQZ5t0IOOms42VGnxE/0M43mD94j6DR4bh1+Dx//Qf6d7XI23Pm4P1NHel4oMWATmksePBdpLwFGJCFgthWRr9RvxXhp3S0PyEy9EmTzsatF5M8mWmDk5LdQdAMBD/5VgLU7gfc= X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2017 19:56:12.6465 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB1931 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: Sergey Matyukevich --- 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 | 13 +++++++++++++ drivers/net/wireless/quantenna/qtnfmac/event.c | 2 ++ 5 files changed, 39 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 097f29189339..a0ab7d289684 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -741,19 +741,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..eddd040b8869 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, }; + qtnf_wmac_lock(mac); + if (mac->scan_req) { cfg80211_scan_done(mac->scan_req, &info); mac->scan_req = NULL; } + + qtnf_wmac_unlock(mac); } #endif /* _QTN_FMAC_CFG80211_H_ */ diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.c b/drivers/net/wireless/quantenna/qtnfmac/core.c index 3d9b217790ed..8ce9c370dc94 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.c +++ b/drivers/net/wireless/quantenna/qtnfmac/core.c @@ -336,6 +336,8 @@ static struct qtnf_wmac *qtnf_core_mac_alloc(struct qtnf_bus *bus, mac->iflist[i].vifid = i; qtnf_list_init(&mac->iflist[i].sta_list); qtnf_list_init(&mac->iflist[i].vlan_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 efe078a6d1d3..883b052ccb01 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 @@ -161,6 +162,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 { @@ -197,4 +200,14 @@ static inline struct qtnf_vif *qtnf_netdev_get_priv(struct net_device *dev) return *((void **)netdev_priv(dev)); } +static __always_inline void qtnf_wmac_lock(struct qtnf_wmac *mac) +{ + mutex_lock(&mac->mac_lock); +} + +static __always_inline void qtnf_wmac_unlock(struct qtnf_wmac *mac) +{ + mutex_unlock(&mac->mac_lock); +} + #endif /* _QTN_FMAC_CORE_H_ */ diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.c b/drivers/net/wireless/quantenna/qtnfmac/event.c index b48d9e8b6935..2c0d6095544f 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;