From patchwork Fri Aug 25 02:30:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 9921201 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 2E458600C5 for ; Fri, 25 Aug 2017 02:31:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 174762022B for ; Fri, 25 Aug 2017 02:31:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B272205A8; Fri, 25 Aug 2017 02:31:42 +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 95B002022B for ; Fri, 25 Aug 2017 02:31:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754536AbdHYCbk (ORCPT ); Thu, 24 Aug 2017 22:31:40 -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 S1754438AbdHYCbB (ORCPT ); Thu, 24 Aug 2017 22:31:01 -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=5X2n3xKrnu9zvLWkeIPuRSkHsim++DYRcn2zldqpL/Q=; b=KKt4QlhaT8DuZSbfyO4t45a5+WA4yEPI0BAUrPbpvLg8o++XDXrGxMXOVSoPTLagiaNwLrWNzVmiL6FB1y5PHm5QMjcZPrPcIGwA5AZL1TT/yIn9JWIPkpIVkMXiF/Ntaz+BeYop+onZNSpHQDVt57MMls/cHz0uFgdnsJ62kcw= 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:59 +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 16/27] qtnfmac: stop using private driver info about current channel Date: Thu, 24 Aug 2017 19:30:13 -0700 Message-Id: <20170825023024.10565-17-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: 38ea723f-2fbf-49d1-11d7-08d4eb615299 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:gFdift++vNsEwt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Z1E2gTfZlCceRvW+S4XDRuNIwrIwnqHNW3rJ7WD9rR+TzXHlmVB2yBmTkzThT8LztWIXuT1pGD/Md82EGEle3CDgNw1ptl72UKTSq3gHRwmWdeFDz8qqc/FaKRr/FrM4CLtFb7sIy86Ra6TpRbQbUQxFxw6Rh6h/6tHOmrH5dXlR9NkCAqVMaiM2K38txXF2XhxIEzBTwByWx2zDn/vdwnoa4kWISeafNeLNsevLZfp9JLUGgReuMYydXrA6Sblph0ugTXUW1Zw7HiME8CA5Hk9OCkjQsCudRaQ7YziOE5IvSlaOHNMWcFz7ariwhv4cwgeeOH5hc/sVYCOYXqF2IAjoDxhn+Rxd3EgUKXloWnYZjvYBOpXTlKeznbW4AomGaw4G+K9+OMApNuS+xT/XG1SR8XJ+pSjm+kRQOPBsjPiK08WKQeplQ=; 4:DQWNKyg1I/OwWM5VzG9ScJIiqVCujgq1H1nEtRaH3RCXLIQHbXWBtgIpbldiXoXSz8Ke+1jxEV/+wpmPCBuHVcCSqtoZ9l1rEdsHeDsYQLlYYo6NwPcdg6s7+7b1sm/xAgnbWMsDdVBAieeOCYDE4CWtejAdabOoC+3QJPpQdn0VvND1A4ZRuEkjxSO80agf5yoykbHy63LL2GtiY7EPb5bQETZcpOpYFwZwajxGe4RkWpGvJzk7hQD40+sYfWns 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:E0NKwwUSpyDaDhoBEakh98+lD33s83aWMZ3ytsj?= =?us-ascii?Q?LIzaaStSGqKTu2gB7e3eKZKEnad/xSEOFutY9jX2jCzRU9lQsbQvKR0cFzqo?= =?us-ascii?Q?TzLTpU6kZ88HcFVmZ/Gh8F8BbgtHZf+zQonAwEFMxsHxxkViy0DvCq6QyMeJ?= =?us-ascii?Q?cktLpS+Zuu6po/FAd1dYlLWVGLi451Ys71HQ8qdtiODSUn6TLJ97axAC7yDd?= =?us-ascii?Q?VCZUEJLRo78+sfs70WIhnwFvx7qU18OcvKIAkh5GB9llZHC27hk08+blUusB?= =?us-ascii?Q?BZ0D4Vbng6sZuGKNsuJ/kOzYZaXl6pvuV2XLMguZvRXWJJTtwELj/6n5oXuL?= =?us-ascii?Q?uv+Fe3hoovXh9ZrwztQ5F4A3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wULElts/NY2my2XjDzFbZuzV5vQLasvlBB2?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2047; 6:viAYN4XVfbWcxKdFUvATN6e7Du50Xie5SHs2RQqLTIQ2vF9uQ9BBhFdBqeML7WF45Ck73D3NoGAF09ivGF6mDectNHoa6rMHnRHnTgYwRZYgIJrsjdQqXnsy9kKtwZRsmsD31nhLqYMTCzmBaUp6jGBsx38EfgxJajZHt6DKRcRty2P8HeIr2SKQ8SroWzAjzUk+koGq/Hqt2Pk6QuLWnuF9TW6BBN6sB+bzB9WGT0tuBxdwfP+LPd8EtOPaTTY87ao47DQtutwyFp/4gn9/0CKLFgpOHHMKf+JuFcH0AGKAhNT9VXhzMPmJBC//mpRCizycq6ILGWVyaQdIINmFig==; 5:rwAMwJ9c7GjVeMMnGYh75zE7sXfkJPXgPCkhmeHzotdIbBeuoct/7uJG3j5JldoFWDVOTs0R6I8ycmV6PqlIjJfw1Hp8E1LDxcB04NegCPC8TaCD05re2EO97rr+MKghiBHjs0W9aAZJNHDLl/DGkg==; 24:A5hsw5vIHCozo+pqJHE/TniXxQK1gjqu4PQqydnx5ohaDl9KT4Nw6Ri5O3k568bpWe5X5D9aQId5SFMoDWf+v7LS2NSRe86+VHWWsrhyVcw=; 7:SXCHLqlQ4WegaQjUK/5nf2e5eS3w17l+EGA0IYxxXfR/6FX8vb7l2Ebam9zj5olsKduJ2VkhEjQo/3VYwtmaqyqSyPNtSHA8xtDGXYKBXl9nay6HYCVHWxGW7AZqGQHTRBZr6R+CbbEC1mRoTI+sOt/zUx9MXBzhnJr4K8MMVTL38nBGUMeS8V5/EywMFmwsBgNnDpW/CdbfNmVQQJoF2gsLAzPz0F2HVelFbM+jHTU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2017 02:30:59.0263 (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 Linux Wireless device structure already has required info. Since driver's info is not used anymore, remove it. Signed-off-by: Igor Mitsyanko --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 7 ++----- drivers/net/wireless/quantenna/qtnfmac/core.h | 1 - drivers/net/wireless/quantenna/qtnfmac/event.c | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 8542c16..5ee3345 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -630,15 +630,15 @@ qtnf_dump_survey(struct wiphy *wiphy, struct net_device *dev, int idx, struct survey_info *survey) { struct qtnf_wmac *mac = wiphy_priv(wiphy); + struct wireless_dev *wdev = dev->ieee80211_ptr; struct ieee80211_supported_band *sband; - struct cfg80211_chan_def *chandef; + const struct cfg80211_chan_def *chandef = &wdev->chandef; struct ieee80211_channel *chan; struct qtnf_chan_stats stats; struct qtnf_vif *vif; int ret; vif = qtnf_netdev_get_priv(dev); - chandef = &mac->chandef; sband = wiphy->bands[NL80211_BAND_2GHZ]; if (sband && idx >= sband->n_channels) { @@ -705,7 +705,6 @@ static int qtnf_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_chan_def *chandef) { - struct qtnf_wmac *mac = wiphy_priv(wiphy); struct net_device *ndev = wdev->netdev; struct qtnf_vif *vif; int ret; @@ -727,8 +726,6 @@ qtnf_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, ret = -ENODATA; } - memcpy(&mac->chandef, chandef, sizeof(mac->chandef)); - out: return ret; } diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.h b/drivers/net/wireless/quantenna/qtnfmac/core.h index 5234a9e..44a2cbb 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.h +++ b/drivers/net/wireless/quantenna/qtnfmac/core.h @@ -126,7 +126,6 @@ struct qtnf_wmac { struct qtnf_mac_info macinfo; struct qtnf_vif iflist[QTNF_MAX_INTF]; struct cfg80211_scan_request *scan_req; - struct cfg80211_chan_def 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 db7e475..9befc9f 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.c +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c @@ -368,8 +368,6 @@ qtnf_event_handle_freq_change(struct qtnf_wmac *mac, mac->macid, chdef.chan->hw_value, chdef.center_freq1, chdef.center_freq2, chdef.width); - memcpy(&mac->chandef, &chdef, sizeof(mac->chandef)); - for (i = 0; i < QTNF_MAX_INTF; i++) { vif = &mac->iflist[i]; if (vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED)