From patchwork Fri Aug 25 02:30:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 9921189 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 735BD600C5 for ; Fri, 25 Aug 2017 02:31:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B76F204BD for ; Fri, 25 Aug 2017 02:31:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 50086205A8; Fri, 25 Aug 2017 02:31:31 +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 B820F204BD for ; Fri, 25 Aug 2017 02:31:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754528AbdHYCb3 (ORCPT ); Thu, 24 Aug 2017 22:31:29 -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 S1754421AbdHYCbH (ORCPT ); Thu, 24 Aug 2017 22:31: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=se1xkYLyKldRZvGbyXPGpIumu5Ua0Ho5uzCPoCJOmuk=; b=hKAPCYTK+QsYJVFrep2iXSxke9++K37J+sfBnDKjSALxiFQWZvpqufUBWLeZRc5kcvOh/RDBhE+r3Tnwo0zjzFYgZEZAp/QEL5ZVvlIQu7BfpeMPrLtH1uupVlp/6nFC0XMzIFsKjsEiJmbnzhL0ZSFAkwDguBYpV5/YTBYse+s= 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:03 +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 21/27] qtnfmac: extend "IE set" TLV to include frame type info Date: Thu, 24 Aug 2017 19:30:18 -0700 Message-Id: <20170825023024.10565-22-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: 17821824-ba90-4e48-331c-08d4eb61555d 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; 3:2kujXr3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9jdZIXWKgCr0LP0v1xMo1dHt2r6BpzIXpH15id9dZ9bpCZXB6zhiaEecpyRoTCLWXhVkOOV/cGAVyPxb8vuCTmRN9nAL/CB0Lt0d4v3JjyhGo7hkVzcwaIwQfXdXu1bn2h3g/A1j4gO/6JGsYkfRovbm+0K4v3k3ngpB8Qx2fWpBMpyJvM0EvHGNlVXbZPh7MlqQ5+87CxMHxMIzyfOSdJx7LqsSe+TleRNdxwXKQeNn5nrPTn3J4vnJurtYMGZ64QJqX+wloH5JQhDVV/kHAR8wvddvZyO+rTadvRGcfvb/08v9blVnmrMOKDC/1ArrIWRj2TlpBAPgS/1eTrbmTFdRYtsJ3bzqZ48MS+0QKhbU10tudvMPQ2C9f4yuLtfvzmNky3n9ylz//cYBGrva1IIzW938D5TKC4DcJJn2qWYZB79Qi5Iob3lT7xBdccdkGzttO6wU=; 4:Frr9Kzkq8lEd9NCxYqAih4UhNKtyh75eLwvOlIhdmB7Pp+ziTx77sy+1+Uhv8E6MMOnmlkQoSY0TOAChEzV/hfZF6ztqlItqqItYTaHUvir1nbBipL3rFo03DfL2KAb824WXTki4oszSUnAQdZwpoVQgLvusfpQv8LaWS9zru8m2fCfASbprHp8dfwUs2Oyuo2bc24QkAzIBhRSGpCJvNCpBUZ7d3kRZAAdp+5xGoA/ddCaE5QcUuJRhey5Zm0oc 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)(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); 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:74Q5kjICuaeIxWVips56IIJE8ppu1CY4jmnNL77?= =?us-ascii?Q?eikPG0mFCO+FHl9Sllpn8QSii3XEd6ohaw8Y4o2QnDXUXhwaRve1Gtktp3ql?= =?us-ascii?Q?baeO4k7TpLS8VpkVjSEGV9dz0lukpsqFzYxIHhHI6a4A7O1TD/VhnDjGU7K8?= =?us-ascii?Q?R35fFGd3/kJLN2hnMHCpHK2wc9CBi74H/rcDv3omkKAbAcXocpLkJVNwTQ3m?= =?us-ascii?Q?yZWpW8XrcYujpEJ1c7Nhykz1WJhvR95hoxqj2zNQ13EtWvSf62MLaLQ4yyp3?= =?us-ascii?Q?aaC/1dAyCAekr99pydoElypPMauhjboigShXicUR5u5Qq6Mk76gUllDvXyts?= =?us-ascii?Q?v3zf4ifVQf+gbV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Xms?= =?us-ascii?Q?DXFkZ0pk4UkEsdAd9pEmUnOmY4UIaZrEw9rb3Z6cj?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2047; 6:7R9TMvw5jek/y0wPlMIUHLUK4seQOebnvc7LHecd7I0GrT6+Wfr+h8M/Tqx5r3rmW+odPOil0R3+4EbKczIaQf6E4nnkIqPiAWl5b6bqfOrKeCxoJOCnSOILQsqaQmXG30DoSVJfw6c7M3ouhV3qbFK4o4L3LRgOGWqCyK/SoGhQJLROyAkE2d2Ey9477HihyUpqVXgryEbiv/gaFb9KxnGtJkGQ9HA6cMbeQPE1aWxMBPvUygZIRRo1uW5cqsNXvdjl0/crkRjARZwYOKQapF/uk/ZyNVByShP+5JgcXEcORBmVWWTLASLT1l+SQzJ1aH7dZabnCo7zpmdfFrzn1w==; 5:r455l+ccEI2f1H0QtpoO0QW5ZfKLzo87PlxVhAnnzp/6OGgdNjzp9xRCfFY3kDpv9sKS3T0FrMTNtTMq5bpTwhOp4Qr6oLOW+bI8lID/D3QWcULlXgj9zJ6gfQlXO8aG4GhGgsuFeOWEQE+LhA5yQg==; 24:1dp+40uAyeX3gXwlihCC+9thQ0gsHYKdajGovPflrIc8eSGrg+JpmTAM6aQz6uYUTiUbr5sms5xoYnsiJKPHKyTYcRwEzKb8p0nCA3l7cBA=; 7:ZXure8r6FY1BSRu5KqCJRG017wMXhqStUDBWUg40PPILwLj4rknwXU3qgUZDvga8pkhBw/sCQEv4vMkyfpNlnwhII6qYt5HwesBleyxsUojoq3powfzTnF8sHPOT9sRUht5QJDcfKjvuZ8gCFybqZ3qKYr6kcVcsZd0Pg89nMB4SXdJ0oADyWM4mHNigTvS3ea5VQqLg5t7Agzahem3U3weoH2Uqm6FPSFGPo+aV77k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2017 02:31:03.6827 (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 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 79a3e75..cc37114 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; @@ -2026,9 +2041,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; @@ -2152,9 +2166,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 b2f6410..c2452dc 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 e4d3e7f..ecf493d 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -1138,6 +1138,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;