From patchwork Thu Jul 27 23:06:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 9867677 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 E05BE6038C for ; Thu, 27 Jul 2017 23:07:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D387E20001 for ; Thu, 27 Jul 2017 23:07:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C82CF268AE; Thu, 27 Jul 2017 23:07:54 +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 3A35920001 for ; Thu, 27 Jul 2017 23:07:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751685AbdG0XHw (ORCPT ); Thu, 27 Jul 2017 19:07:52 -0400 Received: from mail-dm3nam03on0070.outbound.protection.outlook.com ([104.47.41.70]:4066 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751673AbdG0XHt (ORCPT ); Thu, 27 Jul 2017 19:07:49 -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=6sktSYAe4gR4nPQ/J2TCaZnkIHbXDBiTYu/MJgQWkiU=; b=BKrdysFFoh3oc85d16IGs7cyR2aFYcrGu349QOJLv7sQtObp0f7spnrT3jGwAbSpCelEH4bTG2L6B9WfakYXLp1/jEGEBRH+Sc+Rbbc9C9U/cekERxvDtyW4JorXl0gmSiHsWmvyT3pRPnwltdhQrp1xOq6xt+NX1qWr9AjAV9g= Received: from bars.quantenna.com (195.182.157.78) by BY2PR05MB1928.namprd05.prod.outlook.com (10.163.32.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1304.10; Thu, 27 Jul 2017 23:07:46 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Igor Mitsyanko , Avinash Patil , Sergey Matyukevich Subject: [PATCH v2 10/12] qtnfmac: fix handling of iftype mask reported by firmware Date: Fri, 28 Jul 2017 02:06:52 +0300 Message-Id: <20170727230654.30850-11-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170727230654.30850-1-sergey.matyukevich.os@quantenna.com> References: <20170727230654.30850-1-sergey.matyukevich.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [195.182.157.78] X-ClientProxiedBy: MWHPR11CA0019.namprd11.prod.outlook.com (10.172.48.157) To BY2PR05MB1928.namprd05.prod.outlook.com (10.163.32.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 24a43d29-ae94-4fc4-a8c4-08d4d5444c49 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254116)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR05MB1928; X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 3:4OvoQFvW+zKzcDGQavl2o5GYnX6uNdTEgouJmeJ5ziLcVO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PZ9PtA0/blia95gvOM8Kku04wNWOB0OrH4EtIB8E1eIFuuolTpTzTXR3rbLoH0/++NTPM2qA33haECiYpV9IsFkDjOgn1krYummt/IA1ExNlBRWx1z5RctXzf1nxXuWxhwHdcmSy+hbzYi0vOH+lxBrP8VSdYI+cKaswt/HlluP6 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)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6041248)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR05MB1928; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR05MB1928; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR05MB1928; 4:3PQED7AsGZsw+HMTFMNK3IEgIZlJNRCzeBg45Xox1d?= =?us-ascii?Q?PDBhPFUIIfz6E0G6EQ/DZ+LDLVgsMn/aTKYQSMVjM7Hazt+29r7S6YICJEV5?= =?us-ascii?Q?InUGZJLymyVzazr2bTAaTydcb/Rk90sBMwhBgwDDmC4edSxaFrsnB8mJ1nny?= =?us-ascii?Q?By1xado7nkBlzqVccEFl6dUEtLtpW8t4bIU3MyEWnqttXOuNChTJ8jC67u+U?= =?us-ascii?Q?oWCmAUEcX474jIv4pomeyX4ACai0AnAzBUFDn7WLdxbAmyvuDTGmtkaF4VkD?= =?us-ascii?Q?wy0DT15i+othvAgxJPe1eU/9pTRki3g5H4LTUw46yT9ZpI7aLroyhhF3mgfQ?= =?us-ascii?Q?xzFlLbXELHynyayiT+D2NGN3ehXy/hmMKsT6ge/tdqwQBXWTe1IREtXPA/eE?= =?us-ascii?Q?x0YISVit9fkhKWxo29vV+j4+ZVVol1yhDxxshyfQnHoR9rKfaj7qSJ+AQKa9?= =?us-ascii?Q?13ximtI5VaeVQXNcX9RyeMDdN7u7N2PjaLq3dGu+rMRv8g+dERSVH5113/0Q?= =?us-ascii?Q?aPBe25t5JNTrSdhy5s04tW9mrfyT22bLTTR4GXjHzNsRYKOpkA42aJ5Ahx0D?= =?us-ascii?Q?wwGhgjefLvQ8056O7HFDKI6eU2Ikv5mY/3ZMKdaZ2rkEs/cpYcuApMt9kOSA?= =?us-ascii?Q?SWUF88+1PU95qRNMMuKq/N3gImCYDx8vg/ZLdr3yRimb//J5v8BRvrE0dx5Z?= =?us-ascii?Q?GP00/03e8O/z7AZwVnlTQzHkVHtryaJCQNvSje7CfURdiPPdndDEQtEdHVs1?= =?us-ascii?Q?heNrfX4bVJ5y+KpwhMbeGABeufI1DON81o8QDQ3fOTP0dqGaqphXcmzIWlP+?= =?us-ascii?Q?cMKaGj9hSn37+1m7kx7INZ6GOdXzRcNSbf5YxCxwQVG6sw9CER1bcPhTKgUb?= =?us-ascii?Q?ErHWLa2LOBTUJyUc0xoTDbMjP+Cevul5XDjZeGFKtwQvJ/lPfOxpEbzOmOs2?= =?us-ascii?Q?/1xlanScji4ddLKONieGFpYJkaH1bYfUzqIvyX1qFC7w3lhluBniThq0rEnJ?= =?us-ascii?Q?5dbHJSLOzX0/ighlFo1R+HrcDzqIkn5UAC3mNqnkV3c1MwREPaRggJQqGXLK?= =?us-ascii?Q?+BtuYBexY50x8CeuGXSRzrCvrpsX0lcsXHIdYOxMtqUbLvb0E/Oka9nLnaqK?= =?us-ascii?Q?0kXiNwEpV+zMlyCalTivFcJvVbM/HE?= X-Forefront-PRVS: 03818C953D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39450400003)(39830400002)(39400400002)(39410400002)(199003)(189002)(50226002)(66066001)(86362001)(110136004)(53936002)(107886003)(50986999)(38730400002)(4326008)(68736007)(50466002)(305945005)(7736002)(6916009)(2950100002)(76176999)(25786009)(478600001)(1076002)(6116002)(54906002)(6666003)(6486002)(101416001)(69596002)(3846002)(189998001)(103116003)(7350300001)(2906002)(5003940100001)(97736004)(5660300001)(105586002)(2351001)(48376002)(81156014)(81166006)(8676002)(2361001)(53416004)(36756003)(106356001)(42186005)(47776003)(33646002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR05MB1928; H:bars.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=sergey.matyukevich.os@quantenna.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR05MB1928; 23:qaf1KRVmolemIWC0ZW3hw7FIqKdxTZVWK+g+Jc7z1?= =?us-ascii?Q?BrLbqRfgqCB2lMZpkZePntj6FcRLGHPb/EuzSPyiSJzMxmYrkGomLa8v1TbI?= =?us-ascii?Q?+/t2dMMSYMMVLE4WZlJtPpw1spFCIKrE4uFYNFNmTJXgRfGa5oLGx0DtTRj9?= =?us-ascii?Q?0/vRTxcR++F4wAOtyriymWjhvK5vc2PyXgAt1JJv+2hnhuSVFkvEFpZW97YW?= =?us-ascii?Q?RTwkk/CY3mwdPfz45xaTd8bZTArY9/nqkmXT4fYyJHj1RG9LXU742gPX2rT4?= =?us-ascii?Q?oIMHnbvgQ0+0DWYrrxWGWhzu4jffkJiLpV3Hm27xtm5VcTTrMj+J4oUOlV2u?= =?us-ascii?Q?J5g7IDcAVaXKflYVL5eqyNL3IWwzO/7VjHu+IKU9AooxItd8vXFzbLpTQt7m?= =?us-ascii?Q?S3dAZVbiXY9d5SBe4gWZK4HqTpNgV/M/n8CKt3AxylX7PMKTgc9AZKbiMFzs?= =?us-ascii?Q?qVB5ryVpVU21xezELMq9HKKSjvUG8a+m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nostics: =?us-ascii?Q?1; BY2PR05MB1928; 6:BwK1IPKnDzGCSeMy6Pj+YQ9BkyRcNsoWucd0qrbqPZ?= =?us-ascii?Q?oqskeILbz/HkpBTKym5GdiNgexNiXPJinyM8zMmr8BZ79ktxG3BABhE0wOIK?= =?us-ascii?Q?1NcDtdUaVSlMARfNmFqEVl0y9BunxAIdWzQwE2RvkcezIc2a837XAqhuHwaA?= =?us-ascii?Q?BJSjK0Vl/pedbZ2C3M3mcUerzjHuHXrYNfgQg+/DPKMT9lJ3GizpTW+fRjY9?= =?us-ascii?Q?3MZBt4EEwgPcXXjRP6XxvysjJhMqEbQCKt8uhpBbygDuReIjqnvsPfzr2dVj?= =?us-ascii?Q?kVilo46hl+M88Q6KW9FF4DhI/B1KUnx5pSmAfYNTF2YlhrRf4u8xJ4u3i0HR?= =?us-ascii?Q?5l14u48T3ocioXL0Zj2vCMrA+krMRppnWU64LW5+KLVGovpF6MXd2ECoByBV?= =?us-ascii?Q?JUWPr1SNlW2oCmcrHk5jrKXVc0C2kwXD02hOt5SxtaS59lXmuyJEsuSVQD+U?= =?us-ascii?Q?gI+Vy3l0AjfVANViyeDIok94FaNnI5/KsYk8HCOKMIAFL6ch2z84Gg7zaMcC?= =?us-ascii?Q?cdFtzW58LOqyfW9rRZFanqYBHMj1/RLNEkwziLjRKg9GLVpU5X18COwqOIsK?= =?us-ascii?Q?/smeuOTXAGUznpbk6lzWTzGEr2tOBA2hQso32aGov1P95mQL5pr1RXeAwhcK?= =?us-ascii?Q?/A95nPQI/iskGM4VGyOaEQek/SG2wfqAcdDYYuif7J6xSOP10LywTWWVffqg?= =?us-ascii?Q?QRd6cLYEDhriXe0ni0kThFFN6TpO5vap582QmGi+1ELD/kf3O/36zi7I/gPc?= =?us-ascii?Q?TJc9W2dMfsJhcYZnATERNc8peTmiweLtL6X0fm3Z9+leoSSr8LvG1tU2RW1e?= =?us-ascii?Q?kuxkrc2eu2ds75JmKH9IBHBFmOL/Ute2VQQZSi6BMFDYvDgYH7OE2LFgECt6?= =?us-ascii?Q?1Y1kzrONuoq8CvlJhxpjZf3pmkiR0UVjbzBWFL6F4GzB9vRMo63wbCPIlBUu?= =?us-ascii?Q?IbGoZguzeOLYYO9p+wrAv/8TGpFp/dvL2dpxJr5wBt83zUHr/Cgy5qRZRrHT?= =?us-ascii?Q?o=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 5:ksp9baqcCcSov7WaPPtfLaNbAVjeXnMv/RKci60iG0agcovmX1BUrSr9R5FPkSmypDdIbW8RTdMsnWLHYtf6/cIHswLaEAsyxFLzfaHWRJsVkCHEnEWK5b30h3F7B5MCjBCRoiSLKawpjEz7vlpeKGzwpDr9ml1AMylTubKZynP0YWv715HuhWoMShQDHM/3MttLg5QZqo7rnd2Yw2CffIDRgWOuoOD2PR4DN6BHjyf1ZUXr/gR8Wndtk6NMjwpw4yeGiub1OuF2kEHQmNocOfzI9Bit3GmrHs+KNF3Lf296Nv2PgT1cbBvfYgTr17aKkhKy6rylwO+JepeX15jF0lg+uf26e1BmAdqG8KYyQggeUiQDfVCb4lf2nwxijXKwApweRWstyqL3nP0TsntZVDbIluIjgFa87XlX948nhgYOVhASyQJYBPQLiTS9D7T3wlV6NUA3RA3AbIxKxTKBrsi+JWwKuBbGXxpF9sYod0rrVonzIe/n1+vQgbZX4APG; 24:DOUFGOusE/EqLGbUnWpT/ZzabX2Q5BZpbvdpkN2l1ocFZ/AObuA5btCdvwHrYetcvL7108Cm4rIIbFAhe+yURVitPlpJ41nrPSyw6OtbRco= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 7:EfeAnxAaFqaiSwCKC10s6j5N80Sr+7WHmJE1AHu/z1F6ONTFAXaoahgBENxBp3D0BQhMRxs+flZrjqLZIyT5oRgxyGUPe8JMa+1M9L01bumv7fFEqtS0/WiCE+0b6nvgSf+kGS4OO2qsIaqDRmjKQXolu6qB5wFj6wEPAyVAxIBKOxkmpQ2qfy8SH4/fB8PoMo7FeAcr2D6eaLeBfQzSI28ZGygpfTEETbTKVtQd4nZH/OBN/xswUYZQEnPNNa13skaFf/GJkKLXlL2DniQElsYeef+KmZuBKo+IxtDrjl9yxb5SPTygoW3JPBZsl/N893Cpl1JeMdcsX1b9NPJuRN7bPHXK1tO/8TyCDSHRPh+NspLmsZTYm48BFCgaE8CG5OILHKeGTHz/JbijJ5QR9bysQKLw+O6eMTSHuvcLYO7/LsxA+9k1KMUBcB13HkTHiiEftC7IiBmbLEtO+1P3X+Q9QeMsQ+H2OAW4Fa6VytAe4+uyHYVfFhvKd3TvDUBECwuI3HOfMCIpfUGSAplPrPNFLBXIo5dFtF7k4DUT+vKjuU16VNuvmQVM/A5WCp7mWVy3tAdSazAfIuSMzvPlOMm+RyvuMdo54WjwrZ7/4JyP3TpF9ICj8cCf9KOJp/6wr4RY9UO2+T7ZLDK14MWMmqRSOYL2a0kt5KpccBdORPOpBOHUIRjxTovdQHpG0A8Aonunna/17b39G5hkBnJAwzK8jfdYD11fe2HCgXeknHccpfOrUaW8MLRPdeGEwGbnT3r3J/rTlv4oyApQyV5qK7oNjb11Cnu0TkEUthppY0Y= X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2017 23:07:46.2501 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR05MB1928 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 Firmware sends supported interface type rather than mask. As a result, types field of ieee80211_iface_limit structure may end up having multiple iftype bits set. This leads to WARN_ON from wiphy_verify_combinations. Signed-off-by: Igor Mitsyanko Signed-off-by: Sergey Matyukevich Signed-off-by: Avinash Patil --- drivers/net/wireless/quantenna/qtnfmac/commands.c | 9 +++++---- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 2 +- .../net/wireless/quantenna/qtnfmac/qlink_util.c | 23 ++++++++++++---------- .../net/wireless/quantenna/qtnfmac/qlink_util.h | 2 +- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index 524269d2c30c..94656106b496 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -989,7 +989,7 @@ static int qtnf_parse_variable_mac_info(struct qtnf_wmac *mac, struct ieee80211_iface_limit *limits = NULL; const struct qlink_iface_limit *limit_record; size_t record_count = 0, rec = 0; - u16 tlv_type, tlv_value_len, mask; + u16 tlv_type, tlv_value_len; struct qlink_iface_comb_num *comb; size_t tlv_full_len; const struct qlink_tlv_hdr *tlv; @@ -1042,9 +1042,10 @@ static int qtnf_parse_variable_mac_info(struct qtnf_wmac *mac, limit_record = (void *)tlv->val; limits[rec].max = le16_to_cpu(limit_record->max_num); - mask = le16_to_cpu(limit_record->type_mask); - limits[rec].types = qlink_iface_type_mask_to_nl(mask); - /* only AP and STA modes are supported */ + limits[rec].types = qlink_iface_type_to_nl_mask( + le16_to_cpu(limit_record->type)); + + /* supported modes: STA, AP */ limits[rec].types &= BIT(NL80211_IFTYPE_AP) | BIT(NL80211_IFTYPE_STATION); diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index c529cc1994b4..ec5126362494 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -873,7 +873,7 @@ struct qlink_tlv_hdr { struct qlink_iface_limit { __le16 max_num; - __le16 type_mask; + __le16 type; } __packed; struct qlink_iface_comb_num { diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c index 49ae652ad9a3..22fa631d692d 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c @@ -17,24 +17,27 @@ #include "qlink_util.h" -u16 qlink_iface_type_mask_to_nl(u16 qlink_mask) +u16 qlink_iface_type_to_nl_mask(u16 qlink_type) { u16 result = 0; - if (qlink_mask & QLINK_IFTYPE_AP) + switch (qlink_type) { + case QLINK_IFTYPE_AP: result |= BIT(NL80211_IFTYPE_AP); - - if (qlink_mask & QLINK_IFTYPE_STATION) + break; + case QLINK_IFTYPE_STATION: result |= BIT(NL80211_IFTYPE_STATION); - - if (qlink_mask & QLINK_IFTYPE_ADHOC) + break; + case QLINK_IFTYPE_ADHOC: result |= BIT(NL80211_IFTYPE_ADHOC); - - if (qlink_mask & QLINK_IFTYPE_MONITOR) + break; + case QLINK_IFTYPE_MONITOR: result |= BIT(NL80211_IFTYPE_MONITOR); - - if (qlink_mask & QLINK_IFTYPE_WDS) + break; + case QLINK_IFTYPE_WDS: result |= BIT(NL80211_IFTYPE_WDS); + break; + } return result; } diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h index 90d7d09a6c63..c9e882a3a991 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h @@ -68,7 +68,7 @@ static inline void qtnf_cmd_skb_put_tlv_u16(struct sk_buff *skb, memcpy(hdr->val, &tmp, sizeof(tmp)); } -u16 qlink_iface_type_mask_to_nl(u16 qlink_mask); +u16 qlink_iface_type_to_nl_mask(u16 qlink_type); u8 qlink_chan_width_mask_to_nl(u16 qlink_mask); #endif /* _QTN_FMAC_QLINK_UTIL_H_ */