From patchwork Thu Oct 5 01:38:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 9986285 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 AA24160291 for ; Thu, 5 Oct 2017 01:38:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B1FD28C06 for ; Thu, 5 Oct 2017 01:38:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 900CF28C3F; Thu, 5 Oct 2017 01:38:33 +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 D53CD28C06 for ; Thu, 5 Oct 2017 01:38:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751327AbdJEBi1 (ORCPT ); Wed, 4 Oct 2017 21:38:27 -0400 Received: from mail-sn1nam01on0084.outbound.protection.outlook.com ([104.47.32.84]:52980 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751221AbdJEBiY (ORCPT ); Wed, 4 Oct 2017 21:38:24 -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=meX5KysFuz4J+05xR8PMm1wP8yDpwgRVnJ+lAWPqFU8=; b=m2ycsuoUkMBelaFb9mjKCWMBMmc2IH5uKbnZXl17zMKyRiMX4CxDnmKAR0hsEX0t0EGnhtMiSDsNHzK9QQIPOxJh+VKc1GuimA9SkNC0GlZr6LP3e2WHaZOqvovRnPLB3zcMGQu9USQdPjkUHyHwWpWV9FuLODB89ir/JCt7DHk= Received: from dodo-dell.quantenna.com (12.131.200.68) by SN1PR0501MB2047.namprd05.prod.outlook.com (10.163.227.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.5; Thu, 5 Oct 2017 01:38:21 +0000 From: igor.mitsyanko.os@quantenna.com To: linux-wireless@vger.kernel.org Cc: sergey.matyukevich.os@quantenna.com, avinashp@quantenna.com, johannes@sipsolutions.net Subject: [PATCH V2 6/8] qtnfmac: do not cache BSS state in per-VIF structure Date: Wed, 4 Oct 2017 18:38:11 -0700 Message-Id: <20171005013813.13332-7-igor.mitsyanko.os@quantenna.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20171005013813.13332-1-igor.mitsyanko.os@quantenna.com> References: <20171005013813.13332-1-igor.mitsyanko.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [12.131.200.68] X-ClientProxiedBy: MWHPR20CA0031.namprd20.prod.outlook.com (10.172.102.145) To SN1PR0501MB2047.namprd05.prod.outlook.com (10.163.227.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 859c559b-235f-428e-5a79-08d50b91c372 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:SN1PR0501MB2047; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2047; 3:QjM+Q2i5bLuxI9PeB2BbIWU8ssuziNv36XpOCGg1GVOqHPvlMpmZrpMGRzrQH5gjrK3NPzFbmj0HKyfXpNr7hbZpzswTnR/cuzYi6X+fadMAl3gLBg7W1+r5tZzSTIkpUHiu/dkUHfqX68XiC1f0yxYuUcjxWZD65z/iBLKe0h1KvREeNywli56M8io8bpnMinOYfRSMoaZJlXQSZonkpXsOc7tv9BomeJGJ4+361BWxbmR9DgwQliAJs5uwfPYP; 25:Ty+PkZ7XQUAikjiuWxgKPmOe82kw2OolhHOBe1H460CemlpIyDlVIpJ2+aO2zzldFBHuIhN5fZqb48V4M1BxTMFLSyGzlzzTqcFUY37Z4TEDJL4dUvrqBX62RzqbFoYLfelNk4rJT5dVfmSXVj/5JcYeTuibT3oEdQ7FIKG1iTbK/4JPEpae5HuGQaEjoPp07qzjEbT1i7D08t3tw0r6XWC2a4zBlkwutxk8UCLPazr+hOV9EatFi/lYOCorDcURdT4bZS4JKWAnt/+Pv0aqZ0xOlURZt594+PHwPug1HROOHWNoDQ/I7LOAIDMY1tSrH7ayA7/AhdEULbfIuNx9iw==; 31:QMKL1Sl1W7iz5XDvpef/wmj7w/N4fgFEFRtgmKXYJ8PqzhNBvyNQzkcDi63IvlK/VP+6sV22zZ4Zag4odPtYodhnB/6hjxi7r7vNkgJZsWlFMlL5EZocdKUaJvRy6VQv/7AsKnSzMpLKwMzcV6OjKHU4S+McjHJBFqSYbuBsGQZhHC1pK+berz/Xe/1a+y0XRdO6ns+WksPdjr6wJhRpKsXd9Wofdlt1AJ+GrjYCEDg= X-MS-TrafficTypeDiagnostic: SN1PR0501MB2047: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=igor.mitsyanko.os@quantenna.com; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2047; 20:YGy90mlXG/JccJLme3VwgkexoisEl7Z35gGKSeoXw+m0nezJb2XcxeY+KLndW+T8v4ohHmhrCjes2n15qlgaL0cGs+baEas7KtqsldzZxZCqnJgmBuAcZzsB6+bg0WpRilAlDq0wzvZwWG+UbyRPNAooI23abZ/Gp4zwR8qcGRUit9yw7sTx8F1VQ45LEv/qXhSUo+mZ8i2lc/d4u/XiGnyG5zmQ9nL46d0iAT9Ai31acOLWocZvN+VRJ/NUTfhkttnj46m7qJ9y8Cd6xnq99fUaMGZRfph50JUqF4F9V3pI/tPkuaV4GKxx+N8+2hpBFLKiDytSiiKfO5EFsSSnkI+Por5oxTYrbsRIbHZkYoHHFH9LGTlg0/U96bA2tZ6hnBNc56LbclxeJwTak5oWtE4YcfUUpQalt7sSQqEIH/EcZo7oyDi1bujhx6TM+Vxvb07uM9IAKZYFoHeapT/lN/V4o6QByLuC8m4ufiCUkh3sdkTeiZOQ8jEriu0zsLUhaMuSjzmuNlOgPgr4HgoGUBspJTjFzXK/G1CBq7dh5HLi4cW5mDk9/Ukv0spEmm0Z3Tjqb0TucyVvSjapu57D3m8Szn+vcR+2V1Tn9gTYVnM=; 4:G75y8DYJKZoTQj2dz7znAYhU5+1gV2jdumnJV/xKpg7GGsM3Ql/ECR0jPoSgJU6DxDanLplszQSQgMiSPPjQzeYw//9DqRJaveMACck2rwfNVc1EspbjRPWNde9F44lJPaw4upMfjneS6qPWT+w3phcgbcgX/pFe6FGWqv0Y7L1t0ebAHLzYMbi5z8Fkw8nmAtrsjeNLK6vO/KllhcofPFBKheThE1P9YGIE3dbpU82DkBIl/WTXw7x0FyiENa8EAZp01qRPrcguWP34F4K3xcE7SZmal+I0GZdkWP1m3C4= X-Exchange-Antispam-Report-Test: UriScan:(21532816269658); 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)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR0501MB2047; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR0501MB2047; X-Forefront-PRVS: 04519BA941 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(39830400002)(189002)(199003)(25786009)(106356001)(103116003)(105586002)(2351001)(33646002)(69596002)(53416004)(2361001)(3846002)(16526018)(85782001)(53936002)(66066001)(16586007)(2906002)(316002)(1076002)(47776003)(6116002)(478600001)(7736002)(8676002)(68736007)(575784001)(86362001)(6666003)(97736004)(101416001)(6486002)(81166006)(76176999)(48376002)(189998001)(2950100002)(50986999)(8936002)(5660300001)(4326008)(36756003)(6916009)(50226002)(50466002)(5003940100001)(305945005)(81156014)(9686003)(85772001)(309714004); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0501MB2047; H:dodo-dell.quantenna.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; SN1PR0501MB2047; 23:bkwtDT4fgvXhEoYLjTf392TMt8q7Ir/IoXgrSsX?= =?us-ascii?Q?OzI2df98q7k8+KGVnCQ5CU57mNzAA5B364dUAsSzmuQXwKnUVjue5vzsICZl?= =?us-ascii?Q?ivSdxcBHQVBWjDPPErWscsrIN+2F1gxWP9DvblWve6NU6pAY542x0uvRlxUD?= =?us-ascii?Q?osok00Scf6dI+jNU11k++ts+nNgrrkxMEVOolRyXy0QDYwgLNStVKGbRbXER?= =?us-ascii?Q?tAfqngtW0u9G25AL5KLI/aAYtIVsE4/7eYdqDctSVBhjnG4/uN0nBSIt3XGL?= =?us-ascii?Q?bVctpLyO9PELV7fJUmDp4Av6dFwCAvC/FJDHtV84VPU11iGXPq8V+94DBU9a?= =?us-ascii?Q?SRwZW/6OUvglGtq5MzkysS/Iax9Cu4ZRteFA442v5+6ufjA29ryZuuAIv/XK?= =?us-ascii?Q?+aPlQpuz7TFU+22bH4ykf1N7jORAXbb/azw211QHNryitkBOZ/wp60hrq1SX?= =?us-ascii?Q?otBpJNG/rC+guKCvFx15OSr22uWfuKEVDEE6kh3V24fW2q+734g1jK4Hcn78?= =?us-ascii?Q?1uSZA29h8Q6tr9qHMVNYNCWSmosqYN8UBumufcZbMfqabilfDq2W0xywwLI7?= =?us-ascii?Q?Q2qmXWXUXzMZDj6RabG5y+oHfqViy9YMDJwTFgpyFKUz8FPJpa7ECq1sGCy7?= =?us-ascii?Q?qwBvXOH5xzOPrTMFAgz0jONGJHHrt2r1oBUnQJVedG3RcS76zCtx3y1wM3Ok?= =?us-ascii?Q?cKiOqcZGQF2EtH7FUF7eN/cPWpJbFZNqMKRdostFJKTodlJTUdlHuEEXMynS?= =?us-ascii?Q?Oau3MPmmPXNyG2lLcIAtCbwQC5IdswkzxOMl3ui5OXjiAQ5LYiu/edjxfEPw?= =?us-ascii?Q?TrLu42ItKz+GZ7rnyKz3jEjpstNCYP+4RAeulmZKHBHGtO3RiNgMMlrsUVvi?= =?us-ascii?Q?Or8Ycxk0j0935kGmX9EJaF4ObRcP+bUnf5sQl13k2RBp0t//qazTJWtWCc+A?= =?us-ascii?Q?ajv7j45t0GFeRiDpdolgsMwAVJd16IoagW83JOeDL1hI5466O5g7PJIrcXCh?= =?us-ascii?Q?7ubQIwbz2QbUi7K5hOJ/07unbKz6P893WKs6491e4mZ67bGByCT5A47M+n0W?= =?us-ascii?Q?pDF4gv8BlVaOu1Sca1JOEDS17iIFwqubo5idcbdE11kEC4hlfDMhgcJLswrw?= =?us-ascii?Q?aKW9MkV0TYnC7Iu8bIfiyj2b5jxJZPFHMSjDqi6V/LkToe9UrhhjGixXG/eG?= =?us-ascii?Q?AgxiLdDh+dk7ARQ+XI/74j6c3NAzXhoMS9oim8/97QWKZ8jEwzt8yqMTvMC+?= =?us-ascii?Q?FJUSYg3A6TL4k5fg1sPVwZ5fG75rHqVJrifjnoUyzRtZGHqF+tsLaGgf6mJf?= =?us-ascii?Q?fLg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2047; 6:MRcgJfbCP3RSS/9FunIKBTay0FRmzYrt79H0sgdiLmJRedNz11SkubaWIK3j6h6zFyOG01kSQfFKtj7FgpneP6FFV0SGMlCDmLM3ychnVRlAoHBg3Bpij6bsm/N++oGWOWMExDM1lawILlqgF/8sg5yL8WBtjqRPfzQAfPdfzX8XyYJ31t9lHD8w1N2T1rUgb7wvrgUpI08xq+8n9hNwkzm4osK2XJvcmMtHnlM4b6SjWkZZ/3FqmABOvaxheR296gmS5cdhn/59P0d7GySrP4or/X3buDqsAPP+Jaye3wd9awQpFhAQdOvsd7fvs2V4XjyyV4h0WojUecv9eJ3vug==; 5:gA39pmHTIAwVKYS1fOipioJmBEtzXDVbKlCb6CcwvlhdEE2Or/WF/1to9+la8nyNkvAwh/78eeJaVpwf729P7JKXLf5Re2FkbYF+2VI8ULCXmZGGuEIgE7w+PeKJgqU/WJRsecojrBEBTZYPfcmgNA==; 24:Z6SZqkXyiHLW8BidRt+dDN+tGDz+tJc6OMYFeMmVjZBGAhI7cKxW1Z5HOD6vLENTr5fPXb3160IV639pp3yatdTW+zd8Y7iXQVtGYWy9fO4=; 7:hX11UgjxWrgMQuliD1ecba6uDcm4WWEk6qPAbOw3eKYjFZ64PLRi3astdHEZ1xBlHFADOromlchN01N2GhovXGOT8Zlh6LAL1FS8n4NHsx4N/Kaoq24ee5M9eF4oSpQpBzZbtkPjTYQAnI7HXJP3s4t+yzLHWPupQZNcrYIcpqJzaLQZLXL7c/DxEgrBJJd8gRXluRR0pzZK377oYvactjYWg35qf2yAy0ZOasAVlFM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2017 01:38:21.5632 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0501MB2047 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 This cached state is used only once immediately after it is initilized, except for BSSID value that is used for events processing. There is no reason in keeping unused data in driver's state. Signed-off-by: Igor Mitsyanko --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 40 ++++-------------- drivers/net/wireless/quantenna/qtnfmac/commands.c | 49 +++++++++++++++-------- drivers/net/wireless/quantenna/qtnfmac/core.h | 19 ++------- 3 files changed, 42 insertions(+), 66 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 08f1f54..cf0f19ef 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -131,6 +131,7 @@ int qtnf_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) vif->netdev = NULL; vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED; eth_zero_addr(vif->mac_addr); + eth_zero_addr(vif->bssid); return 0; } @@ -199,6 +200,8 @@ static struct wireless_dev *qtnf_add_virtual_intf(struct wiphy *wiphy, qtnf_cmd_send_del_intf(vif); err_cmd: vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED; + eth_zero_addr(vif->mac_addr); + eth_zero_addr(vif->bssid); return ERR_PTR(-EFAULT); } @@ -567,7 +570,6 @@ qtnf_connect(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_connect_params *sme) { struct qtnf_vif *vif = qtnf_netdev_get_priv(dev); - struct qtnf_bss_config *bss_cfg; int ret; if (vif->wdev.iftype != NL80211_IFTYPE_STATION) @@ -576,38 +578,10 @@ qtnf_connect(struct wiphy *wiphy, struct net_device *dev, if (vif->sta_state != QTNF_STA_DISCONNECTED) return -EBUSY; - bss_cfg = &vif->bss_cfg; - memset(bss_cfg, 0, sizeof(*bss_cfg)); - - bss_cfg->ssid_len = sme->ssid_len; - memcpy(&bss_cfg->ssid, sme->ssid, bss_cfg->ssid_len); - bss_cfg->auth_type = sme->auth_type; - bss_cfg->privacy = sme->privacy; - bss_cfg->mfp = sme->mfp; - - if ((sme->bg_scan_period > 0) && - (sme->bg_scan_period <= QTNF_MAX_BG_SCAN_PERIOD)) - bss_cfg->bg_scan_period = sme->bg_scan_period; - else if (sme->bg_scan_period == -1) - bss_cfg->bg_scan_period = QTNF_DEFAULT_BG_SCAN_PERIOD; - else - bss_cfg->bg_scan_period = 0; /* disabled */ - - bss_cfg->connect_flags = 0; - - if (sme->flags & ASSOC_REQ_DISABLE_HT) - bss_cfg->connect_flags |= QLINK_STA_CONNECT_DISABLE_HT; - if (sme->flags & ASSOC_REQ_DISABLE_VHT) - bss_cfg->connect_flags |= QLINK_STA_CONNECT_DISABLE_VHT; - if (sme->flags & ASSOC_REQ_USE_RRM) - bss_cfg->connect_flags |= QLINK_STA_CONNECT_USE_RRM; - - memcpy(&bss_cfg->crypto, &sme->crypto, sizeof(bss_cfg->crypto)); - if (sme->bssid) - ether_addr_copy(bss_cfg->bssid, sme->bssid); + ether_addr_copy(vif->bssid, sme->bssid); else - eth_zero_addr(bss_cfg->bssid); + eth_zero_addr(vif->bssid); ret = qtnf_cmd_send_connect(vif, sme); if (ret) { @@ -1021,7 +995,7 @@ void qtnf_virtual_intf_cleanup(struct net_device *ndev) break; case QTNF_STA_CONNECTING: cfg80211_connect_result(vif->netdev, - vif->bss_cfg.bssid, NULL, 0, + vif->bssid, NULL, 0, NULL, 0, WLAN_STATUS_UNSPECIFIED_FAILURE, GFP_KERNEL); @@ -1048,7 +1022,7 @@ void qtnf_cfg80211_vif_reset(struct qtnf_vif *vif) switch (vif->sta_state) { case QTNF_STA_CONNECTING: cfg80211_connect_result(vif->netdev, - vif->bss_cfg.bssid, NULL, 0, + vif->bssid, NULL, 0, NULL, 0, WLAN_STATUS_UNSPECIFIED_FAILURE, GFP_KERNEL); diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index 60d65df..b65d705 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -2037,11 +2037,11 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif, { struct sk_buff *cmd_skb; struct qlink_cmd_connect *cmd; - struct qtnf_bss_config *bss_cfg = &vif->bss_cfg; struct qlink_auth_encr aen; u16 res_code = QLINK_CMD_RESULT_OK; int ret; int i; + u32 connect_flags = 0; cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_CONNECT, @@ -2053,42 +2053,57 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif, cmd = (struct qlink_cmd_connect *)cmd_skb->data; - ether_addr_copy(cmd->bssid, bss_cfg->bssid); + ether_addr_copy(cmd->bssid, vif->bssid); if (sme->channel) cmd->channel = cpu_to_le16(sme->channel->hw_value); else cmd->channel = 0; - cmd->bg_scan_period = cpu_to_le16(bss_cfg->bg_scan_period); + if ((sme->bg_scan_period > 0) && + (sme->bg_scan_period <= QTNF_MAX_BG_SCAN_PERIOD)) + cmd->bg_scan_period = cpu_to_le16(sme->bg_scan_period); + else if (sme->bg_scan_period == -1) + cmd->bg_scan_period = cpu_to_le16(QTNF_DEFAULT_BG_SCAN_PERIOD); + else + cmd->bg_scan_period = 0; /* disabled */ + + if (sme->flags & ASSOC_REQ_DISABLE_HT) + connect_flags |= QLINK_STA_CONNECT_DISABLE_HT; + if (sme->flags & ASSOC_REQ_DISABLE_VHT) + connect_flags |= QLINK_STA_CONNECT_DISABLE_VHT; + if (sme->flags & ASSOC_REQ_USE_RRM) + connect_flags |= QLINK_STA_CONNECT_USE_RRM; + + cmd->flags = cpu_to_le32(connect_flags); memset(&aen, 0, sizeof(aen)); - aen.auth_type = bss_cfg->auth_type; - aen.privacy = !!bss_cfg->privacy; - aen.mfp = bss_cfg->mfp; - aen.wpa_versions = cpu_to_le32(bss_cfg->crypto.wpa_versions); - aen.cipher_group = cpu_to_le32(bss_cfg->crypto.cipher_group); + aen.auth_type = sme->auth_type; + aen.privacy = !!sme->privacy; + aen.mfp = sme->mfp; + aen.wpa_versions = cpu_to_le32(sme->crypto.wpa_versions); + aen.cipher_group = cpu_to_le32(sme->crypto.cipher_group); aen.n_ciphers_pairwise = cpu_to_le32( - bss_cfg->crypto.n_ciphers_pairwise); + sme->crypto.n_ciphers_pairwise); for (i = 0; i < QLINK_MAX_NR_CIPHER_SUITES; i++) aen.ciphers_pairwise[i] = cpu_to_le32( - bss_cfg->crypto.ciphers_pairwise[i]); + sme->crypto.ciphers_pairwise[i]); - aen.n_akm_suites = cpu_to_le32(bss_cfg->crypto.n_akm_suites); + aen.n_akm_suites = cpu_to_le32(sme->crypto.n_akm_suites); for (i = 0; i < QLINK_MAX_NR_AKM_SUITES; i++) aen.akm_suites[i] = cpu_to_le32( - bss_cfg->crypto.akm_suites[i]); + sme->crypto.akm_suites[i]); - aen.control_port = bss_cfg->crypto.control_port; + aen.control_port = sme->crypto.control_port; aen.control_port_no_encrypt = - bss_cfg->crypto.control_port_no_encrypt; + sme->crypto.control_port_no_encrypt; aen.control_port_ethertype = cpu_to_le16(be16_to_cpu( - bss_cfg->crypto.control_port_ethertype)); + sme->crypto.control_port_ethertype)); - qtnf_cmd_skb_put_tlv_arr(cmd_skb, WLAN_EID_SSID, bss_cfg->ssid, - bss_cfg->ssid_len); + qtnf_cmd_skb_put_tlv_arr(cmd_skb, WLAN_EID_SSID, sme->ssid, + sme->ssid_len); qtnf_cmd_skb_put_tlv_arr(cmd_skb, QTN_TLV_ID_CRYPTO, (u8 *)&aen, sizeof(aen)); diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.h b/drivers/net/wireless/quantenna/qtnfmac/core.h index b35200d..5234a9e 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.h +++ b/drivers/net/wireless/quantenna/qtnfmac/core.h @@ -57,20 +57,6 @@ extern const struct net_device_ops qtnf_netdev_ops; struct qtnf_bus; struct qtnf_vif; -struct qtnf_bss_config { - u8 ssid[IEEE80211_MAX_SSID_LEN]; - u8 bssid[ETH_ALEN]; - size_t ssid_len; - u8 dtim; - u16 bcn_period; - u16 auth_type; - bool privacy; - enum nl80211_mfp mfp; - struct cfg80211_crypto_settings crypto; - u16 bg_scan_period; - u32 connect_flags; -}; - struct qtnf_sta_node { struct list_head list; u8 mac_addr[ETH_ALEN]; @@ -89,6 +75,8 @@ enum qtnf_sta_state { struct qtnf_vif { struct wireless_dev wdev; + u8 bssid[ETH_ALEN]; + u8 mac_addr[ETH_ALEN]; u8 vifid; u8 bss_priority; u8 bss_status; @@ -96,9 +84,8 @@ struct qtnf_vif { u16 mgmt_frames_bitmask; struct net_device *netdev; struct qtnf_wmac *mac; - u8 mac_addr[ETH_ALEN]; + struct work_struct reset_work; - struct qtnf_bss_config bss_cfg; struct qtnf_sta_list sta_list; unsigned long cons_tx_timeout_cnt; };