From patchwork Wed Aug 30 20:52:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 9930749 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 CD95960383 for ; Wed, 30 Aug 2017 20:53:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B536A287A4 for ; Wed, 30 Aug 2017 20:53:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA24D287A7; Wed, 30 Aug 2017 20:53:29 +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 2A6A4287A6 for ; Wed, 30 Aug 2017 20:53:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750968AbdH3Uwe (ORCPT ); Wed, 30 Aug 2017 16:52:34 -0400 Received: from mail-by2nam03on0047.outbound.protection.outlook.com ([104.47.42.47]:25312 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750761AbdH3Uwc (ORCPT ); Wed, 30 Aug 2017 16:52:32 -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=tXM/50yy6xMlxIY1PGY/H5TzaZ1vVMWCvW19yfMRgZI=; b=TOiH/G4kJHXMSJvGWa8GVSuCKnxSABVmN3LSnmzORBF46QVdRZZKR404aAU24i8k7RT3wL4a8vpYVakMRD8HowGntAZD2GLaNKxLfbI9QxF4U4px3u1pAFsj0Wr674plI7P81sYKOxqtUfuT0Udv3ROVBCglqSLl15ibjBM8m1k= Received: from dodo-dell.quantenna.com (12.131.200.68) by BY2PR0501MB2039.namprd05.prod.outlook.com (10.163.197.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.2; Wed, 30 Aug 2017 20:52:29 +0000 From: igor.mitsyanko.os@quantenna.com To: linux-wireless@vger.kernel.org, johannes@sipsolutions.net Cc: sergey.matyukevich.os@quantenna.com, avinashp@quantenna.com Subject: [PATCH] nl80211: look for HT/VHT capabilities in beacon's tail Date: Wed, 30 Aug 2017 13:52:25 -0700 Message-Id: <20170830205225.17228-1-igor.mitsyanko.os@quantenna.com> X-Mailer: git-send-email 2.9.5 MIME-Version: 1.0 X-Originating-IP: [12.131.200.68] X-ClientProxiedBy: BN6PR1301CA0030.namprd13.prod.outlook.com (10.174.84.171) To BY2PR0501MB2039.namprd05.prod.outlook.com (10.163.197.26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b11d74c1-03ea-475f-ef4f-08d4efe90801 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR0501MB2039; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0501MB2039; 3:WX2EpmM3bKiq67QkXA8cRMhMsUX/yqBZMLj9jxLMjivB8csumyqRRjT18x7yQdPSbDsUlLw6DrRLHRelbPgCqhV9P3Ei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p3qbsWiEI0lNMnwVt11DP7ueDSlT8wkaVRzYLrWU3jxVPpXGSElf3UVgyqmCaWfKU9OCji+rz5O437OwO1yJ9tYqBDtq7l+xtOQ8UHrP0wDvuPi2EgXkGRfPSWE2iI6KuQrVwe9yH5ST9chlS+l01M9qBNNo9N9ZPu515ycJBA15r8Sg4yR6Re2SNLOH9CwwDrNAE1/4s+meNw858OXGxwJOqKhbFAEkMX8b1r9rUAaqRQUZJA90XacjEhaKv+TdWSVKHVQwT/tBS3EK1OKOOd8bX7Z7VvSdlhIbuIUdrmjPtpTCu4mksVQqJUZG/jUm7goe7tyrMURVooIRihsokGKgqi3m8g=; 4:dULG9o9yFmyAQFvmbMtZv+7M/2WE+lXJIVB68zteZ7Yu8RaRfHzwRAtz+Gs6c963f7xZ6m/xdi20lDbCNG8tL5elgoe6veYE3KBKLwjdQLsFkirp1qFCpqBQSjHj3hTJQ3AToLt5MY71QQ/TI1d9T6g8aZ1eYpANi/Le0xnXYroPXr/4tm4hS2jBB+t3Le0ucxST4hawWNdtjYQOTXHKl+/sXd244B4FDTyQub0jI9k0PKIma+0LkIy9iwKiza8P 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)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123564025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR0501MB2039; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR0501MB2039; X-Forefront-PRVS: 041517DFAB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(39830400002)(199003)(189002)(6116002)(97736004)(3846002)(42186005)(1076002)(47776003)(103116003)(66066001)(5003940100001)(9686003)(53936002)(7736002)(2906002)(68736007)(305945005)(6666003)(8676002)(85782001)(6486002)(53416004)(478600001)(8936002)(50986999)(50226002)(4326008)(86362001)(189998001)(106356001)(81166006)(81156014)(36756003)(5660300001)(50466002)(101416001)(110136004)(69596002)(107886003)(105586002)(48376002)(25786009)(33646002)(85772001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0501MB2039; 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; BY2PR0501MB2039; 23:VoVZKgqGZvp+/xPW9hVqYW+iQ52cK09TUNddgzc?= =?us-ascii?Q?HO75f/M4ccC3s6veGU+pBcIm2NBds2fE77jnFVNUJ3bj2RPhNyWFCqkhcqEk?= =?us-ascii?Q?7mQAQWvvBG1h7D/HaWpJAMaldpBw6m4dPxXMnksrqgOnzuMfE79IP6K/gpXb?= =?us-ascii?Q?xCQ8Cs/gh4YXDQSTzfwyzjnIEPA/thNlbPzKJ3wTvusIPdHLWFSZbHUyvO93?= =?us-ascii?Q?wW/RqHBY9f+X9Qw3mA3TSBnivBaoNpIs8mLzEmdC17H9uvvt7DuATZ5CWyj3?= =?us-ascii?Q?tmjfFqODr7dUG3XTJFco7b0kUJ3puFK2LbA2YAe7iEEyBFC+WixY52PfVgb6?= =?us-ascii?Q?7ih2aR5Bk0hLXg7sIh+Ci8EtkQHyX8GQVupyiz3szmPQnkcmoJO+jR8RbKc3?= =?us-ascii?Q?0eyW8QrXV7ElEFttUS6mHXxqP6oMYqmSdwKlD+qAq2E8Rv5uKDXpYW5ha8qq?= =?us-ascii?Q?zFK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O/eNgIiRrRapUoPBaUv7+34c67CyZOQIXzAq8WICfD7mPiXGvmKI2EpP3OilWQAJVeZNYdFkVE6RUkSDFGonXDDLRe8YlWOjCr2jDbLCRUrlfFsJeU5qO0bo6qyhA==; 5:HqDLw3nyIetkqN6aIzKF0BGYdyfMfD3vZhRbYV5TGvYD0IHDRTgMg8eDSHRzveEVLoeOpWqoFRmz2SG1CUvadO8wTs5DZLYX0mqDM+5YpAeiAL+SV9FnzAo/JB6D6w9kGrfNFKdhyzOWgmfn1CC9Fw==; 24:rpDS1Sypt7yFr5FR31qNyITrOB+2xX3zH77uVHkRUgFsWYtYYI0EE6/7Ehy+MTOwY7FKfqLQ8ltxcv78Qu7bAdUM7L0WE8I4Rnh/MfD96BY=; 7:bXCaUOzHTaUJKDa7adpg3G5w9de/M58IvF0TOIKpEsS6HjOQitdABnCR3N+xfyjr+rXfLbkC8wdD6LQHWborhIvhYuYsPBumC8TQH0/3FfY1QdmJVlR3ktlnTnDIsvFyRpJ9cf6rEPuCRfFXPZFhDlq6kuu3TSZ/VeM7FjEOw6ScogmzG33vb4veM2Rdl284AVWQGueSPIsq4nzhCk0MVCcc3QW7thBuDs+tGGDxd6o= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2017 20:52:29.7938 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0501MB2039 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 --- This is true for hostapd (at least the one in mainline): it does not include HT/VHT caps and WLAN_EID_SUPP_RATES into beacon_ies. But worth noting that there is no clear documentation that I could find on what IEs could and could not be included into beacon_ies. 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;