From patchwork Tue Jun 20 19:55:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 9800135 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 309D8600F5 for ; Tue, 20 Jun 2017 19:55:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27045223B3 for ; Tue, 20 Jun 2017 19:55:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BA15283AF; Tue, 20 Jun 2017 19:55:59 +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 DA3CE28161 for ; Tue, 20 Jun 2017 19:55:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752095AbdFTTz4 (ORCPT ); Tue, 20 Jun 2017 15:55:56 -0400 Received: from mail-by2nam01on0067.outbound.protection.outlook.com ([104.47.34.67]:6496 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751002AbdFTTzy (ORCPT ); Tue, 20 Jun 2017 15:55:54 -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=1ebikkH5kG02gQj03I4KP7CvyV0mI2dqphMgZo+/n3M=; b=EFfZ973okPrApSt3rCyhSKnD0XWTKMH2rT6c9DCZWqRwQZ4EeWDhUsljAOw3+OeuHLF9w5Zx5hnIMNOEv3IYwfQfmVm/kRdcURqqUrS0pfpk21S1cL0M4RX+BKZA85XRJaXzmhduOZR1P7zGLPdAs6hZgJByN22zPIBDV3OlRrA= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=quantenna.com; Received: from bars.quantenna.com (195.182.157.76) by CY1PR05MB1931.namprd05.prod.outlook.com (10.162.216.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.6; Tue, 20 Jun 2017 19:55:50 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Igor Mitsyanko , Avinash Patil , Sergey Matyukevich Subject: [PATCH 2/8] qtnfmac: cleanup and fixes preparing AP_VLAN support Date: Tue, 20 Jun 2017 22:55:11 +0300 Message-Id: <20170620195517.18373-3-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170620195517.18373-1-sergey.matyukevich.os@quantenna.com> References: <20170620195517.18373-1-sergey.matyukevich.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [195.182.157.76] X-ClientProxiedBy: HK2PR0401CA0005.apcprd04.prod.outlook.com (10.170.145.15) To CY1PR05MB1931.namprd05.prod.outlook.com (10.162.216.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7c383c96-20ca-40db-b450-08d4b8165b53 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR05MB1931; X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1931; 3:fDQCwODHZuUH7GCywP5b3u+J6SGJxz++Ah+uIxOlOgdXDXPmtf/u6ZXlft06CywA7WzgdAbXZlRicrfftR0k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are5Zf/CpmvAen6/9SyK53bLZwqkXogfmwc70l3A6c+9yWHF9N93YCSWpN/71ejcpw3diSNjKQXYkiaSUoYeGyIkWatZ14CyN1ceEj40q4cBBzj9MUzl4YeL7LwDILcItgRGJgoSz1d7GRJao86y+EpIf1xBWOxDClARxf+fz+mRB4YHiD3EPOBDaypYKX4vNFWa2t1JhjcxqNsE772+vUubU8JEK7D31Y+CaKq2fkA5g9stzXkMyrlDH4xyw1a9hvyRwf/VMb1NybuHcvvnDvGDV719xPMRlgirS5MObxjOY8zsZy3qRr6SjPinCj43xVoy2d0rI2Sc79vNB++nQzbZLuRFtyQCRScIewfmi+c05JIRqKMZaaJTFiAAuYNo4+3uN/Li+ZRujpsWZBO0FAAG61lSCShfKwDjQo7R X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR05MB1931; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR05MB1931; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR05MB1931; 4:qg40x9Eik7VXvdPYWRrCsqsrxUOFdDeii02KHoWNJQ?= =?us-ascii?Q?s1MUMdsiu205hYWTem6L5+ffHuRFVU72UTERgF3Z2E5mFAmkP0jzUvCXVwk5?= =?us-ascii?Q?0ZRlyZq2zYD714JtH0upI+5IxSS17jaoQGJJ5WL3pa5ZRtmtK7tAoNyoOItI?= =?us-ascii?Q?B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M3lssnxw6t?= =?us-ascii?Q?r3SOxD3OelFOUw6ihI2RBKiBcxjj3C6zBCRezJuB4cLa+tlkqSGoa/ql5Em7?= =?us-ascii?Q?yalU1tAuRaS0oIoQc1qO1lPEYzvX/E?= X-Forefront-PRVS: 03449D5DD1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39400400002)(39410400002)(39450400003)(39830400002)(6916009)(2950100002)(110136004)(107886003)(38730400002)(2361001)(53416004)(54906002)(53936002)(36756003)(2351001)(66066001)(47776003)(50986999)(189998001)(76176999)(42186005)(6666003)(8676002)(6486002)(103116003)(305945005)(7736002)(4326008)(5660300001)(1076002)(50226002)(86362001)(575784001)(5003940100001)(48376002)(33646002)(478600001)(25786009)(50466002)(2906002)(3846002)(6116002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR05MB1931; H:bars.quantenna.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR05MB1931; 23:qxy1AzfOTayC9klGvCTOVFfGBoLVQknLk3vf62XQa?= =?us-ascii?Q?vhdMSEm6LfSckSyV0yZjZiQBtu/+xwkdSHY767FNDAh/PuhAu+GkHir2OvFo?= =?us-ascii?Q?frYs9XLx/UdjcON5DIXJFJi9Lzg2UiLmdHs+inT4NA7gCK3bQnZ6JICshHkO?= =?us-ascii?Q?5A0EYirs0SsGy+l4drm60zkVKPp7WEd346WaSOadT4Y+yvfEcLBw9hQ3e3uM?= =?us-ascii?Q?/42G1GVPHLaAcepcb4aNF+Py/iWorVu8Yly3hpYeLoTo79LYzabs1BxysrkA?= =?us-ascii?Q?46oGEyvzKhBnDP5jcxVT5xj8w2YwBIXKNlx9GVRioGuUda97U0XkxD4Tvhqe?= =?us-ascii?Q?FQmWFt9vXjKEtB+Sqz+9JgO9edruxKQW3H54JsRAsG4h/LxAG2Jh5MImgX7k?= =?us-ascii?Q?tlFSJiHeLraIH6rNoZPb1NrGz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ascii?Q?0=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1931; 5:qBYxwGEqaJMSbttbin2s5/bktCcl0HsjZrWMWtsD4zT/1eaYEN8dqOZPjsAa3AOlk7Kzwnej/yzELHuvmW08dkvaOvsEsmbEFam2YzteKjZAvkIhUWCTJAc5ZRATVKtsjzMsa5VWJJwJR2vE74N4s1IB+l62/lsYTmUNokZkMLh6cEilPEPuIbemov26b6XBleR7V9f4G7QnHxzaeQU5IjXTN4vtIuEkEuDpJBeK1a88FZWqB+hfoQfZweXBuHnLpfHNuofjOMw8JcaOCV5RGANZLGmBUfExr5mCn16+Vo77oQjI+dH7xqidrZ0wv8mCrKfPRV7ii+acklDnAVjEoqvr25wdE1TlLNiqhIOsrQkefT8th9FSOu3GqLqLZuaMPXgziVRWdNT8EOdeA96/C9HI0tM2kUtnr1LY6xYab254Pw+i5luPGoicJUxeTiX+icps+HX+68O0mBqtaudu4HLDC1pUKd05Vf3sdlnynFXMCGs7Syw8pEk7liVcWzFe; 24:Ek1QqhgDfYMrEF0WCuASxIfKaUW9WK6Hr/Yv7mB+Y1StJ79OhIhkF/R4MDnv46gAHhqf2nNbVCUfbnLhBprb0UodGSG/mkfz0pR1XPJDjjc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1931; 7:4M2MXT2llI0n/9DvLczxI/mb43YM0e69g5LQ3QFpJEtdTCTHmgSF30t6GeAd0TifmdKjF3sCCpVRPokgq3kvRPNUi4B/tIWclmNJHBupTUCbOwgO+lztBQ5nr09F7hRRuDnEuVXztwtNPmSPReYuiEfqMzUrtOVa8fLR0njEaCTObh5R5sOb+wXSckTWGuVX1zlZpEYnn/H+x9E2OxuLYBX5sdjmR1ZYF6Z3zQUeMXSjI2z/FZboNIhWT9OK05C7utv713pUdo3ixi511R4EH40jAFNtcns4T/P3bjRUMTxlGVEaK6yfAIcIukWlv4oLYB30sGLpKchGm2sVs/OXbjWtcbMRueVEzH7cwIAK4boVaSGmr615UvpETnLeQ7iMg0A7MYY9p9ZxSk49i8qoraQg3gRX6cr7E/MPpFrdXWv65R3KJ/gaITdssTLTA19ggoYtdE4Y2F60kQQiOXrwqIjnDv+XAXYzUMJ1wgLX5mCs2vsMlgrMphJnCqbyMETxFgkCJCH7vxsofHZsjDleN6Q1wS6aEThQkoMxn27tb16xt7oVrtCzZi1JY/Hm4Wxd+xVRy7krjspRGyD/jnhHd60MjDktRjJqfqFBdQ4cQj5sJUVRc6uleYPmkGViAl9nswEmg1i235O9X6V6IxFCGglWo2BLdd4eCV8DpIaLBGFuCyxeYSLuKySNZbKdN+y2MzcC7F+gY/F878W7Bz2sge4iqb/yrX+TP+97sAvX+kyS+WDl2x0q2cfYqW7qkW5QOQkqBdcyJeu+pycoC4kzUYieLtnx6oLGariNPf7Mp6g= X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2017 19:55:50.0523 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB1931 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 This patch implements various cleanups and fixes aimed to simplify adding AP_VLAN support to qtnfmac driver: - Remove unused flag field from qlink_intf_info - Add interface type to qlink_cmd_change_sta - Modify qtnf_cmd_send_change_sta: add interface type to command - Fix handling of iftype mask reported by firmware: 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: Sergey Matyukevich --- drivers/net/wireless/quantenna/qtnfmac/commands.c | 35 +++++++++++++++++----- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 4 +-- .../net/wireless/quantenna/qtnfmac/qlink_util.c | 23 +++++++------- .../net/wireless/quantenna/qtnfmac/qlink_util.h | 2 +- 4 files changed, 43 insertions(+), 21 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index 2ee007ecb236..5a6caf5b685b 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -995,7 +995,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; @@ -1048,9 +1048,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); @@ -1063,6 +1064,7 @@ static int qtnf_parse_variable_mac_info(struct qtnf_wmac *mac, default: break; } + tlv_buf_size -= tlv_full_len; tlv = (struct qlink_tlv_hdr *)(tlv->val + tlv_value_len); } @@ -1808,10 +1810,27 @@ int qtnf_cmd_send_change_sta(struct qtnf_vif *vif, const u8 *mac, cmd = (struct qlink_cmd_change_sta *)cmd_skb->data; ether_addr_copy(cmd->sta_addr, mac); - cmd->sta_flags_mask = cpu_to_le32(qtnf_encode_sta_flags( - params->sta_flags_mask)); - cmd->sta_flags_set = cpu_to_le32(qtnf_encode_sta_flags( - params->sta_flags_set)); + + switch (vif->wdev.iftype) { + case NL80211_IFTYPE_AP: + cmd->if_type = cpu_to_le16(QLINK_IFTYPE_AP); + cmd->sta_flags_mask = cpu_to_le32(qtnf_encode_sta_flags( + params->sta_flags_mask)); + cmd->sta_flags_set = cpu_to_le32(qtnf_encode_sta_flags( + params->sta_flags_set)); + break; + case NL80211_IFTYPE_STATION: + cmd->if_type = cpu_to_le16(QLINK_IFTYPE_STATION); + cmd->sta_flags_mask = cpu_to_le32(qtnf_encode_sta_flags( + params->sta_flags_mask)); + cmd->sta_flags_set = cpu_to_le32(qtnf_encode_sta_flags( + params->sta_flags_set)); + break; + default: + pr_err("unsupported iftype %d\n", vif->wdev.iftype); + ret = -EINVAL; + goto out; + } ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code); if (unlikely(ret)) diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index e27833b78940..8bcd8a55ad11 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -90,7 +90,6 @@ enum qlink_iface_type { */ struct qlink_intf_info { __le16 if_type; - __le16 flags; u8 mac_addr[ETH_ALEN]; u8 rsvd[2]; } __packed; @@ -350,6 +349,7 @@ struct qlink_cmd_change_sta { struct qlink_cmd chdr; __le32 sta_flags_mask; __le32 sta_flags_set; + __le16 if_type; u8 sta_addr[ETH_ALEN]; } __packed; @@ -823,7 +823,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 d8de484b5995..18d0d679a649 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h @@ -74,7 +74,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_ */