Message ID | 20171113102815.11254-6-sergey.matyukevich.os@quantenna.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Kalle Valo |
Headers | show
Return-Path: <linux-wireless-owner@kernel.org> 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 6712D6029B for <patchwork-linux-wireless@patchwork.kernel.org>; Mon, 13 Nov 2017 10:28:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 341F329362 for <patchwork-linux-wireless@patchwork.kernel.org>; Mon, 13 Nov 2017 10:28:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2914A29368; Mon, 13 Nov 2017 10:28:46 +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 8F9E729362 for <patchwork-linux-wireless@patchwork.kernel.org>; Mon, 13 Nov 2017 10:28:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752320AbdKMK2n (ORCPT <rfc822;patchwork-linux-wireless@patchwork.kernel.org>); Mon, 13 Nov 2017 05:28:43 -0500 Received: from mail-sn1nam01on0085.outbound.protection.outlook.com ([104.47.32.85]:59533 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751391AbdKMK2g (ORCPT <rfc822; linux-wireless@vger.kernel.org>); Mon, 13 Nov 2017 05:28:36 -0500 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=GEbzS9PVFRtlT2TbVkhOJ9fuRjSS4vIfCZ+0+p7Cvp4=; b=ZL9VYpTH0cRnVk78yQGdBCthZM4PxyQRwci/Ugq+fKip7mfb2QA5X6JHIXGKvTFoGnKzY5QK0Ys7bNx90/X5la2dq2WIzP07IoIlObhSpQsksdI4sqLxIxwYvMAhoVDf1F7I8YqWpj3KSoZGNHoHimMUe+SunnaDafX7oPOWw10= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; Received: from bars.quantenna.com (195.182.157.78) by BLUPR05MB1924.namprd05.prod.outlook.com (10.162.224.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.239.4; Mon, 13 Nov 2017 10:28:32 +0000 From: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> To: linux-wireless@vger.kernel.org Cc: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>, Avinash Patil <avinashp@quantenna.com>, Vasily Ulyanov <vulyanov@quantenna.com> Subject: [PATCH 05/10] qtnfmac: check for passed channel being NULL in MGMT_TX command Date: Mon, 13 Nov 2017 13:28:10 +0300 Message-Id: <20171113102815.11254-6-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171113102815.11254-1-sergey.matyukevich.os@quantenna.com> References: <20171113102815.11254-1-sergey.matyukevich.os@quantenna.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [195.182.157.78] X-ClientProxiedBy: AM5P190CA0007.EURP190.PROD.OUTLOOK.COM (10.161.47.148) To BLUPR05MB1924.namprd05.prod.outlook.com (10.162.224.14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fad85095-5d1a-4cac-adee-08d52a814ac3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199); SRVR:BLUPR05MB1924; X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB1924; 3:p6/HEUbpAe7Kf0rwrYcsESgndi6MAeYybSVJ0rX1ZeZ7r3wWhiwuw/fsAYhC1dhZe8onfOED9lU57mGveOcTUvUB2sOQQIaURzbGdQaR/LGQ4yudixftNIcyIbbiyH/b/LLsS89bbGtP4MteQaJvCMvmTSHo4AkCimjq9O/J7IVhyoEsgDmOCuKRirvckm2bw1wAVaGkgfzrItuTiV8m1Qcu8kMUG5o4ZvC2LYJB+Dj5tl1Td5pOulf3xYqfwrrw; 25:IxIiQ20TNXKNtKLqReOyHgF6Aow6hbQEP7ogpCqNSjrNVP0R0nrS3l3x+xuCVqlE36y4dbl1NRevBT9qVi6hdkXqvYWsxrr98c+5nKexQIjWumj3S4GnIg0oH/+yMzUvGjMLFA4WY4127bQjRkQ5Wz2PkmtBF0cqiqQy73879DJ+mLP0lf1vpa7MPt8X6f2fUxMjneH3cHgOAJ+82kpcz80x/ifKCrLOGFv50YjfLbF8nGLGeQPxAQjCr1Fi12ixND3aii6HTYMwJLz4xzrzYCCbcxFWKRa+dMJihbXYV1eGcQWfuBmpLyH1NgJ82M8lVcY7cr9Q8bqFAScSsnygKLxeqT5qwmqzQMAIPoLAvws=; 31:b+WPQVQ3m/y3vml/nWoEWNDhyxlp8sXXffJkOkTlOEJyArjvhr5nfr2AJIZyKE5N9YCHT+uUJzg8OofDdu8v9SOdoIZKzCswUA6DVG0tu47OJD2Q8GOWIyNydMGsPGIGmSdWGcClJmFER191TN5iRoIX/K7GWhHqp6dcRJrfuu8q9VPFeF6CdOBzbphBNABKJ/yu3HtjqaaUXhUJjDYhgdRwBtEVwbaPFkJNfieoWP4= X-MS-TrafficTypeDiagnostic: BLUPR05MB1924: X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB1924; 20:RHFiwLioJB5dpMKsoUcXdfFJNeKI6aAJjRMlCW1L9otLFZXbjyhSG97jDv9kWFESjRsEYC97BCPaBMda4r9NLqEm7HOL69HN/tEVA8IIp6TA2WERKI7YFEiDfwLKmU0MlmLvDsvwBI1RaubhsBvGSt8BiM+mpj1u5X7PAT6S7Jt/ECMlbayF8w2C0xJSlT2rMkS1BPIy53S0ZGhkq3FUJevVkNw+eZR3FWdDRE0DquxrcCq2zdcMawTgovynAe8WpOxHhjNVcmSbOQO3K6us4oZoJLCQNOV3JWcDISgV1AMJMrHJtLiAC47xUoHSJxS4kvkGAum6USUAzTZSvkAtsXH1PvXNcsjA6XJYOPbOT7gCOKiY+RdHfkK8AubZt1f2U/crtmItARfX4adF/slWKdx6pCk7/HsgRVUhmmEUQWYh04vbHC3D3Pj+ja+KzeDr5VXcU7UMU84YIIYS2FrmuAKln6znAFmoBM0wZwhz8k1owQMErpwyDY91aQ9J838n; 4:RCm/wHWyp42rdj+uTxhfJjAaimrvDYMrvh96bQ8lS8QQwbWD9bqMseimh/YVZW+vHfjfQqppjNEddVOR7Fkf9GhztNqKO85OfLhZXPu/pL8odyW5ZNv724+mwYAvxXJd2X8DQpK2Y6SM8GfNMfbuwpVjcFX/2y+WojL//vISBDX5XdsRx0kQAYHIj7dLfu2qy38htIJYdj+ALSV8A7/v9F4zM2tTZJesNKqEHW5wG33zwj7rEmjKbPV3GM7/oqWhTD1Xzs19SFbhqvN6nIR+2w== X-Microsoft-Antispam-PRVS: <BLUPR05MB19247B0CC47F52A5583ACFF3A32B0@BLUPR05MB1924.namprd05.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3231022)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123564025)(20161123562025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR05MB1924; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR05MB1924; X-Forefront-PRVS: 0490BBA1F0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(39830400002)(346002)(199003)(189002)(5660300001)(107886003)(47776003)(105586002)(50226002)(54906003)(66066001)(53936002)(2361001)(76176999)(316002)(6486002)(6916009)(50986999)(97736004)(4326008)(33646002)(5003940100001)(106356001)(2906002)(6666003)(2950100002)(25786009)(101416001)(16526018)(189998001)(81166006)(81156014)(86362001)(8676002)(6116002)(3846002)(478600001)(68736007)(53416004)(48376002)(7736002)(50466002)(2351001)(16586007)(103116003)(69596002)(36756003)(305945005)(1076002)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR05MB1924; 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) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR05MB1924; 23:7awT1/sTfjjoagOANdU7gYyDsAZzzV3mJKZAHu4k1?= =?us-ascii?Q?IJAa1ghNkcYV7hSHt1nbPXnAHjKVicDhMFWevVMdpbZTgdTdUlT/js+qXx0s?= =?us-ascii?Q?Fp9q9tcFyajg3zJSGLE2ZIqxF9lej0jtGGtDbAThUHXHXXoF2l6TCUwOFsTq?= =?us-ascii?Q?0m765gisV+bqUoyTeJE73vsgZ0hfGVEJXjJlbL0vmzi2x/MSXZVZ4ZVI0FYH?= =?us-ascii?Q?o7tCi9lzSEXzXw5dKDdoSf8o9tBi7/4WyIbhlEiLs8BuQotrpegUmQffN/sZ?= =?us-ascii?Q?3hQak+nPIivc3trxfIEYncLJ0SJgdZdsccwQQmewwjHqt/fQHd9lPCTkwkdj?= =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sQUj?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB1924; 6:k+7DY0oh91koCnRMN2UNkFI5pAMjjBybdjiZXyl0uSziR0hxSaMtm/t7cVcT3EkBudrT/qN2lvEIpaCbAJVpBKYpqExmaJ9r2CAsgGB2R3XoF6QypRhxWr7yKgMnzxvxuvfapeexTdbSLaoMmdtUt3MX+3DSTpDzUngnCbcPeCcdlVrQxKMlvbB09kPP58ble65/+kh6irdgqGSIoPMyaQUU7zjW2+5MiAu+pRvB0AwgGdLE/POcLPG+BpEPeF2gdE3TNaqxOnEtFEW3zwtvfe3ri3RCppTRF4Pk+kfPGuzXQJloUEW7XQBkPclRt18vQYunWYBv/0P9x98ODK7d8gMvapS0PXCbF3/Uxgd94L8=; 5:sTTX4KFcGi62RepYPZ9gq4TOZ8G8fc/PDafRCBbtf1/uEiRZxhvaLpj4jIdJQ9f7fliqTYDYwRXT9KwI79DdUXyrS8ABXKJUo1umchjekbpt4OIT0dphAX2kMXeH2DUjAqlTblBFxk94w3FQ7YNUa2mzt6VQkw9AauxklQ5hBhQ=; 24:HMdbUwPprj89HAOnnAbFXVHkfNrYqyId3RkVCeN5rGuxU5IDYMUFbj97/u3NCKF4YkkrsDm20UvSscDZMY3ZaOvujOdIgQliSXq9t2hH7i4=; 7:A72qr55aqnsEN28Xk8kFkRGbpX0aAaCJa8IwjivLFPpGR7v8H2n7m0eXgP6EoJJ0K867OTtXLkNxYq8vUwbj8YSi2aom5JrH4Px2hGuddha0U3+W5QGsR5QbKwa2+HRcSGyx15f/167UGGWNZV/z7a10Fa9nho+vD8UyWIWSk3IHYrgyepCsg5ubV9sRggEzEeAmc+yIcdmjwdKu41HjoReNgSYQaA2eUErB1YjQUVFdQ31e3GbetQwKzrrarU6X SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2017 10:28:32.7841 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fad85095-5d1a-4cac-adee-08d52a814ac3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR05MB1924 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: <linux-wireless.vger.kernel.org> X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index a11278de678d..f5eb2cdefae2 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -381,6 +381,7 @@ qtnf_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, const struct ieee80211_mgmt *mgmt_frame = (void *)params->buf; u32 short_cookie = prandom_u32(); u16 flags = 0; + u16 freq; *cookie = short_cookie; @@ -393,13 +394,21 @@ qtnf_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, if (params->dont_wait_for_ack) flags |= QLINK_MGMT_FRAME_TX_FLAG_ACK_NOWAIT; + /* If channel is not specified, pass "freq = 0" to tell device + * firmware to use current channel. + */ + if (params->chan) + freq = params->chan->center_freq; + else + freq = 0; + pr_debug("%s freq:%u; FC:%.4X; DA:%pM; len:%zu; C:%.8X; FL:%.4X\n", - wdev->netdev->name, params->chan->center_freq, + wdev->netdev->name, freq, le16_to_cpu(mgmt_frame->frame_control), mgmt_frame->da, params->len, short_cookie, flags); return qtnf_cmd_send_mgmt_frame(vif, short_cookie, flags, - params->chan->center_freq, + freq, params->buf, params->len); }