From patchwork Tue Oct 31 01:04:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 10033507 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 A3B6560291 for ; Tue, 31 Oct 2017 01:05:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93C8028830 for ; Tue, 31 Oct 2017 01:05:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86FA028968; Tue, 31 Oct 2017 01:05:13 +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 0321328830 for ; Tue, 31 Oct 2017 01:05:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752889AbdJaBFI (ORCPT ); Mon, 30 Oct 2017 21:05:08 -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 S1751776AbdJaBFF (ORCPT ); Mon, 30 Oct 2017 21:05:05 -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=fubVr+ZmpUHZq58Zu2sJW5V1EMmWv8+WN/jOH07Q2qA=; b=zlx3aRW2LoHulCfuUx96MxI36maAm3hiENF6pi+ZIh8/1xMaGlaZUc+J/8yt9ym3oVeVDYc4GFSCoCzL7m7YnMUf3jRsmw7Tm8KmX+HT+pWfm3GplfavJmbgOK1vQSAccO2swt0KqiHDyEcCw8XVIL7PVxOeU5dqcJjr1HmOM6E= 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:01 +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 2/9] qtnfmac: initialize HT/VHT caps "can override" masks Date: Mon, 30 Oct 2017 18:04:48 -0700 Message-Id: <20171031010455.27772-3-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: 0739c0da-1fdf-4bee-6b14-08d51ffb6a32 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(2017052603199); SRVR:BLUPR0501MB2036; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0501MB2036; 3:xJwhruP9BWNycJJqjQkSO/CKbAVkYsPE6v8Pk5Y4xMPBDHNFmQd23fA1CydP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uiha6J/ZIuU4dUzYxNl8Wxn/tCGVokVVbazYz7cBuHuvtWH4Ve2JwdX1v2UORi5UDtAYE5F+SgDvuLG/a0/oeVmRTEWc6qb5AWqHOSr+SLlo02vAV+/5ILj/U9P3ah+8PWgvU3LOeKRYFjHobfg3gAA+9Ylaymtlo/rWCxJBr++eUM8iUBzUSNu99ppCXTFrVvpWWmG8yAponwwklh2ktL4zyFt3tZYwecFV95VPvD6BOQNTCiKufc9iRWQq7h7lnurPpO2xentCKF0Zxmj1OQqJrHVc5T92+fBF7c1GoFIsg3/uP810kkCc2Q3cnHTnO06ZHNdPumxGoJ9nEpgyTV2upEJ7Pf4LhdchJb9noXiwLnCzXvMhMqL/88nUP0HpnfRI=; 4:hICiZ5GYs1XZE4518/bLRjTV5i9doQBOi9B+FM/z138huqqlZ+D+HerFbZUs9fhaI1eiTqRMHlejt26qnkjsKd10S4PC/O7rrghxsQo9cRmkKItwUtxdeU1gDCzuU60ShCImNcFugd6z3hInZZnThTNcjlOyjnKzQAOzKrwu1DpXJ0kCpTB16rqfw72TpWb9V5bkDYhkID0cLzbWfpEUPC2UYDf7mQzgD8ICTauEKO9M++Unp6VuT3s5dFU9kV+DeBlFT/zTHivctK6tQ8ugng== 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)(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:yOjOMsu2ifm5UslJWnJgr/sxkmeNCLokruR64W1?= =?us-ascii?Q?Ct2uvaXQ9cv7pev+07QioDXtqyGmpdOS5yzfJi5qR0wSndV7FfP+OkZI1hT1?= =?us-ascii?Q?g+uMKchv0Bom1nPG0JY8+jEjINVNoprTHW8pOOoO4yjTMD64tw/BnUDOSxgK?= =?us-ascii?Q?0ruVbWbqXg4K5R1hcFP7Svir2U+P4DWJxLM2t+8fRE3OuH6BDrIowJwRl28L?= =?us-ascii?Q?INEjk2Bmuv/qo7hYN/rYJ2qhY/BLS8A9f6VZdXOfu3s/8a7Yjo1X4bXVWCjI?= =?us-ascii?Q?OEy/XRZZel0xgBWshPR/XDSD0NbPzemQK1kkcj8DuHPQG/M9Abx06AjZLS7L?= =?us-ascii?Q?y0bvRS+sp+FgmGSJxmCXVxpKMNwLZhGjO4ivbzKsyc1HfbfRtnhdbVZjRloQ?= =?us-ascii?Q?QlFeOHnDvZ173cRftVTMPEJb/0srAwiEdgBm97dbqmP8Ulxpm/5r2Y1Ir4A9?= =?us-ascii?Q?JiUJc205dDsNktkVWkkVrjoo+cNdBxej7SUUFZf5nOagkx0+Y/T436pdV6KD?= =?us-ascii?Q?0HaMKlIEC3aw75d/uMBmPqq0HeRIbkpyxkGAhqStkCVRyso2BDud+9vxiEVC?= =?us-ascii?Q?o5+u8eAEYRtw2g3p0uHPA5mFSiYdCh3eLNicTFGGU8VP9Lwn4EtiZlOV6tDA?= =?us-ascii?Q?itDVJ1NEaxZlpCzKjTKOjrRVDZ9vI20v2ym07E7OhkPnztx5qelXQ96NhYFS?= =?us-ascii?Q?umJiMkDlr0NAJGEg3RtAfgCYPyseEvKnGCL6OVjXdBb8g6P4Yp9tJ36IzX9c?= =?us-ascii?Q?Nst84rCtdS0IbqaGH/VMs8kdx9aQEg4EeGnkWSn3Iq1pg1A441Iu9hrYcM6/?= =?us-ascii?Q?USX976gN4PtiIfPPDV9NLkwVGDh30EDHb5qLXd/ibW4gXrVJZzB4/+janO64?= =?us-ascii?Q?TVWVHwBd5XY/kjHAD2Aa7wI5flpn25oh9DkH6xbG49fyMvJPueJx2PbxbDmn?= =?us-ascii?Q?vK9Db7dwh4AEeXzk1VLypBB7YyBfaxTCvjVoQAFSp+z3Of44NiI3yhJ2l+Zm?= =?us-ascii?Q?F690EOaYJBuZ2+0ZKhcl37Itj7d99WxCSCZarspIPS15PLrkaNSpOO7KDyez?= =?us-ascii?Q?DTq8ScjgqR5lNUSXtkYvBXb65U9ylRWzHd/d4u2NrbuuJvz4/JL4+annYxZb?= =?us-ascii?Q?2joStAuV2KVJRZWGSfmBIdtJBSLYOTEp5MkqZcFeA7KLpP4wZad2QUJ6MI4r?= =?us-ascii?Q?/U8eg5D8w035pIm1FWmqBNfqFpGD4P60jZpOubeuF658bPWbohMOs4GPwKg?= =?us-ascii?Q?=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0501MB2036; 6:piuT26AOGx2iYpgN73cLk1RbDcC2jw5FLoODlDmei4GCilckSepZivX8I5qHdjCc6TTpCosC6aqGLy07+HORcF58B1AMrFkxhoaIPiHxceoxdYeOTpdLNDTu0TwTQbjhrQXQTCorVfEy6eqzogQ5m7xPNlPVD1LBUbkm6jsUQgQikfpI4i/aFQSXcbYhWEc0RP7AslbblYxm8VNFvObSwuzPJtb+In0HTJPuTZIRZsP7OYVzQrlTo32tDZ7RY9rGToBnbkmDitRePRxmQ5tl7nDOt8ce+r0szs0WuVGBsvsm+aHgHUqiFYkzRXE7ikhvvbuhGe3q5/cx863x+TFUaGvTrRvJSmqXBwPzU1CHh7U=; 5:dXtq5NMrTtX88g1/L563nFg0nAhMmpNT1WnAnF3tuslYz0P1dY+a6wsASOHx8uPk/AFkNN8lXzzV5XJrnqvANcYNW4pmucxv+bLWdu4IQ04I5iobCBgEuIn1bZR7LLroglelOU3fiuYTUMj+87sJj+QXeuajshOnc2CTrEQG9UA=; 24:XJjLssu2fnOry05agv3K6GH/1ZS1gvXRdW/4uK56XzinIHczZy7xZKN8KKhD40OA6zxf1YmoYV4vuzEFgLFMsPHi/fIByy4My/s+1HnQu58=; 7:akHP7LVmOy59lZu0h/5Zo4me3rAQ/gu9QM/xMOLbi5WFRBYghGwTQvNf9s7v9aPAiblflnM3SQOQwsjNgR5ge8p59PBMAB49J7H+9iQUQqlzBCsrY+gaWyGMqY7hfVV8H9qn0EWnsn/+SXMBB5rBsFPK1uOihTOlqcg1e434pv9w6GULxg6ehvd/ic93SxALSbgi1FkXka+TnAo8jclkjPb7DeWZn8yP1x19U1eAvU45h5JrViE5EskF3E87X6wJ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2017 01:05:01.5328 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0739c0da-1fdf-4bee-6b14-08d51ffb6a32 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 Information on which HT/VHT capabilities can be overridden is reported per-MAC by wireless device. Signed-off-by: Igor Mitsyanko --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 2 ++ drivers/net/wireless/quantenna/qtnfmac/commands.c | 7 ++++--- drivers/net/wireless/quantenna/qtnfmac/core.h | 4 ++-- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 8 ++++---- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 2f60331..b6a2540 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -925,6 +925,8 @@ int qtnf_wiphy_register(struct qtnf_hw_info *hw_info, struct qtnf_wmac *mac) wiphy->available_antennas_rx = mac->macinfo.num_rx_chain; wiphy->max_ap_assoc_sta = mac->macinfo.max_ap_assoc_sta; + wiphy->ht_capa_mod_mask = &mac->macinfo.ht_cap_mod_mask; + wiphy->vht_capa_mod_mask = &mac->macinfo.vht_cap_mod_mask; ether_addr_copy(wiphy->perm_addr, mac->macaddr); diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index a7422c5..35ff7e8 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -1110,9 +1110,10 @@ qtnf_cmd_resp_proc_mac_info(struct qtnf_wmac *mac, qlink_chan_width_mask_to_nl(le16_to_cpu( resp_info->radar_detect_widths)); - memcpy(&mac_info->ht_cap, &resp_info->ht_cap, sizeof(mac_info->ht_cap)); - memcpy(&mac_info->vht_cap, &resp_info->vht_cap, - sizeof(mac_info->vht_cap)); + memcpy(&mac_info->ht_cap_mod_mask, &resp_info->ht_cap_mod_mask, + sizeof(mac_info->ht_cap_mod_mask)); + memcpy(&mac_info->vht_cap_mod_mask, &resp_info->vht_cap_mod_mask, + sizeof(mac_info->vht_cap_mod_mask)); } static void qtnf_cmd_resp_band_fill_htcap(const u8 *info, diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.h b/drivers/net/wireless/quantenna/qtnfmac/core.h index da2c24e..74b94ce 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.h +++ b/drivers/net/wireless/quantenna/qtnfmac/core.h @@ -103,8 +103,8 @@ struct qtnf_mac_info { u8 sretry_limit; u8 coverage_class; u8 radar_detect_widths; - struct ieee80211_ht_cap ht_cap; - struct ieee80211_vht_cap vht_cap; + struct ieee80211_ht_cap ht_cap_mod_mask; + struct ieee80211_vht_cap vht_cap_mod_mask; struct ieee80211_iface_limit *limits; size_t n_limits; }; diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index dfef7fa..b2c4e27 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -636,8 +636,8 @@ struct qlink_resp { * specified WMAC). * @num_tx_chain: Number of transmit chains used by WMAC. * @num_rx_chain: Number of receive chains used by WMAC. - * @vht_cap: VHT capabilities. - * @ht_cap: HT capabilities. + * @vht_cap_mod_mask: mask specifying which VHT capabilities can be altered. + * @ht_cap_mod_mask: mask specifying which HT capabilities can be altered. * @bands_cap: wireless bands WMAC can operate in, bitmap of &enum qlink_band. * @phymode_cap: PHY modes WMAC can operate in, bitmap of &enum qlink_phy_mode. * @max_ap_assoc_sta: Maximum number of associations supported by WMAC. @@ -649,8 +649,8 @@ struct qlink_resp_get_mac_info { u8 dev_mac[ETH_ALEN]; u8 num_tx_chain; u8 num_rx_chain; - struct ieee80211_vht_cap vht_cap; - struct ieee80211_ht_cap ht_cap; + struct ieee80211_vht_cap vht_cap_mod_mask; + struct ieee80211_ht_cap ht_cap_mod_mask; u8 bands_cap; u8 phymode_cap; __le16 max_ap_assoc_sta;