From patchwork Tue Oct 31 01:04:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 10033519 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 69AEE60291 for ; Tue, 31 Oct 2017 01:05:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B9F3286FB for ; Tue, 31 Oct 2017 01:05:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5078D28961; Tue, 31 Oct 2017 01:05:22 +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 A6B18286FB for ; Tue, 31 Oct 2017 01:05:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753140AbdJaBFU (ORCPT ); Mon, 30 Oct 2017 21:05:20 -0400 Received: from mail-by2nam03on0048.outbound.protection.outlook.com ([104.47.42.48]:45504 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752905AbdJaBFN (ORCPT ); Mon, 30 Oct 2017 21:05: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=Ee0FFOnxoRJV8uWGjUlnyBsWi8fURLJuMGlMt9trC6U=; b=WDFZacBuLenzRE2X4oAkzB3VV2kKzQ6LUCq073B6TI4rxKhwUFNIVUzRIPsng+aOOil96IPvs0YW305HQgIB494D6jkReKuwnJ0FMkvpCJ2yPVfRexMOrZukWpLKmoqGjBU3Q6l1gfd5EMGA1e6iZkNIPuMgGuo6dD5x4T6ttCU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=igor.mitsyanko.os@quantenna.com; Received: from dodo-dell.quantenna.com (12.131.200.68) by BLUPR0501MB2036.namprd05.prod.outlook.com (10.164.23.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.4; Tue, 31 Oct 2017 01:05:09 +0000 From: igor.mitsyanko.os@quantenna.com To: linux-wireless@vger.kernel.org Cc: sergey.matyukevich.os@quantenna.com, vulyanov@quantenna.com, johannes@sipsolutions.net Subject: [PATCH V2 9/9] qtnfmac: pass all CONNECT cmd params to wireless card for processing Date: Mon, 30 Oct 2017 18:04:55 -0700 Message-Id: <20171031010455.27772-10-igor.mitsyanko.os@quantenna.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20171031010455.27772-1-igor.mitsyanko.os@quantenna.com> References: <20171031010455.27772-1-igor.mitsyanko.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [12.131.200.68] X-ClientProxiedBy: MWHPR19CA0008.namprd19.prod.outlook.com (10.173.246.146) To BLUPR0501MB2036.namprd05.prod.outlook.com (10.164.23.18) X-MS-Office365-Filtering-Correlation-Id: 92804669-30ec-4fc7-ea54-08d51ffb6f1a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(2017052603199); SRVR:BLUPR0501MB2036; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0501MB2036; 3:BZp4uFOayqiSQMe39ler20wlxWRSe6G7GPDboDgrm+BhJcQbeL1pikH8vjHN9HmMWE4UcgZ9/4pPuXDXJ7mGJCM9ZTs7LTGGhOFd+2IXnSZ3WaQpmM41ULKOulgZHIskyzIJRD6ZqjodtIBrBNh92N1n6gcfTB97lzSj5sEKb/GhmdBvHAunohgUleyrbi7yeRWUAhjnPp9Jm3zEfnUCJGKHwoYIrgTwKPpMV22lQrC2MI14lbZZhJSNGDDWaMUy; 25:JB1gqgwJfGWok0YnQ8W2NbUhuqaZSmkMfNEjsjyDDVv9NvIMB9GISmd/LV1ZelUaREi50iyoOclcln7FrhRCkhe5wqVfLMAU6sqd0FYiEeaTh5yE34ogcPuhisnqnUSVrHPnNdZmYdhCrVeoa+DLpI9eGi0YxZ09FR/VYZHfLXfcF42UMSjcPon4A53cBkWIER4RBcLeoY1T63Fww8Zi9VqtdVGQRZbkQi6fSO1nR9QjhkSx9MXxK+twTehirWSbGTuavynTGYWl74YsJrKOavsr+1bTMIEHJ70BYwlgcZZ8WGjyqrhyuiHaiBwBRtDgCmspHNUMt2bUgUXSMmjkmw==; 31:YZ0y6DKLHGH2Qn82CTg2yarUZPP71rbu4gaPRz9jfUPgY2y0GrnXzx9pbD/HmNg0bg0i9pLgPTIT0DBtSIAw6SzqZmQGGXzKNK+nDivHO7AwJMdqr8F7TKIBjl4YF0kpI00rd02SAAsMwgndA1yX9wLrTwcsqaWe8DEgQEz+9/ywrPnwssKSMfq6ztwU07OLCpGagP0mqDed9zm2ZnBsb9lc93FxUizi14cfSLk0RWs= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLUPR0501MB2036: X-Microsoft-Exchange-Diagnostics: 1; BLUPR0501MB2036; 20:qMmbXwXhGfCHrzPmUxJvIxKLqdSDArnGiXNvt5++8HSZMw2YQjJZzaYk21zOOOpGoL4T1h1MPUqyk2b7xQYDRFvBRqkVRro6QMNpC4B3eUvBzIRld+FlqoMMiicHtEu++lny6829vwenPS1DQjP623c+YotJ+wu2y1jnsmjjRb08It5dwWVhOxmOOHKGl+0BCut597bvm7UMZswcsCUBUB7xeuwOR0qP2ZMvi7+mIkRuuQNI8Hb9Am5B9ct314xrSZBhyX1HZ2UsrPVtb0YuchzIa7H0jcKrtQ6Y2xUGluLl04sleS+6yjRVXSDezL0ayZSiDmhwFb1I100OJPTQMXRjzSkFg/jAd4hs0ZaYQ2UXYBhMx8+yX7O7GFiquZRF7Ug68jSZyM8qj2D1rXUmQLN0T9KgELwQx38j9umiRxpQyFHV9hVFmMXORx9ghKjiEHSBo3lwd8yoyJfkuNm7SKso+g4khNyGUooQG87xq8SFBrxUA4TUpoDBbed4ZwnUQx5q9rIv19MdlBDjxDaKeloObRkaUghPZYME1oCeYx16FhZwpkQuMqPgp7enjcPepmli0VR3M53EIUvRNBWHxnAjAuG3Z88Kt60QK7p+AkE=; 4:8n4lKDZMDoMbMjZHsUPSRLAIy8JJR05/rbXe+RchonHYNnY8QpiBDKML9vtXUmHIaqO2m3CeYda7qPNKMWykeLXH7nxcS4iL7GItbujS/kuZ1gT+lWU3fKUTblICaxX/KiweXUJrfa++VmGlKRSXZaNCNCwn2hYmRg0gRDNOwidIaQSPipHZn79lJ8MOnG9yUlVsu5MyeY0n54jfk2owg3Uku6E+9a1e4qMUyISB6UNl3i0KRNl4XbIU4vuk58xzkcPoZhAzZrpFfIgz8uBvPrHBdrCfxZac2hMNWpuvqhvBdq61xxXduOlL +jrPzMpk 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)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(3231020)(10201501046)(6041248)(20161123555025)(20161123562025)(20161123560025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR0501MB2036; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR0501MB2036; X-Forefront-PRVS: 04772EA191 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(39830400002)(346002)(199003)(189002)(9686003)(5660300001)(6916009)(6666003)(2950100002)(478600001)(25786009)(53936002)(36756003)(6486002)(33646002)(85782001)(50466002)(103116003)(48376002)(4326008)(81166006)(81156014)(8936002)(305945005)(7736002)(97736004)(68736007)(50986999)(76176999)(101416001)(6116002)(50226002)(8676002)(2906002)(2361001)(53416004)(3846002)(575784001)(86362001)(189998001)(1076002)(16586007)(316002)(2351001)(105586002)(106356001)(66066001)(47776003)(16526018)(5003940100001)(69596002)(85772001)(309714004); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0501MB2036; 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) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0501MB2036; 23:2cgbrjrHq9MYId5W4R59yeMU4TDgS9FRKkwPAY/?= =?us-ascii?Q?eFxVC1BEzfxdLJPb2uMaMK9BRDeGd08/aTFuNBFz9nL3fZ0jHYK+HKulzt2O?= =?us-ascii?Q?Yd/mJ1zzaFi+W6jXyiI8e2b/tZOSLlx42s7VLhMydAK4wjwyjZKswxKphNV+?= =?us-ascii?Q?dWU1/eKNDhmFrsv7ah/PoBIl+mmakph06735xPoAhER4YnLyIblI7/4Do5EJ?= =?us-ascii?Q?90Qle6MQpRxAvwcLHYxdGU6zdr4M1j6JX5Aym1j6iCLF2Sci+VahM3ZdH/f9?= =?us-ascii?Q?AejgWXzG6caDreai3CkQ4jDY5WpjTatuYOqV7BJFRMDe2M2nBb+eP8Btnwrj?= =?us-ascii?Q?36klAk28kArHJqEZVrRsTdNewCQCqB7yM07w4o8B1yEDV62Ls4PkNrELuKMF?= =?us-ascii?Q?ysJdNqIzdA2yJnHtaeq7GuDEOdb1z8V7LlAeU3g+XCPOO0WWz+2xBYHS/Q5D?= =?us-ascii?Q?XXCGN7cEdSLTDasTuZCW+nHzPnqtQ4sYGiKvNge57MZRhldRCiGcuaOOJbGU?= =?us-ascii?Q?s9eEnhdLLTUfrJECib2ytjaNcLTjisx/6Te3YvuAXRqYY64v3/JeDaUo0kab?= =?us-ascii?Q?ikbCP/j7Kz+naIpvw3tDPgGk0rl7DkDDnhlcM4kdk4h2YdA2LlickWHuUFIj?= =?us-ascii?Q?vTNJ68NdSwXICNS5R+pOX1/2vgvvC7cn2hapjS+i8gL0qQgoSMo/Ue6sirU7?= =?us-ascii?Q?f8HCHjruWYIQr9eXF/Cnyz6oxnd6NeFTntGVtsp7eSJ2C/GsqYkmyMWKBhd3?= =?us-ascii?Q?SDiuf35YVomtKhToLtPvPavPDnHrR29vdKQ2G+hgMHxRQH4Lj2eHtPxVpftA?= =?us-ascii?Q?NpSreXd+QfUwn6XsTxo3kUUhFZ/dLQEYcVHLlbbAFiFLj3bwXiOafdc9UjCv?= =?us-ascii?Q?XGltGwUvo8gjwjSFyzTJOj4QjaUUi8sjoyPnuWV5QnnPvJWLDWdQuPO0VY+K?= =?us-ascii?Q?SjVaugVjZTYhes7/DKxOuMzFlBQn1JDZdcnf3nuZXhrSxRJpKcmlKoQ8sscY?= =?us-ascii?Q?IgSQusxPUtyGg4SzL2F9QJzj0XfZRwOp3Ngr4DX7rOdp0vH6BaEvJAPixmYW?= =?us-ascii?Q?uHg1WjFL5A1yBC24TcrBYgDOv4v1VCP5xAbFI/n0Xa7aC9dnHawJi7BprRhe?= =?us-ascii?Q?tksgMC8ZY2pwwSD0KDNRHUYQqJtgMejk+9falsbsCKaHAd2fSOW0wFDCbCYL?= =?us-ascii?Q?ObavodFkPzG1tISWg9soq673rqGuYsLMoDD27J0aq5sDt2Qq1knc71ZUF/H3?= =?us-ascii?Q?wg/awwrTfWD1xxZy+QR5dfzJSUvln5TEU9Z630kcvuhiCk8LM9phuvpnu45V?= =?us-ascii?Q?Zgw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0501MB2036; 6:Dj1CLyqc3xvoTxPNlwS8X7vSqjhmTwGMsOb6p/QhnOKNWEQYZdtXIC+OM6/8PUeaMG5PvvUahbiHrDGmQzPHIlfWFHjyuc6C8OmZc2WFt3JbFuJroOv/LQR5hlz1sKgAVvBLbgxfnuevnvtvbwwvEj3EkXYHM5H75/weG09aYsaFK30hew6zJ2SHf6SrlejtaHVRRR2C1F5CxgEsurS91bgSF9x3DPoSKH5Un7cQljDWUmjRb1wTSXB0kjUXfxiW03WiMOumL9DJk0BjwXpnUSLs3fHjekT3PeuC+QLysEaxPzVxZ3lGYRR735yQucwso/1gkHGoWG0HWqSwsB0XzK2DHXVHJnGb1OrjcPDkUMM=; 5:WHEQCSyGzxo72xtHcetL+QK60/isJvcjdaUli2G8csigukuh5FzhvBF6ai5wVDRgx4pvL7nCHDkYEXevc9MBRJY5EACvYjjBSRiEEe+owJjiNlzAi9DCVu2xFT9I9wD+spuwIupfQ2yNP0M5JTJK9Ck52hIPL079dvAeydSfhmo=; 24:yBTk0+jxN0dVhF2mzXvKfUSnVBLH2F8hVkt5IDcjb9NKinoOXq4oWez8ZFzKVQX62VZn6Wk0wPqdSFLhG3fE2QKCjb4o6SH1oEqs5QpuWQY=; 7:mcLWX+bE6msriAUB/lWhEheWvUdCDnTuabmIOXING+VJ6W/MbG2Jejg6UEWTSwLMzN6TQgRT4Y25ukfkqu5EcErNj1BVlFlJAmWmWhKIFHenA6g+xCPPvv9zvFcVei39k57H8NoJWOhp1D3Q1f34NLiXDEbwATbmVcD/qTJkuacq7S6X2+jNC0Hrkwymu/AxN/Vz6lqTt0ShnpR5qyZSPWXd1w+AP8+dK9gxyzVdnbITVxgWNNn43kE5COUOwKQN SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2017 01:05:09.7830 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 92804669-30ec-4fc7-ea54-08d51ffb6f1a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0501MB2036 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 Reviewed-by: Sergey Matyukevich --- 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 c2f0b75..8bc8dd6 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); @@ -2029,17 +2028,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); @@ -2081,22 +2099,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++; } @@ -2140,10 +2144,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)) @@ -2161,11 +2170,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); @@ -2192,6 +2208,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 e07f776..a432fb0 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 @@ -148,9 +148,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 @@ -404,20 +404,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;