From patchwork Tue Jun 20 19:55:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 9800147 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 10157600F5 for ; Tue, 20 Jun 2017 19:56:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07017223B3 for ; Tue, 20 Jun 2017 19:56:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF1A328161; Tue, 20 Jun 2017 19:56:16 +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 2F963223B3 for ; Tue, 20 Jun 2017 19:56:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752140AbdFTT4O (ORCPT ); Tue, 20 Jun 2017 15:56:14 -0400 Received: from mail-co1nam03on0076.outbound.protection.outlook.com ([104.47.40.76]:55328 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752117AbdFTT4N (ORCPT ); Tue, 20 Jun 2017 15:56:13 -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=Hn7QSi2SYwqX/eCdGqVifNHRuh3qLSkQ9FG7l1RcSRI=; b=fbcLE27uRucLyozh+xyCwMaKzJgNAkTWrTbjLZqLeKLJy1H03k8jZndfyJ1l9JzUSZ6KDRtS9jYD+dPVriPONq7nBAvxYrAFXm7RiMHDrby9M/qM4YrI6SuzWmAe7W+csIWQ9gDkQvAUcK76OSp0mht3TzYG/mefE4SgFLsjAhc= 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:08 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Igor Mitsyanko , Avinash Patil , Sergey Matyukevich Subject: [PATCH 7/8] qtnfmac: implement cfg80211 channel_switch handler Date: Tue, 20 Jun 2017 22:55:16 +0300 Message-Id: <20170620195517.18373-8-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: 4d6496bb-fcf6-4b07-3f65-08d4b8166696 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR05MB1931; X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1931; 3:gE0GOL/Ph8lmJ37dluIN9Vs8A7ivKqpkHXtnvMiG74OWgJ6YKViOAJNY+q5KitH/5i+J9U08/FROST1dxko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p3Z74buweVWL3Hy2m1N2k4KfhdgMPeEdWDFA6QDb61Ip9x4TswpnGiP7g4ZNRO/bTMJ6HgpUuXkmaDlaTwOyKKIHVwutFHKBhXxo8gHxuY8GMfK6fHMkwm/RISrjNz+FFWkWUOI7l+3Bxq1Q9mEG6N0UUcHAy78oRXqeqiCKkCuJTiBJ6MZ16ZGQ6ZD8X0uI7Vdi+0+OrAdr4hqepGxKly7QTffkFC+Pjm9J8sJ425mnZVxXNPGtdZivAmQn6Vefm+c4u9ijKu8JhTdvzKF4OvBRoY5YvD4h5cOQQpBhppIUwF7X2AF0v0kEGSc2esjtXDcA87RrRpMpMaI2OaJhRG3ux96IIGd9oXz94C4+EofnPOdAVy/dos+LwbBSvUUZBmb9HhD6htpnTWmM X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(21532816269658); 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:bF7x0Wri/vI7hB/G92QI9RYjCyF+Vi5G7yfiNCyVbe?= =?us-ascii?Q?NqAO5ixnnom039FujpdJzw2BoSm7hUP0SmYr7lOssBlLRBGDrNUBspu+79eC?= =?us-ascii?Q?LzNSADrK/VVH3D4QPbElBVil5EY9e88C7IeD+voWBzYAARxeIJFkgxcDKarn?= =?us-ascii?Q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eX8vJ0xjmbhFpVaDvC4EB7cfb?= =?us-ascii?Q?fWUtYQQ7yALMHfguMse/Ry7qCqdCcaoB5TJVcWynfHGrV5vY1qkjSa/kl77Q?= =?us-ascii?Q?XBpMY7XgxMsRZB4KY8f9wJQJr1Nkud2erZQkKgm1tPy04GoiW8jnpennY4Qy?= =?us-ascii?Q?Y9FvkU95/3aY8=3D?= 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)(6666003)(8676002)(6486002)(103116003)(305945005)(7736002)(4326008)(5660300001)(1076002)(50226002)(86362001)(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:7BhE15q1xJizQPonN/aAS2MXj1MlqBoeXh+r8ZRH4?= =?us-ascii?Q?9Jzvpc3Ak2UUixU9rFP/+RC0IpUT1+9c8TLzqKSfqoB5MAEmNfXLs8NKqbCm?= =?us-ascii?Q?0ptLGk+7dTxJ5EM1zMKoWtZ0YsMFS6PGk49el7ZqPDH+aL8RMtF8ssHb8bUK?= =?us-ascii?Q?uPvIX6ffnFtMnis9dHIgiAPnHL/dAdgHH7RkX+OxDIjFSjuMVdY7RIJNgsfj?= =?us-ascii?Q?SJP1Le95S9NRhPbzb0Yt6OpNiXjDXb5EQFZ5jhS9SM+GX0osWrBferKJ4RxM?= =?us-ascii?Q?7CPS6+c315mwDVxXE+8cIBXDs9BL2ildSJ4oQo3PO+P7qlfzslGecjf34TTK?= =?us-ascii?Q?gPOGP9oLhqVWifhKxDGCqRRecffH36DlKQMhtYNTSnQSRH+Enklz1UBD+e58?= =?us-ascii?Q?BTZtC7US0Qg413VKlZtvKitJrrU6ojApzC+MDnitSj+0YIQjlU8KbmUmUlj5?= =?us-ascii?Q?RZ4Y32p2p5KJq5glirjXR5/yTKLVad3FUSlECVRb474LdaJoWG1clVJgz24u?= =?us-ascii?Q?2cexEQhul0ecUVd6YbQVkQddZuzhkaJAUzVV53+WMKGmH4MweNCOgrLhUqYD?= =?us-ascii?Q?cWxfh4cT/pVcmVXDtb+uupUIobCtH++24DucxPGxMTa4T2U9uFtRaB7TSRtv?= =?us-ascii?Q?9E8zK1hhqPab5XAr7YQ+Zncl6cL6bcva/nTNFhtHUAkv44L9ou1nPEXGdaQM?= =?us-ascii?Q?a40ROmy/tvscdGK3h4yykk+0OeqI0DLj/xDIClTlIucV8g1L3pdAyP8K/lxV?= =?us-ascii?Q?mSzTCVg1LyNqwWLy3wHRBRyW6fbojqZOQSmBoMPJL1umysCCK8xt/beH/3q7?= =?us-ascii?Q?C5agXqRL67AMKG8ZlqgQZ6Do/FJ8WMkpRUYk41L4KZObe3Sshs3zimZtLF4Y?= =?us-ascii?Q?ZzXkO79qmtJI3AfMy4RjW+Z/5KebrGI0A9taaheRUC6iM/UR7NNix1tNCst7?= =?us-ascii?Q?PbFD8EaTtBPn+7mTYwTegG44ZGtXeeqa8D+RNJsE+h7H14BW4nqMwnyKCKYv?= =?us-ascii?Q?C6enTDDgs9x66tPSzsJFs1XUwdGCnoc+WgXpTWyrgJ3GoAnGhTysjq8JE9/p?= =?us-ascii?Q?F0UzBJAWKG5Dc5dKo3LajikYCfwkRtdcqTlrmQOXWmAVtHp6Q=3D=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR05MB1931; 6:fWsdt6p6+75s1GHGWmi685U0pV1B19T/nX81VYVgV2?= =?us-ascii?Q?3qtlV8sDd/8Y++pseTziu+HQCkIgUFN2a48cOXJGi8nRt6wEN8I0ipt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cp1DRhEoo8iX3lTLnHoPhohArxCwVncXjJAR9y?= =?us-ascii?Q?g=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1931; 5:0YQbKDe/pu7FkGrp4tJYNnP3i0zhc4gbBZ33+zK/7xnItvCUs5p6SRdpBKpXa0AZXir2z6vytnDNcBrE3Y75s6AsCy6hxVMrALryIC6Off94qHgzYnMOWS37Pt6hbjDxPiOTe44XkB7Pqf4unE3V8LAEeXlLw3Kp6qMa0B29TgAuvFN+Jh+uv2R2Z1SjVXDdDxetq21ztWdU6aLvWlyn6wezS/V4rNvgUbaFykiB2PLay5a0di5jJjpSjpA7lpQqp/fZ4FqH34HDPeYatpXMJEOdmLlvrHLySIF84TLxI84zGDOaE7lesgJrZcH1qBvFMOTI66sHaNkDAyOAGObstdokNECu5a94vfhXw0rSkxxy/+m+BkTaoaosx1WVjTA27q+UaMGHGvt7Qxk1aVNKvPrhycHFQmpWmwiiuPtZkKKtbJAtUqqHhMUEhG1tzGnkDuIoR5nLb65wzQpCYdIE/TPt8IBKeKSh5+mFg91nJaz0oJSEskhelPhbZeQDaKFg; 24:yePRU7v67udrEdoSqlAgFm3hHBnfwfGyPXce2M7+Q9wF8XoyMKL6ihm3xLJBm7Vk2C0x769D05mbcvSh4RnlmCdctUDNffp0OJxHIALhArE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1931; 7:D0L+7Jg9pD+XWZx97wblALX69VPDYLcXOToxc20KLVAwYL66y1YSM7rInpC5Dd8FrFgarixgYnP6c7nPDAktUbU8A3sK2xmXQHYvQ4YX1zzc8Vdbyoc31qUirr9j+Ib9b3cfm9pH8O0PVnc5PfSweg9slsWwE47r/v7+u7OQR/canOE7QvrIu+O/j7UHCB2OWX5nCO6OeCspXXopN7pFbe77Lns9kQe/tIHRrjfpwipLnYzgU9EwMhTcKubJnFO4IIz44LOKvaj5bo+qWbRDrVu2aCuFo/clqk/TJd3bICHNYuzafu/ub9Pz3W7LOfKIYdcH1KaUPgEsgda0YR47JTosipLR3/G+NGTJT1kJQ+twJPKqMcdCQdDeTyhynmI0ndbhgcMBEJa+MrTGVxDCcWndmI2ekovRsGO4AVavIyaYR3RigjlQP+MLTFYDxWDQVHH/MJ+EYnZe6IApkQ4tzGeXHu7TZ5B8cGAuYRf4JJw+D4BcJvLxSiAItBY5dF3FIImyIG7s3Jxn42eJ9tQiOEYN5jQtOkXQvgBwUW6PX0epZfmbCfmSbhQ6qbWpN6c7q2TluF9cqR5KnUfkCsRCc6u0s7yQBf9q9QXnreQxuPSwfdp2ajTBdfipl8NDHyCWPJ/qhf3LXtX/XwczKa/jCM2Xfw/q4waMeBh2iJoQYo5LgQKAbHeRkR3/fvTTdMWJkQOCfrgZdEM5fnw3otmvX1jQIXHMeMT3fUq9RwzH+3kDjJc3XYh+knjPrTecv3FaG+dz/jk7qDzZ+XmhSP5ujvuyw57ej48NW5eXUbrCyTc= X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2017 19:56:08.9433 (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 This patch implements cfg80211 channel_switch handler enabling CSA channel-switch procedure. At the moment qtnfmac host 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: Sergey Matyukevich --- 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 | 8 +++ drivers/net/wireless/quantenna/qtnfmac/qlink.h | 17 +++++++ 6 files changed, 146 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 3f90f57ed595..097f29189339 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -977,6 +977,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_info("%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, @@ -999,7 +1052,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, @@ -1149,6 +1203,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; @@ -1156,7 +1211,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 f44ae71047c3..900159e82bc8 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -2334,3 +2334,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 3c62f5bd28e4..efe078a6d1d3 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.h +++ b/drivers/net/wireless/quantenna/qtnfmac/core.h @@ -90,6 +90,10 @@ enum qtnf_sta_state { QTNF_STA_CONNECTED }; +enum qtnf_mac_status { + QTNF_MAC_CSA_ACTIVE = BIT(0) +}; + struct qtnf_vif_vlan { struct qtnf_vif *parent; struct list_head list; @@ -150,11 +154,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 d1edeb3892df..b48d9e8b6935 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.c +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c @@ -376,6 +376,14 @@ qtnf_event_handle_freq_change(struct qtnf_wmac *mac, pr_info("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 */ diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index 5859ef624058..5acd3da5e6d0 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -154,6 +154,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, @@ -488,6 +489,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 */