From patchwork Fri Aug 25 02:30:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 9921179 X-Patchwork-Delegate: johannes@sipsolutions.net 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 7F731600C5 for ; Fri, 25 Aug 2017 02:31:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68A1A204C2 for ; Fri, 25 Aug 2017 02:31:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D822204C1; Fri, 25 Aug 2017 02:31:20 +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 0395F205A8 for ; Fri, 25 Aug 2017 02:31:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754524AbdHYCbS (ORCPT ); Thu, 24 Aug 2017 22:31:18 -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 S1754484AbdHYCbL (ORCPT ); Thu, 24 Aug 2017 22:31:11 -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=/YElgbVwllDV7V3tCbFWONh4q0UfwTn7NRYSVyg79dM=; b=n3vQHHtbaD/0iQtsa9UksbQWbMQ7IlTqQ5Gmnwqvvb1XEGOMNu+eTGscjgxuChWzotcynchpXka/iZ+a0B/zm3JzGVnV980pWvkdM+H2YysuFvQfZN6PPhIodAW6HSvM5XPBV62fFqQMamyDJHvcYeKs62GhhTEV7FQYnZ/pRUQ= 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:07 +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 25/27] nl80211: look for HT/VHT capabilities in beacon's tail Date: Thu, 24 Aug 2017 19:30:22 -0700 Message-Id: <20170825023024.10565-26-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: 8ab93dbd-d347-4bbe-0ad2-08d4eb615797 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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+UIfTq8+071zTyUf996HmULoO0rtkBFfbMOEG19+dKOPr7wDxIz7oS4Pubxn38509m/JXpmaoxugzWAkP8pSSAhv9N5+92NtMuNX5SvxOTooDW4iBZ5Nr2Gxv8Z71MDDM/nIQQOva2ctyX2IeHX8QONr0VJ7yS3lwlXO7s+UrhDxg549wBHS0tU1TTVyPA/Dl/4ntaat2pksEsezCYP8cks9ipYVxWOfhhT3FTM1+Ep+R21hVzyKngP/yqx/dIcQH4VxkNJiI7baA2+baioOX7A6NFXM3oiRMEQvtrtGV4D6BZD2T4H9o7oC7G1FH6+A+wxL4HEKQFkebqczM7TLazuu//qmekacCsA/jmxvX+XW6h96uaJm6wJ0wLwhXcR5ROjAYE9R0R/DwxbStO8BQd0TyEyEm5HvdkuR4VR+VeDr1e9QaufaXbDIG5IQJKWtS9ub0=; 4:A/iCKYrbPfhNi9Yr9ZwJmCpRhbFCGRHchRMgwSeAS7ykC7BzCPTynrQQjOWiYQGoRqziFo2iXjQL9xqTYeq7tFvh8PVM3h752nNi0TG1k/hvLCR5hO7e3LuPDKYCTEEZRAvsrF8K/xhbLH/wa/lNvQp79W781z6hMwnxtbpA0h6Xhv13YCwUJ82j3HIDYEQiCGJTvqBAaDD554YaRxTHnPyoxpzFkfKh1QT/L2+lNWnbr6gIbJi60H4aL/mCGiYX 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:2cnyaGr7lVpwEAHy3ZCWmPpxVQqqjfvQLQN+vpj?= =?us-ascii?Q?3JN5/E4bi42oXw/OMJV24kVv48+9YnEc60WDxio4pjUmw8lhQ2AQch+Uo+fh?= =?us-ascii?Q?zeVs1aQKE6EVvyN2oEQXEGlfP7tsNFlxie2F+WSRk4Z7gEkHPLwRCOcIvFkQ?= =?us-ascii?Q?SNQZiRqhjDkMEd14kkOOVMsIxv8UwC21Jb8P6GA1xG9KUfU1f/LSNCD0iCQQ?= =?us-ascii?Q?Wu2Rxl1pA1ktmAsGtFkIeVWXWe8hMDAr8zmcN+R3OyD713gnsOYSu2Pm05VO?= =?us-ascii?Q?cUQUOR/DY0X+dPKC+cBoUjE8XsqbJYrJEM8OYmkyqHtjjP7BZfNXvzEXds/t?= =?us-ascii?Q?MAdg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li+LxQKIbmM6DfcGYFdibuQpPdHLbf?= =?us-ascii?Q?FeOPPxRXgPDPtG3lOJWg1Fejvc9ku4zFbraKtElbA?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2047; 6:86h2iFTxyErzO5mj2p6Eax2G0XkzPOTWGHMP6I7dftTKlggbx6PtMTNlHBDY/V1U0UCqK6QjoY3oguhliGDVqBlyV9TuesgkCG/+cU0SpSpC3OAeHLqTIt3tvLhGb9oXZj4JQHskxhRfvpYUa+hIWRRO+ikBXzteL5NTgSy4q2X+ZkPObRaTYLiYaDZ9Rh0Y+qz2jn0RMrjzvbeJz9QqSBbCc7KbHMC9FGMrFO9qrhaKlF8siyK/Xyr3ACqFVkmrPRQr1tiRbK3oRdrEhFjiDqJ9iWvLYN+bBVzBvjVzr8bi1ndfZiA+KRPLvneB6WgqxBApG83aRMCZ41fuAZo48Q==; 5:ZI+X+UjgJH/ttindSqbfa+Kb8PaYpCnF2wO17Pcxui0+Fp2v+933gkPNM5fI7YVM6kCac1JDW1vLHMX89C+LYku9BetykA8KJC9jyCog6Q8ABe2HHnBSB3wbgdq0EWHK0KkOWxxdyYl7ofW0EYFs7Q==; 24:CtuYeiIOLxVClkaBph1DyUd8P4V4q69bNwSnA588S5MXUquiaIhkXn46nFxIuGs9WIQy3ZWrvkj+t2ZMNMFPyfxvjIV9NpO7oINq38KyDWE=; 7:jIvK9+Ymtf5wujL51GdeNURwcoTZydnYlSQW+Ysk6oMwjPktLoIfq8uYZA4swaqc77ABqu3zXM3I2ZVDhLv03lEdjKvFdCf5Fa97s0xHerz9wo0IEgDdwTtdoubdsDeyh5U427vJarNSKDUVmsly5/WrqBHJ5CI4CiZUlA+bGeFw9BhdSbuO+UPauHKwnOq1tvfepwgDk/WuSYsdGClGPhx07NV2fyQPAhL0pq8AGY4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2017 02:31:07.4016 (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 There are no HT/VHT capabilities in cfg80211_ap_settings::beacon_ies, these should be looked for in beacon's tail instead. Signed-off-by: Igor Mitsyanko --- net/wireless/nl80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 8ce8542..0df8023 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -3791,8 +3791,8 @@ static void nl80211_check_ap_rate_selectors(struct cfg80211_ap_settings *params, static void nl80211_calculate_ap_params(struct cfg80211_ap_settings *params) { const struct cfg80211_beacon_data *bcn = ¶ms->beacon; - size_t ies_len = bcn->beacon_ies_len; - const u8 *ies = bcn->beacon_ies; + size_t ies_len = bcn->tail_len; + const u8 *ies = bcn->tail; const u8 *rates; const u8 *cap;