From patchwork Thu Jul 27 23:06:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 9867667 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 547EE6038C for ; Thu, 27 Jul 2017 23:07:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4793820001 for ; Thu, 27 Jul 2017 23:07:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C009268AE; Thu, 27 Jul 2017 23:07:41 +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 9826820001 for ; Thu, 27 Jul 2017 23:07:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751643AbdG0XHi (ORCPT ); Thu, 27 Jul 2017 19:07:38 -0400 Received: from mail-bn3nam01on0045.outbound.protection.outlook.com ([104.47.33.45]:52128 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751633AbdG0XHg (ORCPT ); Thu, 27 Jul 2017 19:07:36 -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=kh//qrscP+GnvaXiorB1tp7zz7aAEASPSov8FAC4Fss=; b=iT3oG+qSDJzXx5CwFXcE69cBIeIq7YOb5eb4j06cF3VWtth7R/wC8B9yoUURFDWKVRwg16fsKa2+Kioat8CwVK56G/lo5MU9BeGpMFKbet0WYW4NgUpm4vjjn1h0vIzEllWXdx0ciyc9F8b9JZ4FsHHJxHQpNuPfe6LntK1aIJY= 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:32 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Igor Mitsyanko , Avinash Patil , Sergey Matyukevich Subject: [PATCH v2 05/12] qtnfmac: implement reporting current channel Date: Fri, 28 Jul 2017 02:06:47 +0300 Message-Id: <20170727230654.30850-6-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: 7be0ccbb-3d0d-4889-2c45-08d4d5444428 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:P6zcJJx6fuXmZMgWe7y9IoJ447+iHncJc59pt6NQbe0gJ5kXKqUX5FXE52AmU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wdT7mPyfb7fo3wisxsiccK7w4k7QKF2Sc33Bp3VWy2MmvQiJBx46gJB4VqVQv61CtP5PmKYVLFg4y/eI7nD0NCDygtHd2IfVNwcrH9wwgu1Tt9IF/GFuNZa6MeYn/Uf+Oh00ye X-Exchange-Antispam-Report-Test: UriScan:(21532816269658)(211171220733660); 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:wH59LK+43pBIYX/BvNn1YPvdNcTm3fjxsMQDaK1W5S?= =?us-ascii?Q?oDAJcjUoAMgACbfVOUZDI08o5CKHetxk83AsZNb4krTJC6xjWGuv9tCTe3oM?= =?us-ascii?Q?LEt15UAb8jC3EzwWsQZatncBBgT7Lguv/wCx7dBCfaRFDRUgWRSIguAGs8zk?= =?us-ascii?Q?CLcyt/hATanzlXemHAWval6wPdoNFx/QRMEm5SAQ4WpV+5v1y5MunfKg1H9E?= =?us-ascii?Q?8UWlFjfA7SGYATcNN/q3bTYZGr3WzfGysvmu69XCtUmMvjJQcwQPETvukn9L?= =?us-ascii?Q?l9J2+J9aXN2CU3e30xT4m9u65xo5/2mafWajH3tu5eANgCfKat9mJVMyeYn7?= =?us-ascii?Q?0kt/0pCuWLyDg8WIA5ruwDQoWC5+RtFMPgGwFBJV+8OKBx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C953D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39450400003)(39830400002)(39400400002)(39410400002)(199003)(189002)(50226002)(66066001)(575784001)(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:SxZ4DqGvx/Y1r9dOmJ6as6m4f/iqYJI8j/PnyspGK?= =?us-ascii?Q?6uCtYVALwl8PcyP0wOn4DgHqspTbFxYoREhKxHNseCABS8jzc7Dwawq8hEyM?= =?us-ascii?Q?4Ooo54wJa904vGBBgbfj8kQpgvcphAE6RCxNWsKdO0N0QuTsh5nPrG71D/jL?= =?us-ascii?Q?eiF6+iwqcNPjSo4emwJIMkTbWJr9ELNy7y/2dzYQaZn1K4zUeOO5bEM4DKwE?= =?us-ascii?Q?evk451sxmm+cqP1d7bEe0LbTjAef1mMqK2Eo3CgVkVQC5MApZL4S+0eZxjz0?= =?us-ascii?Q?R5/7pMyibT6vESZTbcpJ65Gu8khGP1uF0+qvhknbJhu1CoemjMSKZF4gf95b?= =?us-ascii?Q?xMSGMBd+FGS3hjZqX59n/6lZp91xAPhL6drzbnCKHhRxUGSaUhV/1FBBuDyz?= =?us-ascii?Q?7sKN3C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mEcZUNx1GeSDbsPm8/8aoAkrJ/0?= =?us-ascii?Q?k100iMiZNaL8KwYdNMOf7QgcjzEdRwn67B0EGxW6lL1tISTpg5Xwx6nK3FgQ?= =?us-ascii?Q?wchSzHpyDuyR+fjYbKxL+0AUQD1AGSRtcXyhJcSdSay0TQIeVovH/qG5cXPm?= =?us-ascii?Q?HKE4l6Gtmx4f7979PlbuQVUVJHaxbbFwM6bH91UaNUGqry9WjSma9hrC3xs6?= =?us-ascii?Q?zsrywKe+kh++sesoYje01NvVyEcyxg+13mZdSQcrAMd/dG9eXEEOWAfIsF7L?= =?us-ascii?Q?Q=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 5:fkt9qEpB3eW/VQT/1ow9KJ+7lFp5vn456FzB0zKBeX5V5otOQ0BKtaYI9f7F9V7pVRdRmZVSzdvNYHkD/4JvJqBT/o+WIfqEiLy95mgI13EQT7YtUK7UIKohWUasPTaGON+5rQwmOCZXP3ZgrbJVs+mCxZCJUGqaacfxO2WCu/F7ULi/mwOPCymZgn8KzuQO0necxyNVgetstAP4zwG6FNTYXm5fUJZA5QRpz+cYegQwNFVUtN6CcI6oBJHInIgdbBdCU+XjB2l4W83XW4JyEz2CyLPoxea9H1Ev8n1/nXDmE6t1x+gO2n5UqWzCaADb55hAKa2F19+AC+HDQysOc9SSZr4SDx4K7M59uRiP8JkHlc6oIIsGW6J0TvFFu2kejH61yygBtwQ00n9ABApCsIwevvKIkoTnnNybSXJgLzDUGTDVZU615Q7XDk8igbpZctA1bVFlbwdLKEDoi1LOIOoDPqTnS7V5nJMFX77MxOICBcb3Q05weTJo8buz3lve; 24:W3n2bhW3Hcaf2UUTGye+TNb1fN+EFzi1zcQ5QVzrwHvXE1hI/mAwl7Pbj4Cm7yCextkQbCjnsaAZsqsZPW/Mb5esnYi3SFDiQP2N1/8ItLQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 7:Nb8Vj0HpLikVCfYg9DFIHlfBm2UZTOuxx8tcqbExF4NEFmhE7yjDFgR4fv39RxOuEpGSrKaPMA+0iMvVdeRgkjW6gJswn7uMmREpsZQkLdP2GruUh/F0/gCf6GnoEQzq+kr0IBuXKP7Ribh6g9raylaoJixYd267dLXbp9trMr5IsMuIY49d8wTS3vT+R6mQC/i+bjvdEUIEiGO2vXeRBvIzTqj1jo2wYBwHt7unLXaKIfReRhzCE2awbE+Zr9u9r/jClPwzcRu+S+sUSJ5SV5ZmmS+GiY0rjcHQUsVLqH+YOiFOxlUpqCBwFryEbH7f0gP0PZfVqeSluIRuhYUlYnv6tuUhA0JYtmzB+j+OjGGmzEPhx7V4VaSkc1JbHOqsByL/7gbKWiZPJEt4iGq5RMx3VjzUpEZrGTV6qe3RYxRUJ6Iw10rKw7sVA6qSHLsWFVwTIk1wXnQaUGKC+Ek9EzPPHXy0KozT7cTN9CgqWLXRyoPoxZpbyumjULAC9Y7NITeeXmD4U1TtDBuwka3dFaFian+fs36tdTdkHc/4lnC7PUi091sJKbg+7CtaxnJfB3KgbtzUp4qYb6P8xyB58VDDAgOLq+W7Li0CEKiMg42mGggqOLHstMoBB8BNW4JpNIykBBJfQZwDLKLfRp3KSsBZMY0YcRbdAeD824yxylJIOz1uc+mk/ZkuFYoWLL5jxULJVcVDiYACUuGzBA462DJHHybBjExWABYob2DP7R4vT9jRtnnCk51JDLCPOlIoD0xxkdS5PRp4AbFAI+WFJYjpxMcYNHrFPyCigdRJTBA= X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2017 23:07:32.4838 (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 Implement current channel reporting functionality. Current operating channel can be obtained either directly using cfg80211 get_channel callback or from stats reported by cfg80211 survey_dump callback. Signed-off-by: Igor Mitsyanko Signed-off-by: Sergey Matyukevich Signed-off-by: Avinash Patil --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 62 ++++++++++++++++++++++- drivers/net/wireless/quantenna/qtnfmac/commands.c | 2 +- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 2 +- 3 files changed, 62 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 23f180b7d43c..ef8089c163bc 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -593,6 +593,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 cfg80211_chan_def chandef; struct qtnf_bss_config *bss_cfg; int ret; @@ -605,9 +606,20 @@ qtnf_connect(struct wiphy *wiphy, struct net_device *dev, bss_cfg = &vif->bss_cfg; memset(bss_cfg, 0, sizeof(*bss_cfg)); + if (sme->channel) { + /* FIXME: need to set proper nl80211_channel_type value */ + cfg80211_chandef_create(&chandef, sme->channel, + NL80211_CHAN_HT20); + /* fall-back to minimal safe chandef description */ + if (!cfg80211_chandef_valid(&chandef)) + cfg80211_chandef_create(&chandef, sme->channel, + NL80211_CHAN_HT20); + + memcpy(&bss_cfg->chandef, &chandef, sizeof(bss_cfg->chandef)); + } + bss_cfg->ssid_len = sme->ssid_len; memcpy(&bss_cfg->ssid, sme->ssid, bss_cfg->ssid_len); - bss_cfg->chandef.chan = sme->channel; bss_cfg->auth_type = sme->auth_type; bss_cfg->privacy = sme->privacy; bss_cfg->mfp = sme->mfp; @@ -683,10 +695,15 @@ 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 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; + sband = wiphy->bands[NL80211_BAND_2GHZ]; if (sband && idx >= sband->n_channels) { idx -= sband->n_channels; @@ -705,6 +722,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; + ret = qtnf_cmd_get_chan_stats(mac, chan->hw_value, &stats); switch (ret) { case 0: @@ -743,6 +764,42 @@ qtnf_dump_survey(struct wiphy *wiphy, struct net_device *dev, return ret; } +static int +qtnf_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, + struct cfg80211_chan_def *chandef) +{ + 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: + if (vif->sta_state == QTNF_STA_DISCONNECTED) { + pr_warn("%s: STA disconnected\n", ndev->name); + return -ENODATA; + } + break; + case NL80211_IFTYPE_AP: + if (!(vif->bss_status & QTNF_STATE_AP_START)) { + pr_warn("%s: AP not started\n", ndev->name); + return -ENODATA; + } + break; + default: + pr_err("unsupported vif type (%d)\n", vif->wdev.iftype); + return -ENODATA; + } + + memcpy(chandef, &bss_cfg->chandef, sizeof(*chandef)); + return 0; +} + static struct cfg80211_ops qtn_cfg80211_ops = { .add_virtual_intf = qtnf_add_virtual_intf, .change_virtual_intf = qtnf_change_virtual_intf, @@ -764,7 +821,8 @@ static struct cfg80211_ops qtn_cfg80211_ops = { .scan = qtnf_scan, .connect = qtnf_connect, .disconnect = qtnf_disconnect, - .dump_survey = qtnf_dump_survey + .dump_survey = qtnf_dump_survey, + .get_channel = qtnf_get_channel }; static void qtnf_cfg80211_reg_notifier(struct wiphy *wiphy_in, diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index a1ce12082e10..c8c0685f81b3 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -2036,7 +2036,7 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif, ether_addr_copy(cmd->bssid, bss_cfg->bssid); if (bss_cfg->chandef.chan) - cmd->freq = cpu_to_le16(bss_cfg->chandef.chan->center_freq); + cmd->channel = cpu_to_le16(bss_cfg->chandef.chan->hw_value); cmd->bg_scan_period = cpu_to_le16(bss_cfg->bg_scan_period); diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index dd01c0b4f632..6c6940b503a4 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -384,7 +384,7 @@ enum qlink_sta_connect_flags { struct qlink_cmd_connect { struct qlink_cmd chdr; __le32 flags; - __le16 freq; + __le16 channel; __le16 bg_scan_period; u8 bssid[ETH_ALEN]; u8 payload[0];