From patchwork Fri Aug 25 02:30: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: 9921167 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 20FB0600C5 for ; Fri, 25 Aug 2017 02:31:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0975420564 for ; Fri, 25 Aug 2017 02:31:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F27F7205A4; Fri, 25 Aug 2017 02:31:06 +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 751FC20564 for ; Fri, 25 Aug 2017 02:31:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754496AbdHYCbE (ORCPT ); Thu, 24 Aug 2017 22:31:04 -0400 Received: from mail-cys01nam02on0041.outbound.protection.outlook.com ([104.47.37.41]:61440 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754480AbdHYCa7 (ORCPT ); Thu, 24 Aug 2017 22:30:59 -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=80oQAToSY10Wob/x88hBGhxWcWxDzqAnsQHmUfwp/dA=; b=LaIc0L0T0hCruRNfmMwttnt0uGl0mnLDf3j1awCtlzws8aruertRIZQfs8VRXKfdxN+2+7lcG8vOjYg60HHWSaEGoElHPRoTwS1zCN/MlqZ/2Givp0OXUly9ZK3Gq7cmcuGVZEYNDl/P8I9kcytwBOdmpCXnhdzgReoP8vsdAo4= 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.1.1385.4; Fri, 25 Aug 2017 02:30:57 +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, Igor Mitsyanko Subject: [PATCH 14/27] qtnfmac: do not cache CSA chandef info Date: Thu, 24 Aug 2017 19:30:11 -0700 Message-Id: <20170825023024.10565-15-igor.mitsyanko.os@quantenna.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170825023024.10565-1-igor.mitsyanko.os@quantenna.com> References: <20170825023024.10565-1-igor.mitsyanko.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [12.131.200.68] X-ClientProxiedBy: CY4PR15CA0017.namprd15.prod.outlook.com (10.172.74.27) To SN1PR0501MB2047.namprd05.prod.outlook.com (10.163.227.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4558cff1-6804-4c7d-b991-08d4eb61517f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR0501MB2047; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2047; 3:eKL0vIAVXIEc5W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uae9gb+7Dm0tC33WKcv6K2qxGiI6zwHU/qV259IIHIPzMqEi4f1PfCtsj3SUWFKx/z1h1GhXgqVdkck/5jSe2eUMnB1vAD/dDlHBv+kRNRa6KwkG6RrqHcivSwjwQqpMCkHA57d/0mrSVTIIrlENrGFBqPz2roz0T8sULTnQlmn5c8/I9ErKh/tXXvf14QkU9t2Z9c0QbvYE0dAxwGB+fNziCC21H2AyaS1FodxHBkaQrn4K14aS43sXr2O6xQQlQowEdG1Zx/oNd9gIOE0KaLHmiyOeKgOcAwR/SkZoLL3zBH4B/CfbveIf3ntm4wTmDBNTjRhBW8K27ucZ9pC9xOkQNsw9qQy23LrB/mUUgGqcr18xsf2f7Zvx8WvrZlQGmDpAkERmn8pRuFTqXWQeHtPH1OOICnOtUr68zqTBOObAUD3oEI0r5oZmLKyFyFz2U=; 4:vAE1ePjJi3tJkpBRFvbgBtC7sTqmeGzRoPkGWc/pbli5HWr7UT5bUVTMebu5+xYZagNRRcI3roP0y4GSt7PVQyRehBaTr7282QD6uvfdJCfEgVRg4nIWoV1UFec83DVfwCv7SY+XAhV1j4sv6jIX+DwsaOULZb5dRzin2gT3N0tgcn4TKsr31BjxqRModuZ5Qp7bWjxYHfaFEVMhqQtKKU2O9Iaq2o/OWGJJ4K6VeyODvIEE2i4t2hR1VD0bL+Ea 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)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123555025)(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: 041032FF37 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39830400002)(199003)(189002)(76176999)(53416004)(50986999)(110136004)(7350300001)(6916009)(6666003)(2950100002)(47776003)(2906002)(9686003)(53936002)(66066001)(2361001)(106356001)(105586002)(2351001)(86362001)(305945005)(33646002)(7736002)(42186005)(81166006)(81156014)(107886003)(8676002)(103116003)(478600001)(85782001)(68736007)(50226002)(50466002)(3846002)(6486002)(25786009)(36756003)(97736004)(5660300001)(1076002)(6116002)(69596002)(5003940100001)(101416001)(4326008)(189998001)(48376002)(85772001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0501MB2047; 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) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=igor.mitsyanko.os@quantenna.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0501MB2047; 23:dofMIRAz+aJPcw4ihMjM4uAktnZBHh9Tx0l6tgx?= =?us-ascii?Q?HEbB63XS+pTqn6qcC6hPuGR4mEQ7VmXdb0EbA66SEHuKbZ2WRpKE0H8L//8m?= =?us-ascii?Q?vVCk7ESfY1YBbDZeCqHR6Emb6GdFUPf8ZjjT0buNW0THwRQ+C6WKDu/c2FtV?= =?us-ascii?Q?TLHN0jKEgpY+K+JzcQ6XRCXRY59YRQydKZ9ahsm7etyBJeLoERjXdbBfc176?= =?us-ascii?Q?HO2D/ffN0wb9XChS93yNlzHn4Hv8QjC8xpd8EwIeFNgFk8NQeZs05Z+VuF4O?= =?us-ascii?Q?VNgq2bJIYlFyQW+0o1aSCJOH5wPVA85RZx2jgmc650bmvqWXreGiMXV1k7wg?= =?us-ascii?Q?xh86a+BoNh3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GxtBL3NDS//Y?= =?us-ascii?Q?100I/UFungnXekg+mHk3rQZk1WZ8va3fEMZuNHNOg?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2047; 6:NXQ8mds3pQJs9KORBZOQvid9a4GMflwMxejNSLY28DHXaksIhkPtDjjxLf4lYluDsC3lsBwHqPyz5XNyLDTJ5zIa0OIi3fNWqPo8CXRPsPdUA7vQOVgy0j4LKaN7WLOKqDaQxCEJp+w3iWg1UvAIe3OyVpM2uDUz1tRHGRcQyqHGErRg38T7lxPO1gk66BZQbyVzENU34uURLRizxoBhzU6rCysE/B5v/v56Y164bFysEJYXx2vBOR3rusbcIoTw9O49m5xoMRdZhyps6HeyKjXm0oGHBcfYQa9PDIHXiKbFJdzjPdk8t2JxC0E9JslNwT/dJ52KVxMIzqI/6l7rDw==; 5:89h6lClbbkbJ5XM8dvj/g39j/uy6FDyFq09zh1F6Tvc0EOg3x8nqpacKgBMNLTOzEisjVt7BGoEH/RSKnz5UHIC8Y6d8zhq8yHLMS+V2haARfHUBSAPBtL6RfCuKm7TUEn1Il09jpS/CpfaTIyP87w==; 24:vfwAuO5yWqAPLlK2x5GwtTyalUkHkeSAXtLjM+0afdcT3DTf2G2johlxIa3u6cRx5or+VQqEneaFLxSpPtMCySiuuOYtWlGWb8bfFk+Ksu4=; 7:0vPLJNuCh+kodx8PJ8M69qffM+z4Jmfw/qbN2+RsBTGKzk943WLrHI6yMyRsLk2CFbwpH41jayrY7HXwodBNh17uKCDj53vH+DzYP9qyJIphpsVkQmI+U7yrjsO16fn4uXCidoYkfvl9QLkGXMCZMrTE9itIyX91ehXsvpUtgoIqD+n0ladfOua+2baQGrECxvxlFsKE91BTaXqiTVwXvFw+ycjGKp7WaxzQ0AsgLJM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2017 02:30:57.2137 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted 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 It is never used for anything useful, and all logic is handled by either WiFi card or higher layers. Signed-off-by: Igor Mitsyanko --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 12 ------------ drivers/net/wireless/quantenna/qtnfmac/commands.c | 2 -- drivers/net/wireless/quantenna/qtnfmac/core.h | 1 - drivers/net/wireless/quantenna/qtnfmac/event.c | 8 +------- 4 files changed, 1 insertion(+), 22 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index b33c4fc..8542c16 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -736,7 +736,6 @@ qtnf_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, static int qtnf_channel_switch(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_csa_settings *params) { - struct qtnf_wmac *mac = wiphy_priv(wiphy); struct qtnf_vif *vif = qtnf_netdev_get_priv(dev); int ret; @@ -744,17 +743,6 @@ static int qtnf_channel_switch(struct wiphy *wiphy, struct net_device *dev, params->chandef.chan->hw_value, params->count, params->radar_required, params->block_tx); - if (vif->vifid != 0) { - if (!(mac->status & QTNF_MAC_CSA_ACTIVE)) - return -EOPNOTSUPP; - - if (!cfg80211_chandef_identical(¶ms->chandef, - &mac->csa_chandef)) - return -EINVAL; - - return 0; - } - if (!cfg80211_chandef_valid(¶ms->chandef)) { pr_err("%s: invalid channel\n", dev->name); return -EINVAL; diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index cfbb636..7a616f9 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -2347,8 +2347,6 @@ int qtnf_cmd_send_chan_switch(struct qtnf_vif *vif, switch (res_code) { case QLINK_CMD_RESULT_OK: - memcpy(&mac->csa_chandef, ¶ms->chandef, - sizeof(mac->csa_chandef)); mac->status |= QTNF_MAC_CSA_ACTIVE; ret = 0; break; diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.h b/drivers/net/wireless/quantenna/qtnfmac/core.h index aa1a92f..5997915 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.h +++ b/drivers/net/wireless/quantenna/qtnfmac/core.h @@ -132,7 +132,6 @@ struct qtnf_wmac { struct qtnf_vif iflist[QTNF_MAX_INTF]; struct cfg80211_scan_request *scan_req; struct cfg80211_chan_def chandef; - struct cfg80211_chan_def csa_chandef; struct mutex mac_lock; /* lock during wmac speicific ops */ struct timer_list scan_timeout; }; diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.c b/drivers/net/wireless/quantenna/qtnfmac/event.c index 7435986..b9ceeed 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.c +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c @@ -368,13 +368,7 @@ qtnf_event_handle_freq_change(struct qtnf_wmac *mac, mac->macid, chdef.chan->hw_value, chdef.center_freq1, chdef.center_freq2, chdef.width); - if (mac->status & QTNF_MAC_CSA_ACTIVE) { - mac->status &= ~QTNF_MAC_CSA_ACTIVE; - if (chdef.chan->hw_value != mac->csa_chandef.chan->hw_value) - pr_warn("unexpected switch to %u during CSA to %u\n", - chdef.chan->hw_value, - mac->csa_chandef.chan->hw_value); - } + mac->status &= ~QTNF_MAC_CSA_ACTIVE; memcpy(&mac->chandef, &chdef, sizeof(mac->chandef));