From patchwork Sat Sep 2 01:44:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 9935433 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 190DE60216 for ; Sat, 2 Sep 2017 01:45:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B57C28542 for ; Sat, 2 Sep 2017 01:45:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F3D3E28552; Sat, 2 Sep 2017 01:45:10 +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 86F3128542 for ; Sat, 2 Sep 2017 01:45:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751469AbdIBBpI (ORCPT ); Fri, 1 Sep 2017 21:45:08 -0400 Received: from mail-co1nam03on0052.outbound.protection.outlook.com ([104.47.40.52]:13344 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750907AbdIBBpG (ORCPT ); Fri, 1 Sep 2017 21:45:06 -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=TX9GMuxvFxrR0dRF2jEkv1eL+mjIIc7Koix+yzodzbE=; b=yCVi64nLIUFnLPWdHS5Q1OGy2QREHuPqClpYYb+pw/jQwZGS8qJIzuOoXqr2pAafe/oCNryn3L0dPVT9yKRwCjVx59SUAVZ/WEtUDG8LWOPetesApCYK/5zh/FHy235+b+oqOmUtelPQrntaarN1d3m1l6YFM16/V+m8ZAVbaSU= Received: from dodo-dell.quantenna.com (12.131.200.68) by BY2PR0501MB2039.namprd05.prod.outlook.com (10.163.197.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.3; Sat, 2 Sep 2017 01:45:01 +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 7/9] qtnfmac: do not cache CSA chandef info Date: Fri, 1 Sep 2017 18:44:49 -0700 Message-Id: <20170902014451.17766-8-igor.mitsyanko.os@quantenna.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170902014451.17766-1-igor.mitsyanko.os@quantenna.com> References: <20170902014451.17766-1-igor.mitsyanko.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [12.131.200.68] X-ClientProxiedBy: MWHPR1301CA0021.namprd13.prod.outlook.com (10.174.164.162) To BY2PR0501MB2039.namprd05.prod.outlook.com (10.163.197.26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9edc38ec-3fb0-4fcc-f66b-08d4f1a43a00 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR0501MB2039; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0501MB2039; 3:NPlYWaonq/YB+0LGtINVJbfy+lUi9GTIV3E5ZSrES7Y556WitfEIQlCRcASO7XbNw99OrgkDsFiqDnAfygPGRKUvboZL3ZXpweRSLzd412RDYylPP0GJyLNZfGLdjHHDR5ApB6MHOx9m8D92rHYFTXap3LioRcUi5bf+H8fN7z82EZoVstaelJT7fdVFOUV7kdeop4Qf8Ax3kQ6SRSIqpQVfF/QrzCG7Ul1ZGrb16z9f5kyWq+15ip9TSrVOsy70; 25:ES/9yWuF27YFrEzAY/rXz1YQ9cvQbLh+2tSQOXpDtiI6QO72suC1uftjzwucbU4U6E7Zr0xYxy6lqtYkq3G33VtSq06ONvfzS3SI1UwGcp2uDrgHpwysOWj1eYVNxIVi1dqzJaqibGcsFZRuCZ2pd5JpJS5+5E7boMU2h/WikXHJ48kCZigez3Lt3j1irx/OYrqdA6rZtii1GEtK0lgw2OQ2RAiPuEzy+XJfFcVhVZwfHWsVhgEmAoWk+Zihg8rfCO9XMczb6XCvpcPHtzx/e0k/6YgakjK/gIJ9VAYaYPxpp3x4AAaCAV4xN94ixwdEhqPFIDjzTgZrs2wdu3rKfg==; 31:rdVZNHlsFu+eyYw9oxV5rj5ykd62y9BhRztBiVVb5MbAnr57Q8rxl7R7UFg5TOwequZURe0+g+DMXCkehwre5rIBoZdubt/Mt6dfwAdmuPyjDJG+HrjwQD8Z39PEp4Y04yRZ2mlM11QtXVT4h2w/LT2skhV5Jj9P4jymheWo2l+2Ak78BsfuA2B/fnCokKI25MTXQu+5XuVtzNkbBLcsD5QrDSh2TtSsO+WihxLqGdQ= X-MS-TrafficTypeDiagnostic: BY2PR0501MB2039: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=igor.mitsyanko.os@quantenna.com; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0501MB2039; 20:+5catUOoRTN5kw1WZ1TqLq5i7JIDSGzlHCZHq8sm0IAabavzSjerSv5C6eTGQag15SCNUlOCbsL437oSVVJZLZ6i6suRL2O6GqlIJCDntnMhzTN+WpFYV0I0+ysfSvVrMP8QuWfutFvsfcS7XVxh1GxHT81gctKq6fdH3Vvm4UEb5IYISeTomcpHUVOIj/rF6pP3FI8u3yJBSalt2ApG6tu6GyutlJ29aZj/iqXVOuPFvsokXqeZcq83sHxofquMdRCwOIWHQJ5yKL9o9cztOQd9rG/e4EO1YUP1JOTNA05ZI9Yzb/1kk/oPkVXdKu2Svceh4RpHnNNStaci2of3DBziv0LOg0vyR+/8Ez9vjYhV0uGtKmKAWNOOTCYcwyBsPehacKpSKRabFbS2JlxC22D8+t0GrHWZNCogYZcv7J69eOxkDnk/83YAl4HdmtRaupSHBWIUcxmdN3BwcLs3ed+55Y3rjdRJXwFIkbB8c/7spNNMIx9PgoIQd0hBKlUqP0VJoGnNq+GZOHC1XXFxuoxcR9+2AWsnbe4nNrS2Nz/dIS+rW6GiOKIH28GyQvApMVlgB9C7uLa5uKVdOdwTK8ZEpwJBDsI/+snaX1krpfo=; 4:6Msfa6CCoqCt/IxW/lFSJ+nyP7XaR8+gOz2+6Pxww7OeFYCgWeozGwCwAXiTUI30MYXuPKnJZXBzmyvUPOK2ikbmdbuqY+yCaRKwbezmgeAaKJeoZTC9Qrx/Ij9WlKAZlXpP75iZae7B8466+Ivquzk61wJeTfX6T+lyIAuzPJe/pql9zNIdH5Ned7cN0vLoULBduqkhm5dCWHS1zbBVySByamU9aRikHDhg/uHI+xY257W8J2LStRk7G5aolu+U 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)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR0501MB2039; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR0501MB2039; X-Forefront-PRVS: 04180B6720 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(39830400002)(189002)(199003)(103116003)(97736004)(50986999)(1076002)(6116002)(3846002)(76176999)(8676002)(50226002)(81166006)(85782001)(81156014)(8936002)(5003940100001)(36756003)(68736007)(2906002)(53416004)(86362001)(106356001)(478600001)(33646002)(6916009)(50466002)(2950100002)(48376002)(47776003)(2361001)(2351001)(66066001)(6666003)(4326008)(7736002)(9686003)(5660300001)(189998001)(42186005)(6486002)(53936002)(305945005)(110136004)(105586002)(69596002)(101416001)(25786009)(85772001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0501MB2039; 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; BY2PR0501MB2039; 23:flyUhKFPkhhEr5ceTwOMQGFr39jK2YLNEUW0gvO?= =?us-ascii?Q?+wZA5b56uFGTK3wDsboakZ6UAqH0gLS/lqPTyubpB9UG7vU5+31a4ExxG+Cp?= =?us-ascii?Q?3gMU4vQRC8kxsWHEaKOay99XwJSrf8Q7T7SEaZMsHYclkqkympk4VKx32KSr?= =?us-ascii?Q?t10yf99QAJuw2sKkn4pOP77T9LbpnjUoRmJ+F4jt3C9J7wxdU/jUZvFi1J/7?= =?us-ascii?Q?cC2lsFbXsafJxdjDo1rJnjDKrnq39EQfnpRFsfOJG5ISoM1EoQSmqfjueCdd?= =?us-ascii?Q?SWgVn4be74oBv5itE6JvzdV7UJmd01F4PMU/ioodXABAic3M5via5J5ws7Za?= =?us-ascii?Q?hHVtDEOMzRTx4GFYnAwE5gdIbj0QqrM4qu1f361/xD76BRfNfepbkDLbJX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TUpj7lAnNr0I2JZz6NRcem04//Mudq18VUpzSjmx7jRQMx86wjxmzDb3qHJtxVHz0MQGbfpnSgiW0IkY2gsmVIPdyRR0NZom3OKiXs7BYDb/NbKLXw2laZBqehJh+VNSDI1X3cRspC9TD/viNc5B0fs0Q4DdHu4jf2HFioToP0B7+q+PighnZ38EA348EpXTCUzz1YiC8j5Hv1bdxhnsjVoHYyKEuF0nkS8nTqw/HsFql2D/AYZ3JnwQ38y84LBl4JK8+d68rA41wf2dW+G6jup8FlrsjSsjdErQ+4lbaxD5fmjBgbg==; 5:50gR7870qu/wR98ToK1Lh8Py90koMOYaGQOf5oYVhOitsvj/PbeJIzoLbTIeXwe/9RO//W3dZ3PseE7pWPHPZt2hqjKjcoY/vjLoXH91HG2W1pUOn4Rty5Me/56mRtJFyBOSyNqZKbD2WgUjPlFdIA==; 24:Edi3d3EEp6snUMN5RIbt5U1Vv2JyMDiU/xxJi9gPo/pF/lKZlnQKp/fnZM77tPG3BhrxFujOR6dyPf+TuY7b93dfiIuPwqk92I8v4diexHs=; 7:3U7in9EVg97EQxaBUzZ5dG4PkbgKlbSB9AU3fGJvDbxLpxt5RnyLNQnU5GLJRZczV1bP03b7QoKhgAN11Gd+uokdhuBRhAu7XANgD0CgLKhNHDIfQ7+zFiyZ+uCfoKKEaPMW+lnf5f1USTWh6DWvbyGZe+lI3pY2n6FHwM4lm4mHOw4mUEvbFuS6cRGxJEuX8Ggw2L5HU0ChXZMUYHC2kylP/sne+xq0H69Tjl0KmhE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2017 01:45:01.3029 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0501MB2039 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 30f8be5..262e8cf 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -809,7 +809,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; @@ -830,17 +829,6 @@ static int qtnf_channel_switch(struct wiphy *wiphy, struct net_device *dev, return -EOPNOTSUPP; } - 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 0138dad..42f7e1d 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -2337,8 +2337,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 066fcd1..521ce09 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.h +++ b/drivers/net/wireless/quantenna/qtnfmac/core.h @@ -147,7 +147,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 df58e83..77563b0 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.c +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c @@ -381,13 +381,7 @@ qtnf_event_handle_freq_change(struct qtnf_wmac *mac, mac->macid, chandef.chan->hw_value, chandef.center_freq1, chandef.center_freq2, chandef.width); - if (mac->status & QTNF_MAC_CSA_ACTIVE) { - mac->status &= ~QTNF_MAC_CSA_ACTIVE; - if (chandef.chan->hw_value != mac->csa_chandef.chan->hw_value) - pr_warn("unexpected switch to %u during CSA to %u\n", - chandef.chan->hw_value, - mac->csa_chandef.chan->hw_value); - } + mac->status &= ~QTNF_MAC_CSA_ACTIVE; memcpy(&mac->chandef, &chandef, sizeof(mac->chandef));