From patchwork Thu Jul 27 23:06:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 9867673 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 362D36038C for ; Thu, 27 Jul 2017 23:07:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2868020001 for ; Thu, 27 Jul 2017 23:07:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D0F0268AE; Thu, 27 Jul 2017 23:07:50 +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 08C3720001 for ; Thu, 27 Jul 2017 23:07:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751668AbdG0XHr (ORCPT ); Thu, 27 Jul 2017 19:07:47 -0400 Received: from mail-dm3nam03on0048.outbound.protection.outlook.com ([104.47.41.48]:1585 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751635AbdG0XHo (ORCPT ); Thu, 27 Jul 2017 19:07:44 -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=kPPmr6dQtsmROx3zTy44HjnwHZcoRiKL8TQGiR6QgC4=; b=TXGhKn60zxJ0Z5NYD/C2YVTt++vJXpzzjz6A2gTTa7p3d2nmuRacoMV8vMV4FzEbrIJawXUa7nFpdrYV83ou8aUE5PPMb3gUyFdQ7uo1EJ1zTaHbdJk0KeAUihAMzGEDlbWdYa4c7ymXzGzdEptxNSAPM0wiETANr7snivV0v5E= 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:40 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Igor Mitsyanko , Avinash Patil , Sergey Matyukevich Subject: [PATCH v2 08/12] qtnfmac: implement cfg80211 channel_switch handler Date: Fri, 28 Jul 2017 02:06:50 +0300 Message-Id: <20170727230654.30850-9-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: ae5dc8a6-25d4-494b-9c9e-08d4d544493b 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:6Z0weuqYX12cyP5udNW/aAwdKo0pqx3JZ2ma7no3QX332rinngF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kCXBC4PvPUlxpHSrCZD4wmNWd5UItJ9omjPA1IYuTAx1zqn0Ne58uaTV?= =?us-ascii?Q?dgEgIaDn+HNENgSiaaSBoIRmw+dopnPGDRFoEYd1ij2q7hvlWKkEy/7P6nXG?= =?us-ascii?Q?htY33jA66NtDxCZkIOBhtoP2WG3viRRyWXkZyzw7WGpveulnDUI6RD/3QAKe?= =?us-ascii?Q?fQEjV8cW6fZmESENt2/Sqe+jAb6L18BvBwwm9BK97yjd6RdILIBZNoEeuwVe?= =?us-ascii?Q?QmIuHDYTtq80ZM0h/ofT4z8RWx0YXPVVvD1yBN2/kBeAVBjz9MDDYD7YXflW?= =?us-ascii?Q?2jO4ja48dDsBfRHiklFPYeZcldKcsr0sdkTclsricGjikT5JwolyHUk/LdIi?= =?us-ascii?Q?p4Qy6KFJkixyK+emHW+kfcayIw7mcylbKEWVHWqvBgq9xdHVi9wGafPU1dco?= =?us-ascii?Q?wIvAiB1SP/NQFHW1exmn5CvEcgFFg1a20Dh3ipM205Y7biOFxvFgSAROD8kd?= =?us-ascii?Q?P77Bi1OphfbtqPoE7ZvRCMnMj+nHMT5lFWB74l4erUVg6fmp5A8v22tCdind?= =?us-ascii?Q?aO9ev+bbv2F5LtOY/jIwQVZvv4pyvWmsBmVWTpfUSM0B1zHxLWBQObJTNLxL?= =?us-ascii?Q?StcgCSH6PHhbenB8BKhFIjwfrwuyviSJ91lrk+CEHX/4+cy8BIgzoCL1TVMS?= =?us-ascii?Q?+aaB1mWVvdKQXrAv3Exp0j9r/vm0VBjSUnTRST3GCBPE4leNjfjVQznWBIHq?= =?us-ascii?Q?dDAVPC+mFtSyas1mrdh/Iw4v4MlDZfMXAIN/5msJXUkV0Sp8FpsvvtC3rjgN?= =?us-ascii?Q?OrbOUZ2rW7MaefLwFnYdhlU31ZFL4fUkYhhHfchv9Pdln0aI0Hi8bgzIYN2L?= =?us-ascii?Q?1M=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 31:/cUe9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qMOupMk3ak4iENrWK3pujfXW0Gg9QpJCUXXAl4ENXPJo5uCbA9FxPHcDfBKaglQgGXrBx7SlWkXeYzJKetx/WDLgVdXIAMCrLYZ+pchKZSZD1EyURn9L7Y8rXidrwDVxUXzyOabgM6NajlEuwpzLboN5zsYvwMWB/ X-Exchange-Antispam-Report-Test: UriScan:(21532816269658); 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:9Qtd2faxCt2YmHbthj3SUcEEo5XuxQvaRZXS6g/h0S?= =?us-ascii?Q?I2u+jWtAXcRSHHzpF+ANwmmefAEbdtBEc+PgD+eJiMHOixu5Vc83VvKQXWFd?= =?us-ascii?Q?KcTZxxqi801bedM5MTEsV48tLcMdfey5XmVxNeD5PBzqojTf3u/4MSGW+F7d?= =?us-ascii?Q?aoEb8E9jSqhBxvSa0r6yEjqjxnJbtPZbHG42PqLXGNoRvMfzO/ZxtCYYdQuh?= =?us-ascii?Q?JPSfjTXDJo5mEkRiiWhH7t5UBJeosH3yxv/CO6WSxDNpiAnknQ3AIdcX8SE8?= =?us-ascii?Q?fTGVQfRxYuIsDKxjtAT9HZn3Q5NVQvFD8mqYZxIcVVxFfXmxCwAS3g/jHNdj?= =?us-ascii?Q?LtdMZLy1xrM1z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-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39450400003)(39830400002)(39400400002)(39410400002)(199003)(189002)(50226002)(66066001)(575784001)(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:SG9z7CVyaQXKwedGdAWYqtJKx3g8vQ+e801viHVpw?= =?us-ascii?Q?CitxHJxfd2TbX8crc33msavGd7VwjNmEgaqMvHLu6veAbrySZP77u54SMNip?= =?us-ascii?Q?CKVuWliobdotXeMbvR4XO1yleWgbcAtt+vmVtQEoAdgwFZSAwUrRKZm23ve7?= =?us-ascii?Q?tLSeQxmtXaBVx9eUoREMNbaDobI6vmRMB+ULV6nU4FPTLDPQOVBm91jf0MJ9?= =?us-ascii?Q?ADL/37WAfemQHXgFnOLSx6Jmc+BSr632q/FvNp2/nyqvAdhYhhj6fUXjo+vl?= =?us-ascii?Q?wpkRj2Bfx9Qq8wNNwugOmHYX/aCNjhWPbGk4DaNn97X/cROSxGcPWWvQCIP9?= =?us-ascii?Q?498SQleWUBpwZ6ySvUasnXTPEL9+dknllFQsJ187hiWjwPJP99sp2Um+bBGt?= =?us-ascii?Q?C8vqOh4qRsdiM5Zu3vZ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u4+Wen8?= =?us-ascii?Q?6AbPJZtCKiKZ0TgWUMX/PutCGNwtkLmRAi8Rt57Dag6iASL4coHA8iu6BdMV?= =?us-ascii?Q?/ide35RevleIpNDxnmHBQsJ8jrlyKKRWt1EVlXf5zdmi45QCPQ9z/8rxkQgk?= =?us-ascii?Q?4lU3vW8ucI4sz9k7RjUBLTnxxpEbJ/RC9q9dWW4+D440LyRnoMrQ1BEe05FS?= =?us-ascii?Q?/sdZBKw2sRwrv01xxThs2sHAAM1hUe96MRRmEC2IoEEhB1kXh0VNSq8ia+in?= =?us-ascii?Q?g=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 5:aATkVhzI25cxwbovHfIBiuAlfWVNIvGtAcSi53DEBAyOwIkCKNO4oaADdWUeRBHTMEbf4/504fSd6qPZzlAJcOipYvU87y8vJROGPgwOldhOUR3EEVfU/Os8mohHH2DbgC5WK4ShAiuZOYps52arsywWqovkemotPUboLqIScZ0ttFN4e7TIuFbWS2PmQuIMPcy6VmBzlGXBEsDouN90Md0VEmOHDYj+s+YEmWp78koTVC5eIS1f21VnarULPLmF6fHuI49WJt0nBbqb+X+sJWM/VIQKWMt48yx2jhC8U6nPrYuakHoOrGsy1/fpT2/Nb2a47k7/Z5WQUBcSOGIiAB6YHvxl5xVCeiNXwVr0mxEL36IlXF9taeE4kQme//p7ZyxZUc4Fe9C4act+TM16ocoxZP9XIkXYL4KefAH6QcLmM26nUFbgPwkUkkpBM1dLz0kZcACIy0Z/E7VBCLdSDRVHpt+0nMXnzZ4puVXa7OunWjR/AScBqyU/N1Vz/Z/x; 24:xkoFStAY+vH3iYC9X1mWf9GV9mgdN7oj3ADprE0BFjegw8WDHpjbe0MXIpvPOOfYy1kK1XRqH7MXSac9e64W5lCUscQlE8xIP5M0KuvACP0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 7:OafIFdIkGr4uqYsnZxbcLRGqFg+pv9ZP+mkmato15VMNzA05EX70jr+kCjSszz+S3lW/lLPcvIUmm9aRdnak6Lw6ADgV6iKSJKRWhmlMPl+14bKNjD2o53cV5wc8ccFLqZgtbUHp0FO0RsgCHRGQLzdGv3tlBk6eqXb6VM607UHaRlZojwsiDBrEMO6KMlbSqQa1p3agMbs7k/iNQ8OGRIXOEKFnShJ3K8xrLjSxdHgKmDCTP1RYJJfv9Su7AalMQWG4EdmWaWlaqNIULJGBjARTibOm8vg5pAS9Mo+YH14gKFNXdpL7bs/WxsTu8LxIrBed8Judx9XBEZqf0JRqPr52QowV+rmhFOGHYnxCBkIBWPEZiNuPWlu9HDIhxqJhuh3pLgUwJIFiuZxiIf+T+mNlaeHDa1YRNhnZCduKXkOUPLAhKY3aVGjewVWc2Phzn5xU24CZhU1EbI9PObk6H7ubGVxftuzdJpizPVZvA6hB8qvwGuOZHMkTTp8up3VepIlLq/0pb+KQoFqfsNwFG0mWRGeQ2RovV5h9a6UiXG0F52QXzrHq9AvT8dhGcJUAjxZhiCAA0p9WX+beEm/mcYAdkU1oW6Us05oz8WzwpEmkAnTZPFPAluurZZETsyv8tXY7d7QrjlxH3pm/8d7f+sTQl2xwZ8aC3x3CnzyEJO4JgrEDS0SazAi/HHa9H+AqQ/kFxgIhq7WocykevYX0ezqq5lGrj7N919+9Pk+KU4fkf/VV3s+uDUWjaexaZTL9ttguvVY+wrjndsPbuDYa/1F/dLCK6hi0ExLI1NNtDHU= X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2017 23:07:40.8905 (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 This patch implements cfg80211 channel_switch handler enabling CSA channel-switch procedure. Driver performs only basic validation of the requested new channel and then sends command to firmware. Beacon IEs are not sent since beacon update is handled by firmware. Signed-off-by: Igor Mitsyanko Signed-off-by: Sergey Matyukevich Signed-off-by: Avinash Patil --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 60 +++++++++++++++++++++- drivers/net/wireless/quantenna/qtnfmac/commands.c | 55 ++++++++++++++++++++ drivers/net/wireless/quantenna/qtnfmac/commands.h | 2 + drivers/net/wireless/quantenna/qtnfmac/core.h | 6 +++ drivers/net/wireless/quantenna/qtnfmac/event.c | 61 +++++++++++++++++++++++ drivers/net/wireless/quantenna/qtnfmac/qlink.h | 28 +++++++++++ 6 files changed, 210 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index d47050934f00..ac8fdc1db482 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -812,6 +812,59 @@ qtnf_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, return 0; } +static int qtnf_channel_switch(struct wiphy *wiphy, struct net_device *dev, + struct cfg80211_csa_settings *params) +{ + struct qtnf_wmac *mac = wiphy_priv(wiphy); + struct qtnf_vif *vif = qtnf_netdev_get_priv(dev); + int ret; + + pr_debug("%s: chan(%u) count(%u) radar(%u) block_tx(%u)\n", dev->name, + params->chandef.chan->hw_value, params->count, + params->radar_required, params->block_tx); + + switch (vif->wdev.iftype) { + case NL80211_IFTYPE_AP: + if (!(vif->bss_status & QTNF_STATE_AP_START)) { + pr_warn("AP not started on %s\n", dev->name); + return -ENOTCONN; + } + break; + default: + pr_err("unsupported vif type (%d) on %s\n", + vif->wdev.iftype, dev->name); + return -EOPNOTSUPP; + } + + if (vif->vifid != 0) { + if (!(mac->status & QTNF_MAC_CSA_ACTIVE)) + return -EOPNOTSUPP; + + if (!cfg80211_chandef_identical(¶ms->chandef, + &mac->csa_chandef)) + return -EINVAL; + + return 0; + } + + if (!cfg80211_chandef_valid(¶ms->chandef)) { + pr_err("%s: invalid channel\n", dev->name); + return -EINVAL; + } + + if (cfg80211_chandef_identical(¶ms->chandef, &mac->chandef)) { + pr_err("%s: switch request to the same channel\n", dev->name); + return -EALREADY; + } + + ret = qtnf_cmd_send_chan_switch(mac, params); + if (ret) + pr_warn("%s: failed to switch to channel (%u)\n", + dev->name, params->chandef.chan->hw_value); + + return ret; +} + static struct cfg80211_ops qtn_cfg80211_ops = { .add_virtual_intf = qtnf_add_virtual_intf, .change_virtual_intf = qtnf_change_virtual_intf, @@ -834,7 +887,8 @@ static struct cfg80211_ops qtn_cfg80211_ops = { .connect = qtnf_connect, .disconnect = qtnf_disconnect, .dump_survey = qtnf_dump_survey, - .get_channel = qtnf_get_channel + .get_channel = qtnf_get_channel, + .channel_switch = qtnf_channel_switch }; static void qtnf_cfg80211_reg_notifier(struct wiphy *wiphy_in, @@ -981,6 +1035,7 @@ int qtnf_wiphy_register(struct qtnf_hw_info *hw_info, struct qtnf_wmac *mac) wiphy->iface_combinations = iface_comb; wiphy->n_iface_combinations = 1; + wiphy->max_num_csa_counters = 2; /* Initialize cipher suits */ wiphy->cipher_suites = qtnf_cipher_suites; @@ -988,7 +1043,8 @@ int qtnf_wiphy_register(struct qtnf_hw_info *hw_info, struct qtnf_wmac *mac) wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME | WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD | - WIPHY_FLAG_AP_UAPSD; + WIPHY_FLAG_AP_UAPSD | + WIPHY_FLAG_HAS_CHANNEL_SWITCH; wiphy->probe_resp_offload = NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS | NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2; diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index a3c3dddb194c..524269d2c30c 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -2283,3 +2283,58 @@ int qtnf_cmd_get_chan_stats(struct qtnf_wmac *mac, u16 channel, consume_skb(resp_skb); return ret; } + +int qtnf_cmd_send_chan_switch(struct qtnf_wmac *mac, + struct cfg80211_csa_settings *params) +{ + struct qlink_cmd_chan_switch *cmd; + struct sk_buff *cmd_skb; + u16 res_code = QLINK_CMD_RESULT_OK; + int ret; + + cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, 0x0, + QLINK_CMD_CHAN_SWITCH, + sizeof(*cmd)); + + if (unlikely(!cmd_skb)) + return -ENOMEM; + + qtnf_bus_lock(mac->bus); + + cmd = (struct qlink_cmd_chan_switch *)cmd_skb->data; + cmd->channel = cpu_to_le16(params->chandef.chan->hw_value); + cmd->radar_required = params->radar_required; + cmd->block_tx = params->block_tx; + cmd->beacon_count = params->count; + + ret = qtnf_cmd_send(mac->bus, cmd_skb, &res_code); + + if (unlikely(ret)) + goto out; + + switch (res_code) { + case QLINK_CMD_RESULT_OK: + memcpy(&mac->csa_chandef, ¶ms->chandef, + sizeof(mac->csa_chandef)); + mac->status |= QTNF_MAC_CSA_ACTIVE; + ret = 0; + break; + case QLINK_CMD_RESULT_ENOTFOUND: + ret = -ENOENT; + break; + case QLINK_CMD_RESULT_ENOTSUPP: + ret = -EOPNOTSUPP; + break; + case QLINK_CMD_RESULT_EALREADY: + ret = -EALREADY; + break; + case QLINK_CMD_RESULT_INVALID: + default: + ret = -EFAULT; + break; + } + +out: + qtnf_bus_unlock(mac->bus); + return ret; +} diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.h b/drivers/net/wireless/quantenna/qtnfmac/commands.h index 41e2d50988b7..783b20364296 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.h +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.h @@ -73,5 +73,7 @@ int qtnf_cmd_send_updown_intf(struct qtnf_vif *vif, int qtnf_cmd_reg_notify(struct qtnf_bus *bus, struct regulatory_request *req); int qtnf_cmd_get_chan_stats(struct qtnf_wmac *mac, u16 channel, struct qtnf_chan_stats *stats); +int qtnf_cmd_send_chan_switch(struct qtnf_wmac *mac, + struct cfg80211_csa_settings *params); #endif /* QLINK_COMMANDS_H_ */ diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.h b/drivers/net/wireless/quantenna/qtnfmac/core.h index 6830ff45976d..099aad76afeb 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.h +++ b/drivers/net/wireless/quantenna/qtnfmac/core.h @@ -88,6 +88,10 @@ enum qtnf_sta_state { QTNF_STA_CONNECTED }; +enum qtnf_mac_status { + QTNF_MAC_CSA_ACTIVE = BIT(0) +}; + struct qtnf_vif { struct wireless_dev wdev; u8 vifid; @@ -136,11 +140,13 @@ struct qtnf_wmac { u8 macid; u8 wiphy_registered; u8 macaddr[ETH_ALEN]; + u32 status; struct qtnf_bus *bus; struct qtnf_mac_info macinfo; struct qtnf_vif iflist[QTNF_MAX_INTF]; struct cfg80211_scan_request *scan_req; struct cfg80211_chan_def chandef; + struct cfg80211_chan_def csa_chandef; }; struct qtnf_hw_info { diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.c b/drivers/net/wireless/quantenna/qtnfmac/event.c index 00570de918e6..43d2e7fd6e02 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.c +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c @@ -350,6 +350,63 @@ qtnf_event_handle_scan_complete(struct qtnf_wmac *mac, return 0; } +static int +qtnf_event_handle_freq_change(struct qtnf_wmac *mac, + const struct qlink_event_freq_change *data, + u16 len) +{ + struct wiphy *wiphy = priv_to_wiphy(mac); + struct cfg80211_chan_def chandef; + struct ieee80211_channel *chan; + struct qtnf_vif *vif; + int freq; + int i; + + if (len < sizeof(*data)) { + pr_err("payload is too short\n"); + return -EINVAL; + } + + freq = le32_to_cpu(data->freq); + chan = ieee80211_get_channel(wiphy, freq); + if (!chan) { + pr_err("channel at %d MHz not found\n", freq); + return -EINVAL; + } + + pr_debug("MAC%d switch to new channel %u MHz\n", mac->macid, freq); + + if (mac->status & QTNF_MAC_CSA_ACTIVE) { + mac->status &= ~QTNF_MAC_CSA_ACTIVE; + if (chan->hw_value != mac->csa_chandef.chan->hw_value) + pr_warn("unexpected switch to %u during CSA to %u\n", + chan->hw_value, + mac->csa_chandef.chan->hw_value); + } + + /* FIXME: need to figure out proper nl80211_channel_type value */ + cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_HT20); + /* fall-back to minimal safe chandef description */ + if (!cfg80211_chandef_valid(&chandef)) + cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_HT20); + + memcpy(&mac->chandef, &chandef, sizeof(mac->chandef)); + + for (i = 0; i < QTNF_MAX_INTF; i++) { + vif = &mac->iflist[i]; + if (vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED) + continue; + + if (vif->netdev) { + mutex_lock(&vif->wdev.mtx); + cfg80211_ch_switch_notify(vif->netdev, &chandef); + mutex_unlock(&vif->wdev.mtx); + } + } + + return 0; +} + static int qtnf_event_parse(struct qtnf_wmac *mac, const struct sk_buff *event_skb) { @@ -400,6 +457,10 @@ static int qtnf_event_parse(struct qtnf_wmac *mac, ret = qtnf_event_handle_bss_leave(vif, (const void *)event, event_len); break; + case QLINK_EVENT_FREQ_CHANGE: + ret = qtnf_event_handle_freq_change(mac, (const void *)event, + event_len); + break; default: pr_warn("unknown event type: %x\n", event_id); break; diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index 5c2d8f0abd7f..c529cc1994b4 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -153,6 +153,7 @@ enum qlink_cmd_type { QLINK_CMD_UPDOWN_INTF = 0x0018, QLINK_CMD_REG_NOTIFY = 0x0019, QLINK_CMD_CHANS_INFO_GET = 0x001A, + QLINK_CMD_CHAN_SWITCH = 0x001B, QLINK_CMD_CONFIG_AP = 0x0020, QLINK_CMD_START_AP = 0x0021, QLINK_CMD_STOP_AP = 0x0022, @@ -482,6 +483,22 @@ struct qlink_cmd_reg_notify { u8 user_reg_hint_type; } __packed; +/** + * struct qlink_cmd_chan_switch - data for QLINK_CMD_CHAN_SWITCH command + * + * @channel: channel number according to 802.11 17.3.8.3.2 and Annex J + * @radar_required: whether radar detection is required on the new channel + * @block_tx: whether transmissions should be blocked while changing + * @beacon_count: number of beacons until switch + */ +struct qlink_cmd_chan_switch { + struct qlink_cmd chdr; + __le16 channel; + u8 radar_required; + u8 block_tx; + u8 beacon_count; +} __packed; + /* QLINK Command Responses messages related definitions */ @@ -667,6 +684,7 @@ enum qlink_event_type { QLINK_EVENT_SCAN_COMPLETE = 0x0025, QLINK_EVENT_BSS_JOIN = 0x0026, QLINK_EVENT_BSS_LEAVE = 0x0027, + QLINK_EVENT_FREQ_CHANGE = 0x0028, }; /** @@ -736,6 +754,16 @@ struct qlink_event_bss_leave { __le16 reason; } __packed; +/** + * struct qlink_event_freq_change - data for QLINK_EVENT_FREQ_CHANGE event + * + * @freq: new operating frequency in MHz + */ +struct qlink_event_freq_change { + struct qlink_event ehdr; + __le32 freq; +} __packed; + enum qlink_rxmgmt_flags { QLINK_RXMGMT_FLAG_ANSWERED = 1 << 0, };