From patchwork Thu Jul 27 23:06:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 9867671 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 836306038C for ; Thu, 27 Jul 2017 23:07:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7648720001 for ; Thu, 27 Jul 2017 23:07:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AEDB268AE; Thu, 27 Jul 2017 23:07:46 +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 C204720001 for ; Thu, 27 Jul 2017 23:07:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751660AbdG0XHo (ORCPT ); Thu, 27 Jul 2017 19:07:44 -0400 Received: from mail-dm3nam03on0071.outbound.protection.outlook.com ([104.47.41.71]:30304 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751635AbdG0XHl (ORCPT ); Thu, 27 Jul 2017 19:07:41 -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=hTJwdKiuOX8FO/V9fEtbX2y7UfWV4k+sprVJnk8pBbY=; b=c3LfuizYD5/kHKzC2wJ3IGxQdsCl9xSunzLbtemVuM4Pqr6zqdqt2GkWik+OdvyeRsxOk83bIwo5MiEQCtv1OpCIJmKly7GXHU5aBEFfPOZqZmbNlNOA13iMZ2BlBrNVR3IwRGKG6C3hQEIF05vu7Al9hsPXK2snUoX4V1603MI= Received: from bars.quantenna.com (195.182.157.78) by BY2PR05MB1928.namprd05.prod.outlook.com (10.163.32.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1304.10; Thu, 27 Jul 2017 23:07:38 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Igor Mitsyanko , Avinash Patil , Sergey Matyukevich Subject: [PATCH v2 07/12] qtnfmac: move current channel info from vif to mac Date: Fri, 28 Jul 2017 02:06:49 +0300 Message-Id: <20170727230654.30850-8-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170727230654.30850-1-sergey.matyukevich.os@quantenna.com> References: <20170727230654.30850-1-sergey.matyukevich.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [195.182.157.78] X-ClientProxiedBy: MWHPR11CA0019.namprd11.prod.outlook.com (10.172.48.157) To BY2PR05MB1928.namprd05.prod.outlook.com (10.163.32.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 69acc796-1710-4819-98aa-08d4d5444776 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254116)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR05MB1928; X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 3:KukSiHt8lhrLOGJCfjhkTx4cvTwyTwX9wB19TVwpIxHwydmUO4vu5+EvxKm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XOLXxbW5w4yBV2s9rrtcyTUjfVxev05gSbE7BNF5wpV5C+sxUbNAuxfdBwfpm4cfpxgHWp0EKL34KImv6foGAr0px490Wn5yUCSeQwixwaHr8LQdrL2FRtZGFPBERsH72PDDeD21Af10o1Z5grD/By6NsIPXMKTaf7NQZR5sEz/ew9JjBPMKEmkMFoEpoLv2s0l 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)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6041248)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR05MB1928; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR05MB1928; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR05MB1928; 4:6wiFBH/qiLdSyDF9S3a2xMGNqeP+X/a5OAUkScMKG5?= =?us-ascii?Q?JT5ttEZC/u8LA0jpUpHL8MRrluo+kSu97Vae73I0yAhKHttw7vN+EY9dE2hB?= =?us-ascii?Q?0OWTk/NcfOz6Vu0UTA464Ux8Saq3MQJvvrKdYX4MRfmk8wVxuHwCbjuKt88y?= =?us-ascii?Q?nQsVYC+vI6F3CCo8hEo4saaPJRgL0W15Sdkk0ByKUS9ee61ucX7ICVpers5J?= =?us-ascii?Q?98nOqc0F/KYsKsmQy35UgPiNCkx2dj0if0YOk9cjcJ7ZPoADlkWbGj6DJdlM?= =?us-ascii?Q?/KGSkzBtdVxZHxWASce5z6yR5dd23lvE6ytakpzJHyudlj62Ini1ZCwFie07?= =?us-asc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ront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39450400003)(39830400002)(39400400002)(39410400002)(199003)(189002)(50226002)(66066001)(86362001)(110136004)(53936002)(107886003)(50986999)(38730400002)(4326008)(68736007)(50466002)(305945005)(7736002)(6916009)(2950100002)(76176999)(25786009)(478600001)(1076002)(6116002)(54906002)(6666003)(6486002)(101416001)(69596002)(3846002)(189998001)(103116003)(7350300001)(2906002)(5003940100001)(97736004)(5660300001)(105586002)(2351001)(48376002)(81156014)(81166006)(8676002)(2361001)(53416004)(36756003)(106356001)(42186005)(47776003)(33646002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR05MB1928; H:bars.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=sergey.matyukevich.os@quantenna.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR05MB1928; 23:AVPC/04eLq0F5KPtZF8l3EfSe3SURfRXj23Z0apWL?= =?us-ascii?Q?CFk3abEnD1R8lfu9h+ckuHFWrPaxM2HVv1e5S/5uCbiXtW8b39Tncw3WXb8j?= =?us-ascii?Q?XNm093In982nHRITH5zyIvARJ+Zyv8pVedh/uDI5RiRMbLfibqJnrUK5GzX5?= =?us-ascii?Q?Squ9XeHFqDh82jTMWZcAqyKrvFmQu+0HDrm408U28iSLuUgBSVSGOtKMSDOk?= =?us-ascii?Q?U1q4B1j8KM0eoYpbMk3t6X/LUZEPF6ntVeEDCF0A8f/C/ktlIpcmPToRuSgv?= =?us-ascii?Q?TAWrV1PgvSvZeNZV7HDYauD7XOD/Rfp0CzCPxUOYuKFVGOpIB1uD64XNiYuW?= =?us-ascii?Q?M/9D4ROhvmI0jddWOFp7KuEQ75+iz49xXUExa68x9ZEqvUjbjHeAZE43ISo2?= =?us-ascii?Q?KqIIpCmCTGVxmW9tD5G1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42Hae9t1HQJuDC4?= =?us-ascii?Q?nLS74ZCKoNSI3EbwFogWWn8R5S2JCnkWT7nkRKnKx1P?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR05MB1928; 6:+Fq4R0EQuhvgiNUnZ3xEEcL170rp8p5ZdzLM+Stwvx?= =?us-ascii?Q?J1qmRaaVpPxCXcT7QlOlAJXVDt85SKdJAGjJQ1lwYEWu2ANgKwc3YdlpTO7w?= =?us-ascii?Q?r/wSna73NaONs+1nj/q+b1LP+8pZCnK9p61UVraIfRCcrZqvUq9/NwcosT8U?= =?us-ascii?Q?SICrfFTscBXdvihbe+wO71frxBTDI5c1Acnfp4vG4CkUJm9Yxjp6LQGjk2KO?= =?us-ascii?Q?CkrXms5fSpN0oW2IJxEtjD0U6ttmPXX94mD0JetXWBAN00oyH0k67jWZF8fM?= =?us-ascii?Q?O1F65V1NI0wvRDXmEWameeyGz8ERqbIXNVM/DQNO/Y1rJaZE601c+EaOFmeS?= =?us-ascii?Q?h1b31afnMVGNx14IaLXkL4CUIUh2syTytGFuk3xZGErHX3GC7lgCEQGvuGse?= =?us-ascii?Q?17SBakqZ/bM831yKOu1nU6PsT4sGSSbVElQVqk6yiYAhMiN9WURUXofDmV6V?= =?us-ascii?Q?ANooQ4sZBBXcH3WMjEhgZV+YlRi2TIQqXZHdr22XlHhZoXaj0tDLO6Ha+W7L?= =?us-ascii?Q?CHwX+URES9hl7bkiNBkM/r7LjKPSMypFuMKy+QxJCixP1oZdn8ZsF3K34gKd?= =?us-ascii?Q?zE6Ci1N5tQVbASxEj8DHXs/hDfqqtkZBUqu29i0uCysLGinWDi7hDvw288H9?= =?us-ascii?Q?em04u2gZIMuoXdc3TDv4ww39rKcgMPxFEnTDJdy2E8VRBy6aGAebpKUtXndO?= =?us-ascii?Q?PNKCLyIfhXbKJNAGpAL0iNl64AG+V5RQLUIcfPgrjbGgqtm9WspOAov94rKx?= =?us-ascii?Q?2piKYM2vZZyfzqpy4F9IE6bg+RzuMARrm0sgdl+Pvp0PchaOqmPEuCkOnLsz?= =?us-ascii?Q?BX9RJCJUA/2r6FGLJGpoBZzd1aiyaQFaSr0MAtRJLEGMVBWXDCyFOHzWpbgo?= =?us-ascii?Q?oiR1uuizr3Fdm3zM2IikTaMqbmGhYTXqvqYA20wS32Dwj2jR8hS93dRZ6qzS?= =?us-ascii?Q?7EUJk6JGWLlWNbql3j4OrDbCGPTMd7G9oVd0kryoliXqhGgA+IvzgRibkhpw?= =?us-ascii?Q?I=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 5:qlz0dwulf8nFRrBlJNaX6teLgiWA6niVgzlKEXCYtvsE+DMoZNIJ5NRKQQaLMtMSquFTsV+OMMZnZbF0TTvq6uZi3zmbDGx7dssEoA8dvTi86GVFioRcEk72SAkmk2ArGVOwx5RjIDWZI85+j8uwJUOdE01Y9nmyUN6TIPcNfx0ncyA/ewuNMiBwdopGo3krz3IsYPdRTQw3Rqm5LoljIfIOgXwD+L9adkqCrwxT8en/OlCu27/aMtcXxrkQyX76Dbjf1HvAVIs8ElqeENBn4xjkzk6rame3k7RW/buXOEkglGuXZzRPl+FxZH99gUGK+njiq1QPjKZuXx0acpYoTj/gk2+PD2nV/iqsNDBOT0cRoaC8cP247N2WGS62WhAPT/lUqR32ReuM1+3jfSaWF2Fvvb85ycHgKtZ6MYjLN1ygrBf/PCVan1k9UVsMwzabXZTp+BDHtvOSziCKYb6wtW+DcE0YbIo8epH39o40O/7aZTM1kwXQ2KerAtd4b+0Z; 24:go63QYmETDMCTcWaOtIUDptKVt6fsqIw/o4QTrOe5jbiK8TiTIVDsyksDyk/T64t1Lofs1NAb2AFMmxSbq4eyMxcX9OgF5gU3hrpmC7ZhA8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 7:aByRBqHohQ7u1zRQd8MH9SihvQgSXcOEIu9Oi367daeDwXahCPbplrQoGSRreBXVSFgSUIT67S1gyKSEJG2lEZUoibhZaCWOHd3tK/ZNbRPhLxCtLbeAvYChdiGVc4ZpKEadplReK+nQPYGwExDtuPIVZ16DhaV6BL31XPgT1bYK91eGw9naJUwlT4a/qv2yA9yuhz7Fx39h+0XmSrHRYnsi6Vwzap6vW/eOTCV5mtISl8hFQ+uz8uy8FNJpE1Ie2OSC6UvNV9pvZio8dU2II6Nd0Yjb2+vqtdLbfhP0flYqXG1f0Wy7mGHkw00An7FY+4JJCEqXJJLgFmd7/LvUF+xKd+GAtkbl9IFn5VfBy4PTrAyfKH9bfUZ3ysopTo3l7bsjP6mYorbruKPbMNXs8NMBNC/J1Pw8h03LO5m1Oy7Oyg8B2tn7s5ORzCXUnte+G4kuOUZ/YacAXa5EgemD9jjtLlldiY8KMrlPdR7uJ6J603Ppybj8HQ1z/F3BZcPjCRJ9oZBGHoopkP0im6jYX+qQHPL6StUklQ1cKippty57P2cTDPTADe50hPkCW2GPZGOoASejVUJzIDVh9SBa2Z0ZoCvVemfDcYt6K1RFA0J+n5y6V0krTyf7hKNOcDQnNdznJaP/qS3f1LF8QJsZh+nqxPkfXgl5P1mvzUHAt22MUyzaki9EQpwcfizj/yk8cIhNKKWialyiQca/8cXTE6IFFVrOdKpCNCr/3oHN5nbQ/3FZgpB6W/uExnY0nUEm/P5DNEK+qIUBFkMJS/uk5kS4g2L8+mA4AJ4dT9FG56k= X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2017 23:07:38.1091 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR05MB1928 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 Wireless cfg80211 core supplies channel settings in cfg80211_ap_settings structure for each BSS in multiple BSS configuration. On the other hand all the virtual interfaces on one radio are using the same PHY settings including channel. Move chandef structure from vif to mac structure in order to mantain the only instance of cfg80211_chan_def structure in qtnf_wmac rather than its multiple copies in qtnf_vif. Signed-off-by: Igor Mitsyanko Signed-off-by: Sergey Matyukevich Signed-off-by: Avinash Patil --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 38 +++++++++++++++-------- drivers/net/wireless/quantenna/qtnfmac/commands.c | 6 ++-- drivers/net/wireless/quantenna/qtnfmac/core.h | 2 +- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index ef8089c163bc..d47050934f00 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -266,11 +266,19 @@ static int qtnf_start_ap(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ap_settings *settings) { struct qtnf_vif *vif = qtnf_netdev_get_priv(dev); + struct qtnf_wmac *mac = wiphy_priv(wiphy); struct qtnf_bss_config *bss_cfg; int ret; - bss_cfg = &vif->bss_cfg; + if (!cfg80211_chandef_identical(&mac->chandef, &settings->chandef)) { + memcpy(&mac->chandef, &settings->chandef, sizeof(mac->chandef)); + if (vif->vifid != 0) + pr_warn("%s: unexpected chan %u (%u MHz)\n", dev->name, + settings->chandef.chan->hw_value, + settings->chandef.chan->center_freq); + } + bss_cfg = &vif->bss_cfg; memset(bss_cfg, 0, sizeof(*bss_cfg)); bss_cfg->bcn_period = settings->beacon_interval; @@ -281,8 +289,6 @@ static int qtnf_start_ap(struct wiphy *wiphy, struct net_device *dev, bss_cfg->ssid_len = settings->ssid_len; memcpy(&bss_cfg->ssid, settings->ssid, bss_cfg->ssid_len); - memcpy(&bss_cfg->chandef, &settings->chandef, - sizeof(struct cfg80211_chan_def)); memcpy(&bss_cfg->crypto, &settings->crypto, sizeof(struct cfg80211_crypto_settings)); @@ -593,6 +599,7 @@ 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_wmac *mac = wiphy_priv(wiphy); struct cfg80211_chan_def chandef; struct qtnf_bss_config *bss_cfg; int ret; @@ -615,7 +622,7 @@ qtnf_connect(struct wiphy *wiphy, struct net_device *dev, cfg80211_chandef_create(&chandef, sme->channel, NL80211_CHAN_HT20); - memcpy(&bss_cfg->chandef, &chandef, sizeof(bss_cfg->chandef)); + memcpy(&mac->chandef, &chandef, sizeof(mac->chandef)); } bss_cfg->ssid_len = sme->ssid_len; @@ -695,14 +702,14 @@ qtnf_dump_survey(struct wiphy *wiphy, struct net_device *dev, { struct qtnf_wmac *mac = wiphy_priv(wiphy); struct ieee80211_supported_band *sband; - struct cfg80211_chan_def *bss_chandef; + struct cfg80211_chan_def *chandef; struct ieee80211_channel *chan; struct qtnf_chan_stats stats; struct qtnf_vif *vif; int ret; vif = qtnf_netdev_get_priv(dev); - bss_chandef = &vif->bss_cfg.chandef; + chandef = &mac->chandef; sband = wiphy->bands[NL80211_BAND_2GHZ]; if (sband && idx >= sband->n_channels) { @@ -722,9 +729,10 @@ qtnf_dump_survey(struct wiphy *wiphy, struct net_device *dev, survey->channel = chan; survey->filled = 0x0; - if (bss_chandef->chan) - if (chan->hw_value == bss_chandef->chan->hw_value) - survey->filled |= SURVEY_INFO_IN_USE; + if (chandef->chan) { + if (chan->hw_value == chandef->chan->hw_value) + survey->filled = SURVEY_INFO_IN_USE; + } ret = qtnf_cmd_get_chan_stats(mac, chan->hw_value, &stats); switch (ret) { @@ -736,7 +744,7 @@ qtnf_dump_survey(struct wiphy *wiphy, struct net_device *dev, break; } - survey->filled = SURVEY_INFO_TIME | + survey->filled |= SURVEY_INFO_TIME | SURVEY_INFO_TIME_SCAN | SURVEY_INFO_TIME_BUSY | SURVEY_INFO_TIME_RX | @@ -768,15 +776,14 @@ 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_bss_config *bss_cfg; struct qtnf_vif *vif; if (!ndev) return -ENODEV; vif = qtnf_netdev_get_priv(wdev->netdev); - bss_cfg = &vif->bss_cfg; switch (vif->wdev.iftype) { case NL80211_IFTYPE_STATION: @@ -796,7 +803,12 @@ qtnf_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, return -ENODATA; } - memcpy(chandef, &bss_cfg->chandef, sizeof(*chandef)); + if (!cfg80211_chandef_valid(&mac->chandef)) { + pr_err("invalid channel settings on %s\n", ndev->name); + return -ENODATA; + } + + memcpy(chandef, &mac->chandef, sizeof(*chandef)); return 0; } diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index c8c0685f81b3..a3c3dddb194c 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -185,7 +185,7 @@ int qtnf_cmd_send_config_ap(struct qtnf_vif *vif) { struct sk_buff *cmd_skb; struct qtnf_bss_config *bss_cfg = &vif->bss_cfg; - struct cfg80211_chan_def *chandef = &bss_cfg->chandef; + struct cfg80211_chan_def *chandef = &vif->mac->chandef; struct qlink_tlv_channel *qchan; struct qlink_auth_encr aen; u16 res_code = QLINK_CMD_RESULT_OK; @@ -2035,8 +2035,8 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif, ether_addr_copy(cmd->bssid, bss_cfg->bssid); - if (bss_cfg->chandef.chan) - cmd->channel = cpu_to_le16(bss_cfg->chandef.chan->hw_value); + if (vif->mac->chandef.chan) + cmd->channel = cpu_to_le16(vif->mac->chandef.chan->hw_value); cmd->bg_scan_period = cpu_to_le16(bss_cfg->bg_scan_period); diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.h b/drivers/net/wireless/quantenna/qtnfmac/core.h index b2d050c4f1e2..6830ff45976d 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.h +++ b/drivers/net/wireless/quantenna/qtnfmac/core.h @@ -67,7 +67,6 @@ struct qtnf_bss_config { u16 auth_type; bool privacy; enum nl80211_mfp mfp; - struct cfg80211_chan_def chandef; struct cfg80211_crypto_settings crypto; u16 bg_scan_period; u32 connect_flags; @@ -141,6 +140,7 @@ 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 qtnf_hw_info {