From patchwork Tue Oct 31 01:04:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 10033517 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 8634960291 for ; Tue, 31 Oct 2017 01:05:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77B1E286FB for ; Tue, 31 Oct 2017 01:05:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CCCD28961; Tue, 31 Oct 2017 01:05:21 +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 BEC86286FB for ; Tue, 31 Oct 2017 01:05:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753130AbdJaBFT (ORCPT ); Mon, 30 Oct 2017 21:05:19 -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 S1752935AbdJaBFK (ORCPT ); Mon, 30 Oct 2017 21:05:10 -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=1L5DWsncd6MRSj77LUygi6khCD0ivTMN/PPQbX851b4=; b=ajwy3KaBGEcMczA6XTIbPdm4j7AiAAJJTV1vgjzqun9qsSOIHlZTnTl0ubqXv5QkRpmhmp1d0PQ5m50dpl+EjXCBbcBqPd61f0dN/omSJN6xozCC3V/7MxVc99vSKmcmFSxG2xKOHo3gZmCt+bt31Df+ebErq89YBCKARI2wOeQ= 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:07 +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 7/9] qtnfmac: configure and start AP interface with a single command Date: Mon, 30 Oct 2017 18:04:53 -0700 Message-Id: <20171031010455.27772-8-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-Office365-Filtering-Correlation-Id: c6a3d866-38f5-43ae-e3ac-08d51ffb6dd1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(2017052603199); SRVR:BLUPR0501MB2036; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0501MB2036; 3:5+qnQy+B/QhWKZ7sDExuIvPOBiY+NikK+VWbje+Fe2lB9neV5M9+6+wgTIvO1C+RbnouKMTFKScVQ+q44bwOZoU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xqpQbD3xFbQ/YdrtKKtfNS4q5oKo94Pal787ZT7X8vPjePsWZW2nfyh2lmAGngStWnwUvzkpPDv29wdYCNDmO6/kDkjtXBnwzTmZIwtW5rgA8l5+s3vHBPVnDPa8J2JqSl9NY93GzqCN0P6nMc1aFKy0UcQf1l23DGEny6sZ4Q02FZ3ieiDX6/qV4KBju7AxX47dxid4M2xznCsdZE9+lDP9bRI97dvKgDIWW1jlH8Fv+9P62brDe2A48Fb7bVDCGpIZzvGyVnRizSON+e8KXK/PRDw631S9zKAQ+m5aVQ9thEu3SS79ufBaQsk5TKuW2NTEN82IleMHXVWPh+L+Ovl3KaItVYYBlnDjXUuXvRKXuosRq3O+7PGw+Ji+xeOwQwAcczjskA=; 4:VOpmAbEUhZFK+hgjXCzS2LRPyrsYkW9bTL3oGtEFa6gHm/VefmaDsiy8TXcQFbEDODqhxzv+mWmssH2V0csM2BtC5om3V5d3sWW3YVDi0sb1wcLfsbrphg+wNDKRBT6YqdYtK/c5tPAhP8bESbfCDwb3U42xrw1EHVZXw2E4djtz0oODLFoBgD19pGb+uwtsRB2IIV6Zb5RuankFqlFswL1i6bEK1B6IeOs9M8xCUb1lVzOvGRLEZb1+h1IYVo+rwCb62pfGPN6IgfLRZWTptw== 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:7D6aDKV3v3cRJ5ITUmyQB0QzZ+PlLVXjg/nJgSq?= =?us-ascii?Q?t150aCPbmRjXMZriOg5WDBnyygV/ib3VShWM7h1Ksx3gXD+iokSja3D8AOvP?= =?us-ascii?Q?UjeUb9RmmcceTmWd7vh9M3dSb7cCSQn0IrixXbBFUvnYHBhr3dwf/sIDRvor?= =?us-ascii?Q?3Xxl6kkcugWBCfokhgzQ3BcDFUJnCAXJpJwvCR5izod5B8vIk2iR5vTZw2Rz?= =?us-ascii?Q?13SHzdDlN7X2OPthoxbCuVL8g2j/ZWKQ6BYEpfJUbWUVLQBSvM6SzxfrSEJ3?= =?us-ascii?Q?tJPxcRpbYOBY/d+SDqdJCk0AIUpNXNh1IkXaUKNq8R5He4x/9QBCMd2qxVvL?= =?us-ascii?Q?eAzGAjxdmBQaKsyRbgBvtQ1QG99RZSaZFYiZnCOyW8QQ1OUZOfat0AUArspA?= =?us-ascii?Q?bNeRnIQT+qw9MKU2moqeXi4IrGgw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sG8Ws+8EzVSg/3gY7TVEP9Oj5s58al2X01nz8XkyUdBn/eawc/QUm2xuKn+SMbjRaOSKuI3vp452upvILP85cFs+jXzKrr9sLQjrKsnttUQtZIECc5HUTOPUr1nir2WetZ5gGOllaM6ECMXtTYDv6KYAMhcq237pOJIBDFFlaD2ykZwFeJ3HVayqNzQ8nGKLQ1VxneFk9Gu1js4zKWWKlJrutwij5LgIMs09xhO+2pp45TrVEN1Kj9sibfJSRJj7wyo7gCoAWTUNTAmnMzVp0bqzudKHUrioHIZQXay+VAfp/SoE3sMoE5j9nGWv5R383Ef/2E46Nlb86GeiA=; 5:hCTsWdWiLI+1QoombIFwYd5SG/xDsLogqOnFUGAjadC/xM3DYyplDRMtQLvLSs1mcrIBjqtdClS3DNkiVE9C7ceGNsxnoLtcRJgi0CKrRMeqy49nRO6HNTojyihuLiozQnn4naTcgiAcM86DoVGUuFKTN4Ri9+fZTLpyLzjboMc=; 24:wR61wFPtabkK0VFSfBEe1ys7rNhlHYXwnDfCRrvExznFVlrsgdToemYGMTxfh6CpH7pfKlb4kQ2A4DtrkZDmRMYzN2nkP6oKziIvp14dW14=; 7:mSaN5+XayEzVhQeltrxhxptn781bq7UCIgY4thxfJcQdkQNrEHdkBUWs2kJTNLG6vUi/jP7387wQrd7RTLeqxjU6Gy5KOXsrYleXSAJBfsDCW/wuTsBuCuzhNCZdb2N3YsdyXDvhNwCgUOnfGWG3X2NfOPQ+S19q4sV2n/iss+KBfHpxi+Az2F0ZdeR8+x+w8hBJv4rG5NQgq9mnLxXiRG5ogbSNNNBsviOMSMp84utAnf2SDXa3h3Oox26V5+JA SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2017 01:05:07.5954 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c6a3d866-38f5-43ae-e3ac-08d51ffb6dd1 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 Current logic artificially divides "start AP" procedure into three stages: - generic interface configuration (security, channel etc) - IE's processing - enable AP mode on interface This separation would not allow to do a proper device configuration as first stage needs to use information from IEs that are processed on a second stage. Which means first and second stages have to be meged. In that case there is no point anymore to keep third stage either, so merge all three into a single command. This new command carries all the same info as contained in "struct cfg80211_ap_settings". Signed-off-by: Igor Mitsyanko --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 17 +----- drivers/net/wireless/quantenna/qtnfmac/commands.c | 72 +++++++++++++---------- drivers/net/wireless/quantenna/qtnfmac/commands.h | 5 +- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 5 +- 4 files changed, 47 insertions(+), 52 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 27b11dc..7d6dc76 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -271,26 +271,11 @@ static int qtnf_start_ap(struct wiphy *wiphy, struct net_device *dev, struct qtnf_vif *vif = qtnf_netdev_get_priv(dev); int ret; - ret = qtnf_cmd_send_config_ap(vif, settings); - if (ret) { - pr_err("VIF%u.%u: failed to push config to FW\n", - vif->mac->macid, vif->vifid); - goto out; - } - - ret = qtnf_mgmt_set_appie(vif, &settings->beacon); - if (ret) { - pr_err("VIF%u.%u: failed to add IEs to beacon\n", - vif->mac->macid, vif->vifid); - goto out; - } - - ret = qtnf_cmd_send_start_ap(vif); + ret = qtnf_cmd_send_start_ap(vif, settings); if (ret) pr_err("VIF%u.%u: failed to start AP\n", vif->mac->macid, vif->vifid); -out: return ret; } diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index 294418c..5186116 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -162,56 +162,51 @@ static void qtnf_cmd_tlv_ie_set_add(struct sk_buff *cmd_skb, u8 frame_type, memcpy(tlv->ie_data, buf, len); } -int qtnf_cmd_send_start_ap(struct qtnf_vif *vif) +static bool qtnf_cmd_start_ap_can_fit(const struct qtnf_vif *vif, + const struct cfg80211_ap_settings *s) { - struct sk_buff *cmd_skb; - u16 res_code = QLINK_CMD_RESULT_OK; - int ret; + unsigned int len = sizeof(struct qlink_cmd_start_ap); - cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, - QLINK_CMD_START_AP, - sizeof(struct qlink_cmd)); - if (unlikely(!cmd_skb)) - return -ENOMEM; + len += s->ssid_len; + len += s->beacon.head_len; + len += s->beacon.tail_len; + len += s->beacon.beacon_ies_len; + len += s->beacon.proberesp_ies_len; + len += s->beacon.assocresp_ies_len; + len += s->beacon.probe_resp_len; - qtnf_bus_lock(vif->mac->bus); - - ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code); + if (cfg80211_chandef_valid(&s->chandef)) + len += sizeof(struct qlink_tlv_chandef); - if (unlikely(ret)) - goto out; - - if (unlikely(res_code != QLINK_CMD_RESULT_OK)) { - pr_err("VIF%u.%u: CMD failed: %u\n", vif->mac->macid, - vif->vifid, res_code); - ret = -EFAULT; - goto out; + if (len > (sizeof(struct qlink_cmd) + QTNF_MAX_CMD_BUF_SIZE)) { + pr_err("VIF%u.%u: can not fit AP settings: %u\n", + vif->mac->macid, vif->vifid, len); + return false; } - netif_carrier_on(vif->netdev); - -out: - qtnf_bus_unlock(vif->mac->bus); - return ret; + return true; } -int qtnf_cmd_send_config_ap(struct qtnf_vif *vif, - const struct cfg80211_ap_settings *s) +int qtnf_cmd_send_start_ap(struct qtnf_vif *vif, + const struct cfg80211_ap_settings *s) { struct sk_buff *cmd_skb; - struct qlink_cmd_config_ap *cmd; + struct qlink_cmd_start_ap *cmd; struct qlink_auth_encr *aen; u16 res_code = QLINK_CMD_RESULT_OK; int ret; int i; + if (!qtnf_cmd_start_ap_can_fit(vif, s)) + return -E2BIG; + cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, - QLINK_CMD_CONFIG_AP, + QLINK_CMD_START_AP, sizeof(*cmd)); if (unlikely(!cmd_skb)) return -ENOMEM; - cmd = (struct qlink_cmd_config_ap *)cmd_skb->data; + cmd = (struct qlink_cmd_start_ap *)cmd_skb->data; cmd->dtim_period = s->dtim_period; cmd->beacon_interval = cpu_to_le16(s->beacon_interval); cmd->hidden_ssid = qlink_hidden_ssid_nl2q(s->hidden_ssid); @@ -256,6 +251,21 @@ int qtnf_cmd_send_config_ap(struct qtnf_vif *vif, qlink_chandef_cfg2q(&s->chandef, &chtlv->chan); } + qtnf_cmd_tlv_ie_set_add(cmd_skb, QLINK_IE_SET_BEACON_HEAD, + s->beacon.head, s->beacon.head_len); + qtnf_cmd_tlv_ie_set_add(cmd_skb, QLINK_IE_SET_BEACON_TAIL, + s->beacon.tail, s->beacon.tail_len); + qtnf_cmd_tlv_ie_set_add(cmd_skb, QLINK_IE_SET_BEACON_IES, + s->beacon.beacon_ies, s->beacon.beacon_ies_len); + qtnf_cmd_tlv_ie_set_add(cmd_skb, QLINK_IE_SET_PROBE_RESP, + s->beacon.probe_resp, s->beacon.probe_resp_len); + qtnf_cmd_tlv_ie_set_add(cmd_skb, QLINK_IE_SET_PROBE_RESP_IES, + s->beacon.proberesp_ies, + s->beacon.proberesp_ies_len); + qtnf_cmd_tlv_ie_set_add(cmd_skb, QLINK_IE_SET_ASSOC_RESP, + s->beacon.assocresp_ies, + s->beacon.assocresp_ies_len); + qtnf_bus_lock(vif->mac->bus); ret = qtnf_cmd_send(vif->mac->bus, cmd_skb, &res_code); @@ -270,6 +280,8 @@ int qtnf_cmd_send_config_ap(struct qtnf_vif *vif, goto out; } + netif_carrier_on(vif->netdev); + out: qtnf_bus_unlock(vif->mac->bus); return ret; diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.h b/drivers/net/wireless/quantenna/qtnfmac/commands.h index d6fe3cc..d981a76 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.h +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.h @@ -33,9 +33,8 @@ int qtnf_cmd_send_del_intf(struct qtnf_vif *vif); int qtnf_cmd_band_info_get(struct qtnf_wmac *mac, struct ieee80211_supported_band *band); int qtnf_cmd_send_regulatory_config(struct qtnf_wmac *mac, const char *alpha2); -int qtnf_cmd_send_config_ap(struct qtnf_vif *vif, - const struct cfg80211_ap_settings *s); -int qtnf_cmd_send_start_ap(struct qtnf_vif *vif); +int qtnf_cmd_send_start_ap(struct qtnf_vif *vif, + const struct cfg80211_ap_settings *s); int qtnf_cmd_send_stop_ap(struct qtnf_vif *vif); int qtnf_cmd_send_register_mgmt(struct qtnf_vif *vif, u16 frame_type, bool reg); int qtnf_cmd_send_mgmt_frame(struct qtnf_vif *vif, u32 cookie, u16 flags, diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index 43ce451..e07f776 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -192,7 +192,6 @@ enum qlink_cmd_type { QLINK_CMD_BAND_INFO_GET = 0x001A, QLINK_CMD_CHAN_SWITCH = 0x001B, QLINK_CMD_CHAN_GET = 0x001C, - QLINK_CMD_CONFIG_AP = 0x0020, QLINK_CMD_START_AP = 0x0021, QLINK_CMD_STOP_AP = 0x0022, QLINK_CMD_GET_STA_INFO = 0x0030, @@ -542,7 +541,7 @@ enum qlink_hidden_ssid { }; /** - * struct qlink_cmd_config_ap - data for QLINK_CMD_CONFIG_AP command + * struct qlink_cmd_start_ap - data for QLINK_CMD_START_AP command * * @beacon_interval: beacon interval * @inactivity_timeout: station's inactivity period in seconds @@ -554,7 +553,7 @@ enum qlink_hidden_ssid { * @aen: encryption info * @info: variable configurations */ -struct qlink_cmd_config_ap { +struct qlink_cmd_start_ap { struct qlink_cmd chdr; __le16 beacon_interval; __le16 inactivity_timeout;