From patchwork Tue May 29 12:00:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 10435109 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 EDF27602CC for ; Tue, 29 May 2018 12:00:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE4EF2872E for ; Tue, 29 May 2018 12:00:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2BB328734; Tue, 29 May 2018 12:00:51 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, 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 6667A2872E for ; Tue, 29 May 2018 12:00:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933655AbeE2MAt (ORCPT ); Tue, 29 May 2018 08:00:49 -0400 Received: from mail-by2nam03on0088.outbound.protection.outlook.com ([104.47.42.88]:23410 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933613AbeE2MAj (ORCPT ); Tue, 29 May 2018 08:00:39 -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:X-MS-Exchange-SenderADCheck; bh=axUHOzzyFht9ppRBf62xdLSZbrgdugMsDRK9XCiczkY=; b=xJs7k1pF79cc5dGP5QGL28Fum2F6Kqx5gy7deyGPGBxZ8xjArL/ns1isjt5PhyjkmKSzVSz61Oi6FpXHiBWs4AJthrjPNSReFnwS3bRH2gSgU51FjTvEwjK7kVpH6zdnRmpfapreQn5/FigSQEldtYNeAND/nQMc6tFT37IKOss= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; Received: from bars.quantenna.com (195.182.157.78) by BLUPR05MB1923.namprd05.prod.outlook.com (2a01:111:e400:52ad::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.5; Tue, 29 May 2018 12:00:30 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Igor Mitsyanko , Andrey Shevchenko , Sergei Maksimenko , Dmitry Lebed Subject: [PATCH 7/9] qtnfmac: fix bg_scan_period parameter processing Date: Tue, 29 May 2018 15:00:03 +0300 Message-Id: <20180529120005.21498-8-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180529120005.21498-1-sergey.matyukevich.os@quantenna.com> References: <20180529120005.21498-1-sergey.matyukevich.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [195.182.157.78] X-ClientProxiedBy: AM6PR03CA0031.eurprd03.prod.outlook.com (2603:10a6:20b::44) To BLUPR05MB1923.namprd05.prod.outlook.com (2a01:111:e400:52ad::13) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BLUPR05MB1923; X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB1923; 3:5YTcVXhTl//AoDTGy5amZCu+LWQSsyvpM7N0F6+U7/Ss9rZCuxrXMRSPdINXPUw71xgFLWLL+TWrxaTtDs3XcL4Piddisws2plS4ueoHKdZJP4b0Q+M84M9OODzE/WgmsGT31gypoIYFgHriVdQeS53R5pbJR121UeNBBecquXx5OuX5e+suvS55pCibEro42uHtet9xDA0Q/7QrGmzamu16FN4rNQbciiIDf7UwYHnKbeP/DtCsKquxDjTdmbrN; 25:5aINAOkjufKRGLWFvcmZayidBQ9bAdWYu0G1S39bGNdt9RdL08YdQ8c6Yy5x0SOmrcV3/vf2xBvCAGw6uBMLKypl6doWelmktJDmhS1pLnAoN3Eah1nRgvDmPXwtif7n6/EviJaP1qndygxCDqgWIHCBxCIduLHmkGrzI3pA9Bi+WTJziD6Bl9QTnW9eAGbULIrbAKA2qh9qX4vHH6cyb3rqpHGUl7CrTTGOXw0x4Hu32FxNR8HVECzNMQPenmr0wTUWGsxtSbZS90uAiIyFo3loqQll04tCU//ZjS5qInoPbAprdjXeVkqclsaMN2FkoZIcxspJC1J/OBdoZ2nCWwGfvD2V/e2hZlwUj219T1U=; 31:M6R1TlPF4lz1st+2DzPfnJxwas/XVmmgKDCUsv8Mk17SglKDwUFtIFRgu95Gt7u/b1gbpuAV4wRwc2RAOWcJrFcBhD8s90a+ZEYehTH19HcIKIgJdSmBksX7QsrR9sYmYlWTDDGugnoEuMuUZpSnWSwFIvZNNAHhIJLirGUwtEprWrIBxJKy98GiqiRAb/vs2TtY1+FJLrJn9WesWKOZNquraeUCgrPJgJ4BIe518pw= X-MS-TrafficTypeDiagnostic: BLUPR05MB1923: X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB1923; 20:YGmmj2Ajn/OOhojjvn7mWc3VpbSSEyb5lj+UICvifWh+dM2D96B3Ph9kMQrRSZzORbVHZnJ6Wp62lFkRYuTIgmxJrTbatEH4BM5JLRRb4tDrPz20ZvrAING2gWGTpufidJkURdrFWDogzk8iR1MdzGNyEgrg0KmAXgCWEqX6B5IYJg+Y/Wkp+0jcSy29NiAJQcg9zAdQWd/1tQrpkDZJedu30za081WM7gInIDjNHLPx86b8ZOIlVbYUK2l96vfGN/bss6Q5l2l8yeyQj3+uIcf5XI36LZ7XZ/uakyU0ap+AGTaBkMor5l8t/j8RFJ/+xXphkukMwR5of7Rah9R1HHPM8BG6uYVUBXUy6RAtVPRH0MG7RTqd424AL4d/QVlEDJ3DwZztP8PNx7dEcTMBFV6l5yeeZTt/KOtGDtdR7LLkJFxyKGT4mTDX24weVmOx9K/xmVTHTb+baO/E1Fcr9VS7BUtCkL0Px6VZq7mj+EJu5tjenzFToZggIZCPEYZy; 4:5pM5ZqUpEInJxk+u8lxR+5bTuQ3RbMaZ1bXlN3Q4W3QydUiZr1l3qHXcl3TSb+cGxv4h5oc1YR5ea9I6kdZJdr3qwzPbnFvI3mf7iuPtQSbQqqR1aiCmznv6p1UssVllHsFpJYfuxkwDYUSs10beTDIGOGzxQ8jJ2udI6bqQWPPxey4+YF0Opg6Y1BTopKMamGIqFPZxgOOEugi3ntBBxKhVNxoquO0xRmhOw2qSwdLxxVwIu2goL1wr/9muB0hO1d6UM68Wmss39Esd/X5AsdWVMg3FRrYmCWR5Dahg6jGs8tQ7o+N/n/viLjc2HVlq X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(21532816269658); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(10201501046)(149027)(150027)(6041310)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:BLUPR05MB1923; BCL:0; PCL:0; RULEID:; SRVR:BLUPR05MB1923; X-Forefront-PRVS: 0687389FB0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39840400004)(396003)(366004)(39380400002)(376002)(346002)(199004)(189003)(2361001)(2616005)(11346002)(51416003)(956004)(50466002)(107886003)(50226002)(48376002)(97736004)(446003)(478600001)(2906002)(476003)(86362001)(106356001)(81166006)(76176011)(66066001)(105586002)(3846002)(47776003)(6116002)(7696005)(486006)(81156014)(316002)(186003)(1076002)(53416004)(36756003)(25786009)(26005)(16526019)(103116003)(68736007)(54906003)(52116002)(6916009)(5660300001)(7736002)(69596002)(6666003)(305945005)(8676002)(16586007)(59450400001)(4326008)(386003)(2351001)(53936002)(8936002)(6486002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR05MB1923; H:bars.quantenna.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR05MB1923; 23:i4/GnR4w31QMrNSFGJZnII71GaGKyy000WLrfxMT0?= =?us-ascii?Q?DIMctjhfGx+KAhN1cwB08jN73ORUoo3wNQ/ouk5KM21tOxWF1MPYWetj2ja6?= =?us-ascii?Q?7FyFGxfyW6OGU6jT8EQyUEE2s7AV/tGGxX6VOfcXoKO5715et4wQwsIaJHe9?= =?us-ascii?Q?stmbI0heRG9e5umSVGcA+bmFpQGzdWpqkYTBCRtHXsEz03l2cVY8J8Et5JuO?= =?us-ascii?Q?9NugaG8hSW/19kjWrkA9BYdk8e9ej2+EYf9YjjNemoc/8YuJJeAkBm+ygfen?= =?us-ascii?Q?Y0UxXVWn0psHilV5mm+tnLVaFQOITMTS/gDqCBIBtvzEszGzO59ODATiM5dP?= =?us-ascii?Q?DO2DWUIUV64bTE72J14pv+sIns4JKFRNYFvdFnvKK/cdXgVtqe6V/vSZElH3?= =?us-ascii?Q?2CvbRRX+m58cgw4zmTIFIX0EFs2X9WnaBe4zSHhOb/9akIP8IHPflqVPY9QA?= =?us-ascii?Q?SOtZW8RIEUL4v7zKJm1HS+MZ4sskfsTCnu0g/S7Je46VspwW1wk3M0DMchu1?= =?us-ascii?Q?H4qokgU9iZwqoDQo7AvHkSMWoQ8tXxc0lb1j72SVLeTIJF+LmSEs+bN+zpiK?= =?us-ascii?Q?m0N1SOl55iBoGJHfojFzwYdQaYzKiLyd7wf5T2EWmLJ4BG1KI543MY7heyL7?= =?us-ascii?Q?HBFpToUrgcLMTEjBPWVImpN/uLayMhWuqpOvreZGbI9uX8d+/7TEovljsdUf?= =?us-ascii?Q?RH2QPBusEwsZ6kp1pqSgSZhQEkOvVoxd4BmhywafuuSguxU32La9jlS2y0Af?= =?us-ascii?Q?3MSGkC45hnwnQHgA0C/kmhSymaQaRgAn8QiZyZk/ngVHNdf2v5QZp4HwoVEN?= =?us-ascii?Q?hTHyHn4cCw4ynOsTuMNuurHS9ow48EqpxoSJK69V0KLah8dQSFicCMfWJqCa?= =?us-ascii?Q?BevL5T2RS97iALEUyf0LT7hlB1PuB8EKW8aLe6UqF5+rvPvVfXbY0kDb/Izf?= =?us-ascii?Q?FJq/hx5/Pig2sFWiLzGd5g4KugwsAFjmJQ5pS2pNeCxM+9DUp/7ByHZ5yLPe?= =?us-ascii?Q?Etvp/ALEUJaQ+lSrrJwC7SmWK0laepUP+feA5yQXumJvlFykDjraIHjrW2yl?= =?us-ascii?Q?1fZX8OA/otBCVgdGv/Y4Ptws57HaKUp4FrsmLCGROTOU7paXaXn6f8J+jhXU?= =?us-ascii?Q?jbP68ezQmoMP1UQCQaIGTNLGTJY18LNatSODJh2oudWbgSjYgUDjj89nRxDJ?= =?us-ascii?Q?m14k9NjzAEk1aoKhq+l76cB/0zIW7UHz/RKKUCTkCh8elmeH6HlSjW6XX+wB?= =?us-ascii?Q?ZwEYzSzh9ppjdqoF1WKGfF3bplbqxP/xQ3iCxcNNpNUwb+Ypg2SZkxI6zf1T?= =?us-ascii?Q?URrXHAXbRyezconWv6jRqA53MvR70seLtV2d3RlEw9FjI/jO95tDYqX25PoY?= =?us-ascii?Q?+zXSw=3D=3D?= X-Microsoft-Antispam-Message-Info: l+np+7vDkSjx036x26rhOnn4MU5fD7HICPOdUnz73jxqRvitBh6JWZINqbhEKoCP+Sx46XdJ2/IB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zXWyv1tMTzaL8mDjbEEDOMAl50hfzcVd8PcFwK4sTOidSjJzS+m8uoB3n4gG8upZ+p/Ie2IRt/UQAHAhVD/EtCqyr4fMDFctbUzhlcuw4b/eaCvzrD6GcGDcUal2TJvkdx5IEPaolozlcBcKB1054UsDQ9tTET0SGvOOGrt0Wu/aDsxRrWdeD9o X-MS-Office365-Filtering-Correlation-Id: b073082a-fa7f-4739-7642-08d5c55bc6e4 X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2018 12:00:30.2661 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b073082a-fa7f-4739-7642-08d5c55bc6e4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR05MB1923 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 From: Andrey Shevchenko Do not process bg_scan_period parameter in qtnfmac driver. Pass correct values as is. In the case of invalid values pass default value. Leave further processing to firmware. Signed-off-by: Andrey Shevchenko --- drivers/net/wireless/quantenna/qtnfmac/commands.c | 8 +++----- drivers/net/wireless/quantenna/qtnfmac/core.h | 2 -- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index e2fc57be1cdd..5eb143667539 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -2339,13 +2339,11 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif, else eth_zero_addr(cmd->prev_bssid); - if ((sme->bg_scan_period > 0) && - (sme->bg_scan_period <= QTNF_MAX_BG_SCAN_PERIOD)) + if ((sme->bg_scan_period >= 0) && + (sme->bg_scan_period <= SHRT_MAX)) cmd->bg_scan_period = cpu_to_le16(sme->bg_scan_period); - else if (sme->bg_scan_period == -1) - cmd->bg_scan_period = cpu_to_le16(QTNF_DEFAULT_BG_SCAN_PERIOD); else - cmd->bg_scan_period = 0; /* disabled */ + cmd->bg_scan_period = cpu_to_le16(-1); /* use default value */ if (sme->flags & ASSOC_REQ_DISABLE_HT) connect_flags |= QLINK_STA_CONNECT_DISABLE_HT; diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.h b/drivers/net/wireless/quantenna/qtnfmac/core.h index 3b884c80b6ab..214435448335 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.h +++ b/drivers/net/wireless/quantenna/qtnfmac/core.h @@ -44,8 +44,6 @@ #define QTNF_MAX_VSIE_LEN 255 #define QTNF_MAX_INTF 8 #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