From patchwork Tue Oct 31 01:04:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 10033523 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 8BB3A60291 for ; Tue, 31 Oct 2017 01:05:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E068286FB for ; Tue, 31 Oct 2017 01:05:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 730EE28965; Tue, 31 Oct 2017 01:05:44 +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 DA3D4286FB for ; Tue, 31 Oct 2017 01:05:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753186AbdJaBF1 (ORCPT ); Mon, 30 Oct 2017 21:05:27 -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 S1752996AbdJaBFM (ORCPT ); Mon, 30 Oct 2017 21:05:12 -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=5zne2mVRLtFYubMdZjw6QdIPa5BLrl7prsdKX4lATvw=; b=xnAGogk93RcA4DrtD5Ck9YMQqXHwZTWYpOS/re+FRjEW8CiBnTglECUxPdXbNr5/Myrt+MDmUMdRBE5ECOr99hLk3wPQM5aQBZmiew4uJ/dXpY2HdWVEbC11CzuTDOgRMGyrbQ/7M4Q8mPSciN0dh7IwA356wLXbJR23msa+WXc= 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:08 +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 8/9] qtnfmac: include HTCAP and VHTCAP into config AP command Date: Mon, 30 Oct 2017 18:04:54 -0700 Message-Id: <20171031010455.27772-9-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-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e9b1a591-8971-4027-2bbc-08d51ffb6e7b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(2017052603199); SRVR:BLUPR0501MB2036; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0501MB2036; 3:+R8t2X847QEqZo4QGriWK6itlTbgkY/UTSKdEWVXoqf4K6jkoOoceV1W5f0bL5LQy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pfvxHL/NaonK6MAe2Y1wPo28xKv0t1SjerKhAVlOnXZYq3bVpFUY2bIY/F5iWIDUpnHbCbF5EbPKMwpbO6nZhMAuQHiN8SeLfD5+MC9MUz9p5SIf6Nzy2yMxqCqfR0g37ZZvnxO/pIUPj6VM46ouF+QoeY66E+BAY9uPu3Boud0uZ/pZzlcz+M8gHz6vo1aJIwgHVAB7qzrfYSiONgReAllCz19rUktYTuETJNlgTzaAtV2BJjs/IbaeUbN0ANakxC1KELAjvNoa6e7k9+bmKm8PLEqa6QYLejTK29URHYvobyqF/BfZHToJtRFG98p1bzz8FDdGVDuRamgGX+VXCOttmovmtJupE3/sGtftCtgM5NDlVOPiAKf12jx6e9KFN3fUr9opVoO5pMzy1OjgM=; 4:MK7JO1Rk9oRaw2IozAK0y9V5mtR2SWjY7vBwsuHBkRmN8Iwojv250Awb+uihM3tQ+Uno5m+SzP8499GnxbziEf57qGr3egS4uYtCK2KeHW+XeWejCVQCSZTYSGhkEzdxoEsO1NO/XnFjD6I0mWYRj57BmnVZHWqeWmZgNx69Tu30ry6Pvs0xwvDzZw8DdE5plwQOdseUmLldf8gQsbwaqcyXsJsHCdAKuPIJ9Hwda/o+9nSidqEfUUixMCpWUWWf3fVd0FGW714QjbyshR+VHQ== 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)(575784001)(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:e7mehRyAqm5uvvqSuwm74JjWaefTKO1hTIvVrt1?= =?us-ascii?Q?8CI5IcxPM0IzVrsjuLxrVQCH++NE1WrhJn/FJ21siu/p8gruDA3g/oJnwuVg?= =?us-ascii?Q?FbrKKhLgpnWPqoGuQMFDGvTIMcrldrwvlF05/6rhLgHlCUOF8EqX8W7nZERc?= =?us-ascii?Q?aOl6cd0bxtXWFJQL8zyEF7B7TA84kQT0HuoXQjGFRGRzJBV6X4PKdNAFniZi?= =?us-ascii?Q?W9GHUNdrVDcQ0BsGb7Zfhyy9AjqFwCayDTgqFk9NdpYj5suaB6KaUxxOJkwe?= =?us-ascii?Q?oEi1KYTmXkYPb+rx2FbgWUFdUeqVkV6GnxT/djd94iwm7yoJ/mg2J/cFPkeF?= =?us-ascii?Q?Gg/IvnweKuwFx+ShobPh0K/q5Wn8dKw31jL8kV658PYh7ExlH8U75Vmruj1S?= =?us-ascii?Q?bYMeIwtzyLPnYZv6QWd+DI7h3pVRooIm2GtOwO0pIC5euqfLGXPU/lxKD3WA?= =?us-ascii?Q?ZsTsTVSduqLM7CZ8sTWQrgIaOBZyCsuBet77YzEU7BRCMaNToXxWyp0m/eMW?= =?us-ascii?Q?zDXE0dcIsnJHTKJ4QoGkZl8VzC4l+DJcb6I/aiES5NxZtGhR56T475dYTnO9?= =?us-ascii?Q?gA+bkpLe9JxskrKBvPJS865EAaa9ZSD6ezEdNujWa77w6aQozemET6dPKI6K?= =?us-ascii?Q?Q+IRDrSsO3KRA4j1tqaF+ktG0wdxU53hNxa9uCIn2lIHqN7OrV3KPNfZSYsF?= =?us-ascii?Q?L5iT7PiVgQo9b3bBpEBGGgTsstw2mdReu70z6az68PuI6IWx96t8YXIfvlxx?= =?us-ascii?Q?hCuSq6btkoTBS8+tFhADfNxxhEH/LXv0AKYU2fg3GFMaSHrjn8DMxCMF49TU?= =?us-ascii?Q?0x2ubTePVF0VIfqzK8IXdWfvg2NlI3kae48D3MJw8pDu/8afbkXQ381M3hG5?= =?us-ascii?Q?JPrEKfHKr9/97GhA3oMb+nZ1VKj5FnCmlWwf/b1MYWP6E/UxkvcgUZpqwF2Q?= =?us-ascii?Q?l58VaErEfbIloH8JLuM4lVBSh6C6R39mtti6syfHVsdgwSX3zIkynrE2Sg2y?= =?us-ascii?Q?Kw5aESqC9YT0j8xNSumYZhNQ5zCuXbQigMYDaOPHWTG9yHDKBjvRxk5CakIL?= =?us-ascii?Q?QxMftJ1AK67KKaQBwP/d9KNAixIPTigCdg707HH8NsHdRYNMWh4c21uUQz8t?= =?us-ascii?Q?ptvcHh2T6fhQU6yi/Ydl+KnFoToEnlvU8CdD1jAozljkcef6ZZaOj6InlDD7?= =?us-ascii?Q?//jOtRK+Kc98S7SwJ6UIqXbbXB1U19crClcPTd5XQc3Z6iga8jEYS6iL+NkQ?= =?us-ascii?Q?/Y9zakBPXBjADre0cwCY=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0501MB2036; 6:XWNFmcnP4ndLrXKC4ZEjYhH5FcTS3Qig1UXwMcH9M6J9ejgBLt6+b+l9kny7FE1b0U7oangAtdDMujqmJIP8EX4qNQwSo8athl01pxhYwstY3DfqMDzx+yGqbecLkkQda+62TcQH5glvNC90x/5SSa4+dlyRUBwMAFQ3tigd5mgzJjuuZRRqRy0f/0NaN4iWAIiKhVqSp6rkPD10o9XVNHh6onxR/xjQhfs93XfsIF3WdqAG27riO1yQ4i0AQAggaD4WmxT49IaOQpkfG+EePUAg6t4TRwXLR0pkCwbKP1D/xJ9JNwAiE1n78yUI88UWSRIPZxTfn0YsIWjIPdjzLxe24/4VjDAp3EI3aZLJS4c=; 5:HodF3R33kp3gMfNJzaZ1Fz7KBBox+qZaW8J3nydqWRu9N1+CPtv1ezhsPuN56CXUb6mutB1xFLvrdR6iS43JctsXfR61fIN1eTRuLnh1pRd80GKUjiylkDqUK8gDkt+FKg3yrLZ1OBdk4kn27wtAGO915ljULyIEFlzz3av7Wwo=; 24:kmx+GJ0rVXQv2MdEi2Kn+Ck7rbDvb5qdmYvhHrkH64Lmmod9Vg7w8PJGxIRidgusIdEWZ0Fez5vabyV9O4w8fr8WAYD8NVncttJuv6oNMLM=; 7:K8598k1BpdHeA3WT1YmwHDpdxVvO6X7pG60yVdpVQT7a/Lh+AqnfAOYPKu4htT3JLEpEDfNzu5G+w0XnwcOkcha80eCwXqgYamG9QskkpqhiCW1ZKkOzM++C8tiW5Fi6VL4iJ6hmNk366y9Zm9CoAu7lxnz1yNFtSCau2f34dqglcWBEMHGaHZMUZPP36gEYesVWvlFpxn/Xec2rFgDJVRKBMXnBzMGgEX47ERd7CLbWCNsUXy6phb14mch6CG3+ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2017 01:05:08.7048 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9b1a591-8971-4027-2bbc-08d51ffb6e7b 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 Include HT/VHT caps directly into command so that they won't have to be searched for in IEs. Signed-off-by: Igor Mitsyanko --- drivers/net/wireless/quantenna/qtnfmac/commands.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index 5186116..c2f0b75 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -266,6 +266,24 @@ int qtnf_cmd_send_start_ap(struct qtnf_vif *vif, s->beacon.assocresp_ies, s->beacon.assocresp_ies_len); + if (s->ht_cap) { + struct qlink_tlv_hdr *tlv = (struct qlink_tlv_hdr *) + skb_put(cmd_skb, sizeof(*tlv) + sizeof(*s->ht_cap)); + + tlv->type = cpu_to_le16(WLAN_EID_HT_CAPABILITY); + tlv->len = cpu_to_le16(sizeof(*s->ht_cap)); + memcpy(tlv->val, s->ht_cap, sizeof(*s->ht_cap)); + } + + if (s->vht_cap) { + struct qlink_tlv_hdr *tlv = (struct qlink_tlv_hdr *) + skb_put(cmd_skb, sizeof(*tlv) + sizeof(*s->vht_cap)); + + tlv->type = cpu_to_le16(WLAN_EID_VHT_CAPABILITY); + tlv->len = cpu_to_le16(sizeof(*s->vht_cap)); + memcpy(tlv->val, s->vht_cap, sizeof(*s->vht_cap)); + } + qtnf_bus_lock(vif->mac->bus); ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code);