From patchwork Fri Aug 25 02:30:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 9921183 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 7A00B600C5 for ; Fri, 25 Aug 2017 02:31:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 58C94204C2 for ; Fri, 25 Aug 2017 02:31:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D8E7205AB; Fri, 25 Aug 2017 02:31:24 +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 86F62204C2 for ; Fri, 25 Aug 2017 02:31:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754515AbdHYCbR (ORCPT ); Thu, 24 Aug 2017 22:31:17 -0400 Received: from mail-cys01nam02on0057.outbound.protection.outlook.com ([104.47.37.57]:63780 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754480AbdHYCbN (ORCPT ); Thu, 24 Aug 2017 22:31: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=4BoFgy7flcV5fQtyiZjeY6UJDlZn0HqNsYgtvQvP5vM=; b=LQSvq6nO7qHr8NyPJRv/KrYKfVcH7WIiFiGkB0kYm4xBVbOwH+LiE1VQ7793LoMh5aywl0BOEVCfH5tCafK4ShXHR4p05vFypP1uOXHww64DYAKsdCWZ4THyR+vU3BScXTlCVrH3bWdyPCw260sh9WmqA4vTKimthkF8yZddrIc= Received: from dodo-dell.quantenna.com (12.131.200.68) by SN1PR0501MB2047.namprd05.prod.outlook.com (10.163.227.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.4; Fri, 25 Aug 2017 02:31:09 +0000 From: igor.mitsyanko.os@quantenna.com To: linux-wireless@vger.kernel.org Cc: sergey.matyukevich.os@quantenna.com, avinashp@quantenna.com, johannes@sipsolutions.net, Igor Mitsyanko Subject: [PATCH 27/27] qtnfmac: pass all CONNECT cmd params to wireless card for processing Date: Thu, 24 Aug 2017 19:30:24 -0700 Message-Id: <20170825023024.10565-28-igor.mitsyanko.os@quantenna.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170825023024.10565-1-igor.mitsyanko.os@quantenna.com> References: <20170825023024.10565-1-igor.mitsyanko.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [12.131.200.68] X-ClientProxiedBy: CY4PR15CA0017.namprd15.prod.outlook.com (10.172.74.27) To SN1PR0501MB2047.namprd05.prod.outlook.com (10.163.227.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f8ad04c2-95da-4fe3-ec80-08d4eb6158b9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR0501MB2047; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2047; 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s71XMVT1zD26oWQqLWyX6PLVzdbDFpAVN/FnJrJzHl0fsLqYeCxEYTsDZV8n+78fEypLHFZbJnflijiCjhcixUz3F1fALeVIdUi1zKxMOsAG7TFs6P6QDEp7eNvNYN/bilXI5bYyQcvWu32B0aJTX5bHYmnEp+A98XwpYFMfolbtJLRRX5jTKKKXreMCRUgCYgZUbAmEsIfXVuL05iVNG/SOwzVfu6zSWkNUwrCq5ZSPGaeSgiUfkAEKdZoY+awbbbGEFpLSO87tuXFdoyx49+ZW+Pb/crjcJ4TK1A4Hm715oZWurck3kzwLMjHF0YZAret8FGkDto3SWYwMdPjWEtgAfNtsCwCL3Y5WZTkKHuinqlNuc6nZDOUyPYLl+tUWdrs6k8UPgpp3fyoFdWKzTV95VTMNRppz5/R/D1SKRYUx/aI5gaNdFOynsHJMiXmZFzpkvgA=; 4:hPgKB0uJ0Qa6uC8mb/hk3Wuo8oFMq1KybaSzOZdHSY60h28yNFCx4+HAyjiyWgiOP8ko+0Xt2d/dTgKA/f2ebpPLqiaXflzBiiCUlZKc6VruxF8+AqLfRYjWV2I42aJJJ6+9IIzy3EFpWpXK+jJqTVETU5u9jZF1WnqComd6w4b0hAfiKeusJD+++dSbC0lLo3hDHMqde5ab/wbdrgC8x2NhuKbV8tPRG8+Xf93TXk47nkykfWvqq6Cu8TqoVhmeHxbP01S2ZXj2OMqv3Zs4b7B72Nrzv9tu6Xez1jE/Udg= 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)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR0501MB2047; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR0501MB2047; X-Forefront-PRVS: 041032FF37 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39830400002)(199003)(189002)(76176999)(53416004)(50986999)(110136004)(7350300001)(6916009)(6666003)(2950100002)(47776003)(2906002)(9686003)(53936002)(66066001)(2361001)(106356001)(105586002)(2351001)(86362001)(305945005)(33646002)(7736002)(42186005)(81166006)(81156014)(107886003)(8676002)(103116003)(478600001)(85782001)(68736007)(50226002)(50466002)(3846002)(6486002)(25786009)(36756003)(97736004)(5660300001)(1076002)(6116002)(69596002)(5003940100001)(101416001)(4326008)(189998001)(48376002)(85772001)(309714004); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0501MB2047; H:dodo-dell.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=igor.mitsyanko.os@quantenna.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0501MB2047; 23:rm2uFwv8jFr5vZBe+Jbp91gyNQDVzXdm0SSGYqP?= =?us-ascii?Q?EKYltWTos6bRAdEf6cHjqVRf9w1NzBwcVist3akdJrOiAI1TizByiP8dnkvt?= =?us-ascii?Q?eG5i+tROcsgXEu5IWBpU7EAmd4WLQzlT98D2KPgr3w7d9JlUl7XxfMWtVI4q?= =?us-ascii?Q?AC8Luex7JjCqQ0YFFheW5MVv6QPRL/6ngnz6c2Hca+zUFq+ggS32YK5sQrXt?= =?us-ascii?Q?srw1JbC6Ntdq2OTfDhFEj7wudAQbO63rgyC5PPI3snuTg8ireCsz8eBWbZqE?= =?us-ascii?Q?G5RMAZGeg6nbbskTeOM4n6zEtSC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CrWXahVOgMgw0+gcSZiazjBSAF5sEr5ORe1O8JHeS7+VPNqXg+8Pbu5qhY?= =?us-ascii?Q?TdW8DoC6ykVSgtx7o8Nburx2LknpKrZ4G2aAEv3DYKkMvbxkV2oDg0++GT5r?= =?us-ascii?Q?ESA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2047; 6:ibdXiYm+gaJ/XP68mRu585g5nkgSodimybh3+xkwMtsN/7KNtxPGnTxNWTsGi9f0c9Ep1hz8bBteXI61DZ/VRtrAzCfpG3yjcSBoNnv/3d3yH3bM6RqM5CX00kv1Qru4tplyx63ziPQ55Lhw6yQi/oYgUk8WKJArCztjf+YxSoYOfaviDrKeuAjyF2xxM3bXQpQBU8FJ5HuA04UFyHxMZpvtOV3zYpCV2M1Vg67vkPGkcNw9omWvEx6lHubW39x2eVuEsib5kOEb6TnwooIt1nKVd/C9N6jhO2ym9W5dXP2BGWcl9IFxwHJjUxx4Qr5KzTZyB5bMV8pnVN1png0Mkw==; 5:pHSiLpgijTe0WpcWL9C73jY9xUFBkW1kRnNk+WF2PyiVwdrgeM3/2fpyfM8nljgY50xD70db9do1jeT2D6U6X0uZpSJylRmgflcdyyTQeepFcJzwSxKDIboI4a0qAEiiFxZGYzRzqMAv3Oenyn5S5w==; 24:902yovw7D84z4P+3fze9nbZOC1U5hVPRHXftASKpurD6I0Jop0bJ+WVGR7YEdy+H8nnGV6NflThg1SQA8y4JWDEW5orGv6eac1uJunwvIXU=; 7:JaNZxK/ObEGToKWM5pBiL8kJzMgg0+mrHZTfHFCOwEusnr95PuLv2cRvSxx1uboIWws7tT8eZITueEAE0Jj++GkrCwWZBT3KkMwP4Hg3iyZJ6n3whnI9v/EAgcj94bjKF798D+jc2amCBpOFRst80bjaoAspnyXvjevYVGQpbPH9vtsiBD/DcBmLhs2q75tRG8sTlCtosoJYmy1x1fVgq2MYf84BAx0QW4SSTP/uQUM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2017 02:31:09.3235 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0501MB2047 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: Igor Mitsyanko Specifically, following parameters are needed for wireless device configuration but were not available to it before: - HT/VHT capabilities and capabilities masks. - full channel info (not just IEEE number) - BSSID hint - previous BSSID for reassoc request Move Management Frame Protection setting from common encr info structure into STA-specific .connect command parameters. Make sure that all new qlink structure definitions are alignment-safe. Signed-off-by: Igor Mitsyanko --- drivers/net/wireless/quantenna/qtnfmac/commands.c | 63 +++++++++++++++-------- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 32 +++++++++--- 2 files changed, 65 insertions(+), 30 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index dde2013..c8de438 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -221,7 +221,6 @@ int qtnf_cmd_send_start_ap(struct qtnf_vif *vif, aen = &cmd->aen; aen->auth_type = s->auth_type; aen->privacy = !!s->privacy; - aen->mfp = 0; aen->wpa_versions = cpu_to_le32(s->crypto.wpa_versions); aen->cipher_group = cpu_to_le32(s->crypto.cipher_group); aen->n_ciphers_pairwise = cpu_to_le32(s->crypto.n_ciphers_pairwise); @@ -2027,17 +2026,36 @@ int qtnf_cmd_send_del_sta(struct qtnf_vif *vif, return ret; } +static void qtnf_cmd_channel_tlv_add(struct sk_buff *cmd_skb, + const struct ieee80211_channel *sc) +{ + struct qlink_tlv_channel *qchan; + u32 flags = 0; + + qchan = skb_put_zero(cmd_skb, sizeof(*qchan)); + qchan->hdr.type = cpu_to_le16(QTN_TLV_ID_CHANNEL); + qchan->hdr.len = cpu_to_le16(sizeof(*qchan) - sizeof(qchan->hdr)); + qchan->center_freq = cpu_to_le16(sc->center_freq); + qchan->hw_value = cpu_to_le16(sc->hw_value); + + if (sc->flags & IEEE80211_CHAN_NO_IR) + flags |= QLINK_CHAN_NO_IR; + + if (sc->flags & IEEE80211_CHAN_RADAR) + flags |= QLINK_CHAN_RADAR; + + qchan->flags = cpu_to_le32(flags); +} + int qtnf_cmd_send_scan(struct qtnf_wmac *mac) { struct sk_buff *cmd_skb; u16 res_code = QLINK_CMD_RESULT_OK; struct ieee80211_channel *sc; struct cfg80211_scan_request *scan_req = mac->scan_req; - struct qlink_tlv_channel *qchan; int n_channels; int count = 0; int ret; - u32 flags; if (scan_req->n_ssids > QTNF_MAX_SSID_LIST_LENGTH) { pr_err("MAC%u: too many SSIDs in scan request\n", mac->macid); @@ -2079,22 +2097,8 @@ int qtnf_cmd_send_scan(struct qtnf_wmac *mac) pr_debug("MAC%u: scan chan=%d, freq=%d, flags=%#x\n", mac->macid, sc->hw_value, sc->center_freq, sc->flags); - qchan = skb_put_zero(cmd_skb, sizeof(*qchan)); - flags = 0; - - qchan->hdr.type = cpu_to_le16(QTN_TLV_ID_CHANNEL); - qchan->hdr.len = cpu_to_le16(sizeof(*qchan) - - sizeof(struct qlink_tlv_hdr)); - qchan->center_freq = cpu_to_le16(sc->center_freq); - qchan->hw_value = cpu_to_le16(sc->hw_value); - - if (sc->flags & IEEE80211_CHAN_NO_IR) - flags |= QLINK_CHAN_NO_IR; - if (sc->flags & IEEE80211_CHAN_RADAR) - flags |= QLINK_CHAN_RADAR; - - qchan->flags = cpu_to_le32(flags); + qtnf_cmd_channel_tlv_add(cmd_skb, sc); n_channels--; count++; } @@ -2138,10 +2142,15 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif, ether_addr_copy(cmd->bssid, vif->bssid); - if (sme->channel) - cmd->channel = cpu_to_le16(sme->channel->hw_value); + if (sme->bssid_hint) + ether_addr_copy(cmd->bssid_hint, sme->bssid_hint); else - cmd->channel = 0; + eth_zero_addr(cmd->bssid_hint); + + if (sme->prev_bssid) + ether_addr_copy(cmd->prev_bssid, sme->prev_bssid); + else + eth_zero_addr(cmd->prev_bssid); if ((sme->bg_scan_period > 0) && (sme->bg_scan_period <= QTNF_MAX_BG_SCAN_PERIOD)) @@ -2159,11 +2168,18 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif, connect_flags |= QLINK_STA_CONNECT_USE_RRM; cmd->flags = cpu_to_le32(connect_flags); + memcpy(&cmd->ht_capa, &sme->ht_capa, sizeof(cmd->ht_capa)); + memcpy(&cmd->ht_capa_mask, &sme->ht_capa_mask, + sizeof(cmd->ht_capa_mask)); + memcpy(&cmd->vht_capa, &sme->vht_capa, sizeof(cmd->vht_capa)); + memcpy(&cmd->vht_capa_mask, &sme->vht_capa_mask, + sizeof(cmd->vht_capa_mask)); + cmd->pbss = sme->pbss; aen = &cmd->aen; aen->auth_type = sme->auth_type; aen->privacy = !!sme->privacy; - aen->mfp = sme->mfp; + cmd->mfp = sme->mfp; aen->wpa_versions = cpu_to_le32(sme->crypto.wpa_versions); aen->cipher_group = cpu_to_le32(sme->crypto.cipher_group); aen->n_ciphers_pairwise = cpu_to_le32(sme->crypto.n_ciphers_pairwise); @@ -2190,6 +2206,9 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif, qtnf_cmd_tlv_ie_set_add(cmd_skb, QLINK_IE_SET_ASSOC_REQ, sme->ie, sme->ie_len); + if (sme->channel) + qtnf_cmd_channel_tlv_add(cmd_skb, sme->channel); + qtnf_bus_lock(vif->mac->bus); ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code); diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index 9a913b6..e45fc87 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -19,7 +19,7 @@ #include -#define QLINK_PROTO_VER 5 +#define QLINK_PROTO_VER 6 #define QLINK_MACID_RSVD 0xFF #define QLINK_VIFID_RSVD 0xFF @@ -139,9 +139,9 @@ struct qlink_auth_encr { __le16 control_port_ethertype; u8 auth_type; u8 privacy; - u8 mfp; u8 control_port; u8 control_port_no_encrypt; + u8 rsvd[2]; } __packed; /* QLINK Command messages related definitions @@ -395,20 +395,36 @@ enum qlink_sta_connect_flags { /** * struct qlink_cmd_connect - data for QLINK_CMD_CONNECT command * - * @flags: for future use. - * @channel: channel which should be used to connect. + * @bssid: BSSID of the BSS to connect to. + * @bssid_hint: recommended AP BSSID for initial connection to the BSS or + * 00:00:00:00:00:00 if not specified. + * @prev_bssid: previous BSSID, if specified (not 00:00:00:00:00:00) indicates + * a request to reassociate. * @bg_scan_period: period of background scan. + * @flags: one of &enum qlink_sta_connect_flags. + * @ht_capa: HT Capabilities overrides. + * @ht_capa_mask: The bits of ht_capa which are to be used. + * @vht_capa: VHT Capability overrides + * @vht_capa_mask: The bits of vht_capa which are to be used. * @aen: authentication information. - * @bssid: BSSID of the BSS to connect to. + * @mfp: whether to use management frame protection. * @payload: variable portion of connection request. */ struct qlink_cmd_connect { struct qlink_cmd chdr; - __le32 flags; - __le16 channel; + u8 bssid[ETH_ALEN]; + u8 bssid_hint[ETH_ALEN]; + u8 prev_bssid[ETH_ALEN]; __le16 bg_scan_period; + __le32 flags; + struct ieee80211_ht_cap ht_capa; + struct ieee80211_ht_cap ht_capa_mask; + struct ieee80211_vht_cap vht_capa; + struct ieee80211_vht_cap vht_capa_mask; struct qlink_auth_encr aen; - u8 bssid[ETH_ALEN]; + u8 mfp; + u8 pbss; + u8 rsvd[2]; u8 payload[0]; } __packed;