From patchwork Tue Oct 31 01:04:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 10033511 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 C164760291 for ; Tue, 31 Oct 2017 01:05:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B304E286FB for ; Tue, 31 Oct 2017 01:05:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A76E928961; Tue, 31 Oct 2017 01:05: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 1887D286FB for ; Tue, 31 Oct 2017 01:05:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753060AbdJaBFO (ORCPT ); Mon, 30 Oct 2017 21:05:14 -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 S1751937AbdJaBFH (ORCPT ); Mon, 30 Oct 2017 21:05:07 -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=01f2Upq9xKGAFQugu/YhGw32SlQgDWLwyFTRWjiFDVM=; b=J2Er9iGdmy0jHCIMVUhByq1UXZXD+9eSCuvUTmu9Kwt4OcLC/eJ27brNXXh7uPaGUnRhQsPvD51AbA783S7wjigHXMPP2eBSZuu5oRL3O2+OMoVbB3/Ig9+hwIBLrg8OyaioNMNjQvATgm2mHwuWFLIRk+82OahvdzUFFEgnC7U= 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:04 +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 4/9] qtnfmac: extend "IE set" TLV to include frame type info Date: Mon, 30 Oct 2017 18:04:50 -0700 Message-Id: <20171031010455.27772-5-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: d25cb10a-fcbc-4e3e-5b01-08d51ffb6bc5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(2017052603199); SRVR:BLUPR0501MB2036; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0501MB2036; 3:Gcux0eSKA28oKjjVn5OjMbHwwwAY5Wa0L4q9PKJYYumPuCxtnVx1RPwrGensgourNMyblvuDljWNxZFcdEBNQ8Vq6+0cpGLUB4lZNNQmE4+3TC6u6tN7AByhS1k8H1t9821ZKUFJTK3pY3Heh2TnGIyA9hGeGAbjze938sZAJobe2BCs4DV+M/uhHYGiw1NrpR2VKX7Gg2OvnJq3UxCsc2f/w1862MRgb0qnAhXLijXMjpKrIV47Y6xUE/YioCIC; 25:+Fb3LJqYcrEKhCR2ELai+8fScIhyHcbTFZ6Zgc1i/cPBIyFGBM5NC0BC0c6jaqKufVJcggH4ph8thq6XQnDy8FqSxz/hWOIRV8H7ZE63M4/gqZDfN2GDCUxnmzMDXcpb5GZpf/Geo1lOsbEjpUg7KSaCCIr9oyYnfWuxr1Y+UeKiPuFvJYapFqXclwCkXzMW1XGctWrDj7vuPLLpyfAyN/qT0KmUzwD8cs0MIUnwzWkv6JJxqpcmOaUfieSuLK4ufJ207kBMusSomhPYr63Ah6NDXo2L7ZuqHRbxCaPiOl2C+oQYPljfBH3brXvA1euR5qP+OMeGKRXhca+fxSta7g==; 31:ucJaQK9P8+MjhZLq5k3vh9m6zc8F1XteFNer3QyjShLxQCgxBc6NBV/2mxvZ0dPQC2ztbODEtW1u03gukZQ3bVWcTobUkD/iyYsn4X7KG9YUaWyvcA/PJYQ+ihQEPInD8vvjhuw1Iuu1NsN8DAUloeOYX2SFJbBXuJFsqqThUiazI5poGbOJb/CLOedCT8i4zN3LD5qtaKKostrAp301/XHISyuL1yUOI5bApqQQkY4= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLUPR0501MB2036: X-Microsoft-Exchange-Diagnostics: 1; BLUPR0501MB2036; 20:8nOvRZPPKgFOJx4X3rjLXhIMbTvCP/6sp3U8f1bSkkqyDX1ieyHnKzca03XfqZV88G117AvUojGn8Bc1POO5sUPXOMpDniH4xUBZKnz62PQk2iDtAwpuwxzscqsZst2spB/ZMQdvRGnyvgrytKtsTuyvdc7bzFuxlFBbe1LNM11ycCKtea6rlqChGBXnI69G0uDkMipKI5FJ50eqYYZSXHHDxyym5H63kp9g5K7g9xBUNMX7NOVrUwig0t7ZAl5vwlDDyyoYxN1/YwcEIVmkj0w+5EciwoXi0CiOEKZLscEqj4fP3P5DyMG0OptsNY+noplS6Fy7EmaGfD1a2Thki/mHyYfzEhiGZf8dTUfMwLoFTMgMFa7ZIid66L6xt3LFakHFCFyu6OT8CRb1aI9igTIXSOzcjzHD9N8x/4Lcqti7ByosagfuuEgAR4QfxqzX7sKhVnNNUnhlooVJZkQL+D3/3oTt7ecXoNVqB/Y75hj5pwycWHXaU+JCRmyUDkGvAJAN5NgoRf3lvL0K4USU+CZ0WLvv0cqAsh+TWab9PmwkDgU7zYjezRBkIJqwfPjYVlBq9QDy2Kbkwnrx2vXW5bSLkrdZtekDvMAJ4V8/Myc=; 4:jCFyBUSv4YBYlnlKvWFyWyKuuccUJbB1D9/ApJv4I2O4K6jGFYs256gEU1lsNrNwoQQY6KdlrtSj7/Q3R3ziEjndKf3o5FC3hfOJR3YwenXYtq56v2a44ZZoAVWIR6GvR/jQbe9cPvjKgf0nR4xAjwspYIZ9y2jqxfmNATsVBWuJKnCsCJcFjGQrnc/0GIsHjA7BsvAeFBWuwrVIiaTvglJ8wmMxOTd/AujeXipFsgI3tryBAglxw8bsbpgaGc8Lx8WzVn6r9Rf6WTJbUO/lsQ== X-Exchange-Antispam-Report-Test: UriScan:; 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)(86362001)(189998001)(1076002)(16586007)(316002)(2351001)(105586002)(106356001)(66066001)(47776003)(16526018)(5003940100001)(69596002)(85772001); 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:JRILoAZo9WvXL1fQ1VC+LWTrZfwWamGqDl+xspc?= =?us-ascii?Q?uzzKbJ0nvA4sel/GJFDcs6nXKvZcMEszEwQoWZuZVjKdfY7hAKgHK/IaQovc?= =?us-ascii?Q?nDEyxP7NbkBWSaJs2pccoMsErgtV3kDsPLMGK/satEAHsdb2YhM4b17oPgCs?= =?us-ascii?Q?ySdAJH0IcfWprPemrxrlccLL+8ASc8pLIeLKsrVY9YN+kJJ3QHAf10qc33LL?= =?us-ascii?Q?VM7ZuIxRz9/ivB4ZWyf8arTia3y1E9aSDbWYvAzeVzMOrW34vNRnkm7bMcOF?= =?us-ascii?Q?BnaD9ls0BVmnvYr2Qvznd4wrHiE3oDwd5f5J27fUE15SudnSehF/Hu1msM5S?= =?us-ascii?Q?/v5i8QYj4M3F0SH8cerOMYNQQvBvv56kVt4NsuQdRIVa+FWNe6EJcMu3+9uz?= =?us-ascii?Q?1b3GOO7PaslzV/BPJARIiE8lTTyA9BEcKrI2SPZ0WchvG6+YxIDTV17w4Oo3?= =?us-ascii?Q?EJLGkuPpGpFbNVeXjCdqf5CU2yyyfZEgdilffl1Uo+NB/nBtYWobmXE8X8aa?= =?us-ascii?Q?FycWMItUpjDGO2m0x6gLUzj1c9fT1+F7VOiuFqQStbThL2H8C6YyDroMIiAV?= =?us-ascii?Q?8+pXGuTCyrqWp/5A3DIhmWuPRervMCsea4L/uZbk/KAkcwB2xHcCQw74JcI4?= =?us-ascii?Q?LQCWKc+cQLbcZOe+pE24RX1lzYds5W+EhiMDhjGoBl+OPnLzsc1Vv6Q4KqOy?= =?us-ascii?Q?ohu9bCZJhwgdnyfeUKPIVKRWVihaFrOm7FQ8MsZFiHrnGWc1/z6MffnBajmy?= =?us-ascii?Q?Hg+H9HgeXiKugyp5gSfE1lrhMNPbnW/TBS/9SpAgQdlk8fnyEdE6QEBiU77t?= =?us-ascii?Q?ItwfN4mjL9fNo8jvRPve6YtBxNgYdGrljthqzOZg+ALL+8BOV4ZPQQK+qpXB?= =?us-ascii?Q?PAnaGDDRWlJBuUhHc5CDmFmgD3kkzzMt40Xc0KnaWbVFg3HrpYF91iHr3haJ?= =?us-ascii?Q?sr4qzDFhzNDGI6frq9ATgDv3Qn557XXwcqMGOp4cpGMbESBhAbvTmKjqH7Jf?= =?us-ascii?Q?eOw85G5O08WS52Y5wU2VSw6JwJCMX5MFtQqTWtBoLocIpKnsnBpPTYH1VfQa?= =?us-ascii?Q?me6LTTmc7/+YUNb8UyqX6SUWtjAJvpGTlX3vyA0LLO2VMxJikyi+kcUnT8k7?= =?us-ascii?Q?W5Dd2cg/0OXJJTG5o8BTSLVHTnPWWa47PBnc9w3lzE7npjFuS7QDQAH1gM3J?= =?us-ascii?Q?ZDKNDVNEA7HG1Rd5AypFeqQpJu0P6YqdIcoYLZ3Mdrarnf2xqnjC1ufpeqQ?= =?us-ascii?Q?=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0501MB2036; 6:1QsPfhLZv1+3Yr4WsSnGO/S2tfGFHLG2iWJ2k3Ccacu7soDyK55ZvlnIAyJmN7+ADg9V/bVahvvTuGyyINfgHQkeCT4Nk0rMvUh35/fTcXvBvnjkkHGHc8DS91oEts6Mn/kylVXp7Y1CVb+FT6C92rC6m3gK3+xsEvvAtN0+Erefz7GmNBJlipiqJekKPJNfel0Hgcf5hhKQJvfoxyxc0L1EkXXvoHyLunU6dykT95uxxi0PgIwH5kj+nPUs/ZqvoLQTpf5FV3oDH7jgFjDVIrOpQt1uFFtttIKAAiIJU1v7c7qv6wLUWWXP7GZMebusqZGj3991WYrJzLuBKzJBv91udIBArj3VK0xBmAQQPu8=; 5:zn39EE0oYv1cRR7EFwKR6cKFH5o6OYyjhgYHFgj/QiWpdi2Dzeq2DV7jfUa7F/9Ht7CXbG6+OFQVgMOcVm1iDuKOP/waoXaP/6TXkdWv1KkQIFwRtetzqifB5s6/De6o1WjNwBhNQSAt9kbuNyfEhJP8wci8yx/nL00L0N4osG4=; 24:4CyHizkZtk4iNCTomtYeTWiUlUU8maWDyjyViNZ3Tn5diUJi7rHxnov6Yf3Aerb0ByaAy/Zd3NG0VXf8lveCyL0xEx/bJQhcWI66JSqarAE=; 7:+Pz7SULTGwOVIdm15liwo2HAivfKrts36xotG4KnAUihBqy0kMxhHWh0nW3prpXSz8oBvLMmQbrS3Z9LqFdMRHYF5TzMCo2KMPq3fhrfEcJ8poCGrl0z7R7Rf+5TCZgxxXhm13RjiR73pShu0dNIEg5Yb38QNmf3lZt4ZEYmjtwhfhkzlm2WeWJmmAxoBVpFbYuHCa7wbC3W5SbFxUa0oQLANhSAbr7P4iaQu4sxBufrjDcPWKOugdx+dR/nRMvb SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2017 01:05:04.1735 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d25cb10a-fcbc-4e3e-5b01-08d51ffb6bc5 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 Specifying frame type for "IE set" TLV will allow to use several TLVs in a single message. Modify users accordingly. Signed-off-by: Igor Mitsyanko --- drivers/net/wireless/quantenna/qtnfmac/commands.c | 25 +++++++--- drivers/net/wireless/quantenna/qtnfmac/event.c | 58 +++++++++++++---------- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 27 +++++++++++ 3 files changed, 80 insertions(+), 30 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index 503187a..8d3cdba 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -147,6 +147,21 @@ static struct sk_buff *qtnf_cmd_alloc_new_cmdskb(u8 macid, u8 vifid, u16 cmd_no, return cmd_skb; } +static void qtnf_cmd_tlv_ie_set_add(struct sk_buff *cmd_skb, u8 frame_type, + const u8 *buf, size_t len) +{ + struct qlink_tlv_ie_set *tlv; + + tlv = (struct qlink_tlv_ie_set *)skb_put(cmd_skb, sizeof(*tlv) + len); + tlv->hdr.type = cpu_to_le16(QTN_TLV_ID_IE_SET); + tlv->hdr.len = cpu_to_le16(len + sizeof(*tlv) - sizeof(tlv->hdr)); + tlv->type = frame_type; + tlv->flags = 0; + + if (len && buf) + memcpy(tlv->ie_data, buf, len); +} + int qtnf_cmd_send_start_ap(struct qtnf_vif *vif) { struct sk_buff *cmd_skb; @@ -2028,9 +2043,8 @@ int qtnf_cmd_send_scan(struct qtnf_wmac *mac) } if (scan_req->ie_len != 0) - qtnf_cmd_skb_put_tlv_arr(cmd_skb, QTN_TLV_ID_IE_SET, - scan_req->ie, - scan_req->ie_len); + qtnf_cmd_tlv_ie_set_add(cmd_skb, QLINK_IE_SET_PROBE_REQ, + scan_req->ie, scan_req->ie_len); if (scan_req->n_channels) { n_channels = scan_req->n_channels; @@ -2154,9 +2168,8 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif, sme->ssid_len); if (sme->ie_len != 0) - qtnf_cmd_skb_put_tlv_arr(cmd_skb, QTN_TLV_ID_IE_SET, - sme->ie, - sme->ie_len); + qtnf_cmd_tlv_ie_set_add(cmd_skb, QLINK_IE_SET_ASSOC_REQ, + sme->ie, sme->ie_len); qtnf_bus_lock(vif->mac->bus); diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.c b/drivers/net/wireless/quantenna/qtnfmac/event.c index 4b29f9f..b67a082 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.c +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c @@ -65,34 +65,39 @@ qtnf_event_handle_sta_assoc(struct qtnf_wmac *mac, struct qtnf_vif *vif, sinfo.assoc_req_ies_len = 0; payload_len = len - sizeof(*sta_assoc); - tlv = (struct qlink_tlv_hdr *)sta_assoc->ies; + tlv = (const struct qlink_tlv_hdr *)sta_assoc->ies; - while (payload_len >= sizeof(struct qlink_tlv_hdr)) { + while (payload_len >= sizeof(*tlv)) { tlv_type = le16_to_cpu(tlv->type); tlv_value_len = le16_to_cpu(tlv->len); tlv_full_len = tlv_value_len + sizeof(struct qlink_tlv_hdr); - if (tlv_full_len > payload_len) { - pr_warn("VIF%u.%u: malformed TLV 0x%.2X; LEN: %u\n", - mac->macid, vif->vifid, tlv_type, - tlv_value_len); + if (tlv_full_len > payload_len) return -EINVAL; - } if (tlv_type == QTN_TLV_ID_IE_SET) { - sinfo.assoc_req_ies = tlv->val; - sinfo.assoc_req_ies_len = tlv_value_len; + const struct qlink_tlv_ie_set *ie_set; + unsigned int ie_len; + + if (payload_len < sizeof(*ie_set)) + return -EINVAL; + + ie_set = (const struct qlink_tlv_ie_set *)tlv; + ie_len = tlv_value_len - + (sizeof(*ie_set) - sizeof(ie_set->hdr)); + + if (ie_set->type == QLINK_IE_SET_ASSOC_REQ && ie_len) { + sinfo.assoc_req_ies = ie_set->ie_data; + sinfo.assoc_req_ies_len = ie_len; + } } payload_len -= tlv_full_len; tlv = (struct qlink_tlv_hdr *)(tlv->val + tlv_value_len); } - if (payload_len) { - pr_warn("VIF%u.%u: malformed TLV buf; bytes left: %zu\n", - mac->macid, vif->vifid, payload_len); + if (payload_len) return -EINVAL; - } cfg80211_new_sta(vif->netdev, sta_assoc->sta_addr, &sinfo, GFP_KERNEL); @@ -289,27 +294,32 @@ qtnf_event_handle_scan_results(struct qtnf_vif *vif, tlv_value_len = le16_to_cpu(tlv->len); tlv_full_len = tlv_value_len + sizeof(struct qlink_tlv_hdr); - if (tlv_full_len > payload_len) { - pr_warn("VIF%u.%u: malformed TLV 0x%.2X; LEN: %u\n", - vif->mac->macid, vif->vifid, tlv_type, - tlv_value_len); + if (tlv_full_len > payload_len) return -EINVAL; - } if (tlv_type == QTN_TLV_ID_IE_SET) { - ies = tlv->val; - ies_len = tlv_value_len; + const struct qlink_tlv_ie_set *ie_set; + unsigned int ie_len; + + if (payload_len < sizeof(*ie_set)) + return -EINVAL; + + ie_set = (const struct qlink_tlv_ie_set *)tlv; + ie_len = tlv_value_len - + (sizeof(*ie_set) - sizeof(ie_set->hdr)); + + if (ie_len) { + ies = ie_set->ie_data; + ies_len = ie_len; + } } payload_len -= tlv_full_len; tlv = (struct qlink_tlv_hdr *)(tlv->val + tlv_value_len); } - if (payload_len) { - pr_warn("VIF%u.%u: malformed TLV buf; bytes left: %zu\n", - vif->mac->macid, vif->vifid, payload_len); + if (payload_len) return -EINVAL; - } bss = cfg80211_inform_bss(wiphy, channel, frame_type, sr->bssid, get_unaligned_le64(&sr->tsf), diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index c558d81..f491942 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -1147,6 +1147,33 @@ struct qlink_tlv_chandef { struct qlink_chandef chan; } __packed; +enum qlink_ie_set_type { + QLINK_IE_SET_UNKNOWN, + QLINK_IE_SET_ASSOC_REQ, + QLINK_IE_SET_ASSOC_RESP, + QLINK_IE_SET_PROBE_REQ, + QLINK_IE_SET_SCAN, + QLINK_IE_SET_BEACON_HEAD, + QLINK_IE_SET_BEACON_TAIL, + QLINK_IE_SET_BEACON_IES, + QLINK_IE_SET_PROBE_RESP, + QLINK_IE_SET_PROBE_RESP_IES, +}; + +/** + * struct qlink_tlv_ie_set - data for QTN_TLV_ID_IE_SET + * + * @type: type of MGMT frame IEs belong to, one of &enum qlink_ie_set_type. + * @flags: for future use. + * @ie_data: IEs data. + */ +struct qlink_tlv_ie_set { + struct qlink_tlv_hdr hdr; + u8 type; + u8 flags; + u8 ie_data[0]; +} __packed; + struct qlink_chan_stats { __le32 chan_num; __le32 cca_tx;