From patchwork Thu Jul 27 23:06:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 9867665 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 C2AB96038C for ; Thu, 27 Jul 2017 23:07:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B586720001 for ; Thu, 27 Jul 2017 23:07:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA6A5268AE; Thu, 27 Jul 2017 23:07:38 +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 B24D420001 for ; Thu, 27 Jul 2017 23:07:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751634AbdG0XHg (ORCPT ); Thu, 27 Jul 2017 19:07:36 -0400 Received: from mail-dm3nam03on0075.outbound.protection.outlook.com ([104.47.41.75]:28032 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751593AbdG0XHd (ORCPT ); Thu, 27 Jul 2017 19:07:33 -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=69YEXMkIZog6S7Rr6qonpVfe+0znzdQKi50oG10dgTs=; b=qnXm/vpFf06eh90dta8/oUYHK4ICPXLD/aiKRYC+HlFOUs8EHAPF3THoZiorsyIyBfElGkgUj1h2bBLczOrM4YcG+leOSQumlO2rxrgBuAxmNpDhjUrmEF3Gotf/DCD2E3Y/IRe0IHNsdeMg03aQNYEoPmWgRjcAouTT2o8Ft/s= 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:29 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Igor Mitsyanko , Avinash Patil , Sergey Matyukevich Subject: [PATCH v2 04/12] qtnfmac: implement cfg80211 dump_survey handler Date: Fri, 28 Jul 2017 02:06:46 +0300 Message-Id: <20170727230654.30850-5-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: 15e4d2de-473f-4326-51a9-08d4d544422c 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:ScTfUln9VQCejK97N/2TYq5FIDtPdj8QQosJT0kDj5kzINy8ChmCDH4jXfWQ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wlBIGcJqEitdNLLR1GcFN6pEJTApLWpHVRt6lMM?= =?us-ascii?Q?vFycq9/WLM0IwqezsvP57AKsTpj1x6HndAG37ceEB/1R7vbgncm9WlxVrILg?= =?us-ascii?Q?R9YyQjF6Xy3NuH4E0mfZpms2bqaNJ+HEqFXGhIzh8jNB0OwngZJyiLC5YhaX?= =?us-ascii?Q?CDsDIUPKEvGoX2yPF2iUnHM953LxbIPssG0F/TAa8nm9mAO4vM5+C5F9eOXM?= =?us-ascii?Q?EqOn871wZZXGNXdf9WcxuZb2/VCPPw5SXVKNgx0RN5yw+R69vKktoTQSLbzW?= =?us-ascii?Q?WBRAk3irvjs8eP4sekmKTKSKQlEcost5BriVpP4NGAL/SDx3d2/PcNRULSIT?= =?us-ascii?Q?Kg2YgRT85t8iuxhD7ZsesNFMGRmQK1TBgmUfgFsemFGrtPG5oAk5h/H54a1y?= =?us-ascii?Q?l8U4W0XLOhbQ1N8pFczq/ClyMaI0BnnpRGPsXwuap3hDd9d2UPDzmueFfOjy?= =?us-ascii?Q?Wy2+939a0CAZOqXHBuGdsIL8xgxn3G/bwadDFyLRAGBVN5j92SYMZo0X/sBL?= =?us-ascii?Q?1wLxPjLvzihkiwNLdvxPhyQNkETuF98dh4YotkWbpIDxZX2MFJ/tBWfL5Fyl?= =?us-ascii?Q?hLuRh/6QfHP5karWDSMozESXPnydYnW6+HXSFKb5yi7o4e2ryPnpTuowPM8J?= =?us-ascii?Q?3dYiYI5ST5ioibp2jjQ+qYQ9NDgo1qwqeRP+Wp2+jR0SBP/s1181pe99LH+1?= =?us-ascii?Q?JGODPtX9uFE72blylaTUEDO73arfj9gObozwJpnMMh6Afo5K/9EIIoW6U6Ir?= =?us-ascii?Q?I9+dMgHNE4y55FxFYwYFWxJEhbSpyVWwUkagHY/f38w+oSMFQFZM8lDpH3vb?= =?us-ascii?Q?Yk=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 31:QGU52KR0fUWwxtfhG5VxNW2pVcx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E1Avm1l9kke3jU+bdK5jTlRAnEZ1KNdlad3Id9CAo8o7qiKMxV4qaDBYCjC8i1Or1VIacNlUEkctzT3wdrE7jYWsF3W0fABoGskUfMKv9zL1ZD5xpz3HaBdudrYUOpiWzidjH0GwqIPq6xCI 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:P1b9vNY9ww9+43hHnSz/AIxnzI1uKCl0iCQBbyi+Gm?= =?us-ascii?Q?Rq1EUGoUDkQTnCnCCf16St15qCvRMCPbWXRz9pi2SxfARpbFN2D+3ZcRv9qA?= =?us-ascii?Q?4ExphQG+wTvlPTrRPUaJ3QH9zngPmyZgZN0sag35vc3RkKgXpGNuacg05srX?= =?us-ascii?Q?0pcrmUX14c4+ClrEgw5NnjpB8U8BhMjXgkf3M9EuBmBE9z1DwsPlEoyt2bYw?= =?us-ascii?Q?n9g2TYoFD8Ow/MYRNcxxRWfeLqllooH5ln0bljjuGidPZVho19UFOiKv9+qX?= =?us-ascii?Q?SLVxbd68I0+6wZ7RCOThjfc9jcitfPgNVK4lzE+ieh1Y2XYNrabrwM9E7RQs?= =?us-ascii?Q?D3GWB2Vfn54IiUQstyo5xKxLfz9/nkeciiRRiL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FS:(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:Q9goAdqzDxaa/iRgPyhLrOugRMdOUOx/QAnA572dX?= =?us-ascii?Q?ILfoU8qRCsbAsfSpWiId3UuV3h1aWEBRqw6SXrFMQkK54ChC9BFMRLqbqlsf?= =?us-ascii?Q?AQ1Oe2r5wMhC1b7CbgM1GCLRHP9U7t/sfUvk89NFCQqbeaI/wWr2iboGmv1A?= =?us-ascii?Q?wy4nS+SnNal6hZBaFP7CzkXExg64SFLgVfjNjvA1wXb//3pS5S3QHSGPqseF?= =?us-ascii?Q?yfkn5tXk3a0Q67mpu+sqmdOEt952TFc0Dyf33fBLpDRDdigvzxi91etKcAlj?= =?us-ascii?Q?oaf9cw7COXxduuYt/UkCD4bCr2xWKIBT0MqPhhmTNFRhkCwYBXXWxLxW0mqO?= =?us-ascii?Q?X09IS1qzyzp9yMaFNSPtDs8ibI3DZxTw6qMxR6JFwZpOXtCrgysYSBycXjeO?= =?us-ascii?Q?o+z1K0CMfPyrF0tJat6Wio112PA5XNKNDriv0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Q?W6ofli+Ss1ZfIz4owEprslJjD1NwK9oEviJYk7SROaHXWZDyLLzAGGnAvjLa?= =?us-ascii?Q?/JxaKfjuBEmIMxkxJhRu8yb0qMtpfQ7SQOIEO/44vkxj+faeocJWrCw8FoNi?= =?us-ascii?Q?XWIFD75atFcVB+6fTc/1ynfGezcJIwXHVItgwKBP9DVaVeQ3jWpELuD1WEhO?= =?us-ascii?Q?6eQsHva75k4FYreHOaFcSLHs71CeStE6WfAge9ykNrv76fTcPseR9/5pRS+X?= =?us-ascii?Q?E=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 5:F14aSVqMXJw9hATyhD55SKSnWzyp1ppZqbf+yGbayG++FINNyZCX6b+2Ulj3HMhQhdwpF1uBwOIcuG13KpRIpNjpiCGMSpzuG9GnRG60ArEipTECwMRhQH8oId1hoaElW0r8wxBv5sTNySGRcmlEp3tMBwFseA/s2zqExFRwI2eHUwDhuIChCX4+cH+Mv3BaKMoL0s3mz45ccRdDtrQKcHTrAKRwTJ9yCrS3Y5F6FBNFmQIIYWlrThJVVumczTCCIOHHNScQgV94oI6rlmmiWKe+uY2B5ZhkVVC165f0XmuGkiugeNELDfsge/rEKcGub4V1OXvBbUAPlalNnbPVuqu6Gb+33IFn3iC7cXV2JJhEUE8/lhPRcENMCXMx9m0R1yp8BUn1IHjaKkptZYKi8DjOgy57Ee8QlXxcp9ckvRYx09B+EBU08tAxpOVWBknlR6JHwXK6qk2ccQfLH6MBclX0fuASr7V5Vqufz0TFNHwLNbg/f7WT1PJQ01MIP8hg; 24:XjtCtQYjcn8xO+NcGVHprAWcCi1EhMMcYkcnG5xZb1RUttcuDKsY1yyorhJlNUPD8TyRPOXZ3NvkqDZdNN2Am8CypyaizwuObrDTKCnMzik= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB1928; 7:1tYyi4Hvb9ue4e17wbN56nGmUCxMPyamIIML5Shbb2RRCOOgqOluAmbEvuDVYh6SDBo7Q6CQ9I11JvT0+Y5CJUhzwYuTkzny+gLBWiIYORWZE5Lvc13NzYIoRLDqf6Z1P97iPXHb92/p32xhCSlFWL0Az0QFXi4xPT77Zc89a+ziw5gkdIFkTIZDaZA9Jkggmf2qw8JQTcha6Z2mLfGBiU5XKU6pCQoa0BlIjnlaL9fl6tXrxfK7H39JUipUPLRr2LREH+yP3rpHO5aXyActFdEwFCIRFidxkihnBHPa182j4IfM1hiL2oqAQhUHqIPAwmzujjx+niLRYUL/9O/V6lDrU6wuNo1uPRuHTALZXtNDRCew8Ad+cMSp5i3NUqriz981kwwiJnm4xVitGRng7FQbO8uG9h34mqXiSmj9FTBzNkMCO2pXljzdbpq3x+BGoF0D2OkolserGbUuN6Hz4Gq6blUX3yaU7gfTnRs+SDk61WskedEGC8MFFEJDjFu4DB24AeaIS95sF5iE3OZOgvxDxPHHEWX9UjMDaK3gCS3dhS4+cgQOfxhsNyGGrprMprLG/9bDsN8WoNkShbM0HnJ6nDBF+Gcy/BmP+NsrCp40hF9hEnV+mT5OenEC+4/3C7OWWUv9ENbLLloG/YJ+cGT+aPPjLuXUHyItEeGH/MGPnNCXpkaut5BysmoV9YgdTfpxumWjufVMBOl18ot4gVuajJBmaF5KpQGLMrT1AbG58ACy0kYmWmYzaVx3AnPsiKAOaNr8DdlW2NIIyXe+i15au4wN1qQAhENHa9MSb3M= X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2017 23:07:29.2181 (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 This patch implements cfg80211 dump_survey handler enabling per-channel survey data reports. Signed-off-by: Igor Mitsyanko Signed-off-by: Sergey Matyukevich Signed-off-by: Avinash Patil --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 69 +++++++++++++- drivers/net/wireless/quantenna/qtnfmac/commands.c | 107 ++++++++++++++++++++++ drivers/net/wireless/quantenna/qtnfmac/commands.h | 2 + drivers/net/wireless/quantenna/qtnfmac/core.h | 9 ++ drivers/net/wireless/quantenna/qtnfmac/qlink.h | 31 +++++++ 5 files changed, 217 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index e288b1d4432a..23f180b7d43c 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -677,6 +677,72 @@ qtnf_disconnect(struct wiphy *wiphy, struct net_device *dev, return 0; } +static int +qtnf_dump_survey(struct wiphy *wiphy, struct net_device *dev, + int idx, struct survey_info *survey) +{ + struct qtnf_wmac *mac = wiphy_priv(wiphy); + struct ieee80211_supported_band *sband; + struct ieee80211_channel *chan; + struct qtnf_chan_stats stats; + int ret; + + sband = wiphy->bands[NL80211_BAND_2GHZ]; + if (sband && idx >= sband->n_channels) { + idx -= sband->n_channels; + sband = NULL; + } + + if (!sband) + sband = wiphy->bands[NL80211_BAND_5GHZ]; + + if (!sband || idx >= sband->n_channels) + return -ENOENT; + + chan = &sband->channels[idx]; + memset(&stats, 0, sizeof(stats)); + + survey->channel = chan; + survey->filled = 0x0; + + ret = qtnf_cmd_get_chan_stats(mac, chan->hw_value, &stats); + switch (ret) { + case 0: + if (unlikely(stats.chan_num != chan->hw_value)) { + pr_err("received stats for channel %d instead of %d\n", + stats.chan_num, chan->hw_value); + ret = -EINVAL; + break; + } + + survey->filled = SURVEY_INFO_TIME | + SURVEY_INFO_TIME_SCAN | + SURVEY_INFO_TIME_BUSY | + SURVEY_INFO_TIME_RX | + SURVEY_INFO_TIME_TX | + SURVEY_INFO_NOISE_DBM; + + survey->time_scan = stats.cca_try; + survey->time = stats.cca_try; + survey->time_tx = stats.cca_tx; + survey->time_rx = stats.cca_rx; + survey->time_busy = stats.cca_busy; + survey->noise = stats.chan_noise; + break; + case -ENOENT: + pr_debug("no stats for channel %u\n", chan->hw_value); + ret = 0; + break; + default: + pr_debug("failed to get chan(%d) stats from card\n", + chan->hw_value); + ret = -EINVAL; + break; + } + + return ret; +} + static struct cfg80211_ops qtn_cfg80211_ops = { .add_virtual_intf = qtnf_add_virtual_intf, .change_virtual_intf = qtnf_change_virtual_intf, @@ -697,7 +763,8 @@ static struct cfg80211_ops qtn_cfg80211_ops = { .set_default_mgmt_key = qtnf_set_default_mgmt_key, .scan = qtnf_scan, .connect = qtnf_connect, - .disconnect = qtnf_disconnect + .disconnect = qtnf_disconnect, + .dump_survey = qtnf_dump_survey }; 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 f5a294f3c2a4..a1ce12082e10 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -1333,6 +1333,62 @@ static int qtnf_cmd_resp_proc_phy_params(struct qtnf_wmac *mac, return 0; } +static int +qtnf_cmd_resp_proc_chan_stat_info(struct qtnf_chan_stats *stats, + const u8 *payload, size_t payload_len) +{ + struct qlink_chan_stats *qlink_stats; + const struct qlink_tlv_hdr *tlv; + size_t tlv_full_len; + u16 tlv_value_len; + u16 tlv_type; + + tlv = (struct qlink_tlv_hdr *)payload; + while (payload_len >= sizeof(struct qlink_tlv_hdr)) { + tlv_type = le16_to_cpu(tlv->type); + tlv_value_len = le16_to_cpu(tlv->len); + tlv_full_len = tlv_value_len + sizeof(struct qlink_tlv_hdr); + if (tlv_full_len > payload_len) { + pr_warn("malformed TLV 0x%.2X; LEN: %u\n", + tlv_type, tlv_value_len); + return -EINVAL; + } + switch (tlv_type) { + case QTN_TLV_ID_CHANNEL_STATS: + if (unlikely(tlv_value_len != sizeof(*qlink_stats))) { + pr_err("invalid CHANNEL_STATS entry size\n"); + return -EINVAL; + } + + qlink_stats = (void *)tlv->val; + + stats->chan_num = le32_to_cpu(qlink_stats->chan_num); + stats->cca_tx = le32_to_cpu(qlink_stats->cca_tx); + stats->cca_rx = le32_to_cpu(qlink_stats->cca_rx); + stats->cca_busy = le32_to_cpu(qlink_stats->cca_busy); + stats->cca_try = le32_to_cpu(qlink_stats->cca_try); + stats->chan_noise = qlink_stats->chan_noise; + + pr_debug("chan(%u) try(%u) busy(%u) noise(%d)\n", + stats->chan_num, stats->cca_try, + stats->cca_busy, stats->chan_noise); + break; + default: + pr_warn("Unknown TLV type: %#x\n", + le16_to_cpu(tlv->type)); + } + payload_len -= tlv_full_len; + tlv = (struct qlink_tlv_hdr *)(tlv->val + tlv_value_len); + } + + if (payload_len) { + pr_warn("malformed TLV buf; bytes left: %zu\n", payload_len); + return -EINVAL; + } + + return 0; +} + int qtnf_cmd_get_mac_info(struct qtnf_wmac *mac) { struct sk_buff *cmd_skb, *resp_skb = NULL; @@ -2176,3 +2232,54 @@ int qtnf_cmd_reg_notify(struct qtnf_bus *bus, struct regulatory_request *req) return ret; } + +int qtnf_cmd_get_chan_stats(struct qtnf_wmac *mac, u16 channel, + struct qtnf_chan_stats *stats) +{ + struct sk_buff *cmd_skb, *resp_skb = NULL; + struct qlink_cmd_get_chan_stats *cmd; + struct qlink_resp_get_chan_stats *resp; + size_t var_data_len; + u16 res_code = QLINK_CMD_RESULT_OK; + int ret = 0; + + cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, QLINK_VIFID_RSVD, + QLINK_CMD_CHAN_STATS, + sizeof(*cmd)); + if (!cmd_skb) + return -ENOMEM; + + qtnf_bus_lock(mac->bus); + + cmd = (struct qlink_cmd_get_chan_stats *)cmd_skb->data; + cmd->channel = cpu_to_le16(channel); + + ret = qtnf_cmd_send_with_reply(mac->bus, cmd_skb, &resp_skb, &res_code, + sizeof(*resp), &var_data_len); + if (unlikely(ret)) { + qtnf_bus_unlock(mac->bus); + return ret; + } + + if (unlikely(res_code != QLINK_CMD_RESULT_OK)) { + switch (res_code) { + case QLINK_CMD_RESULT_ENOTFOUND: + ret = -ENOENT; + break; + default: + pr_err("cmd exec failed: 0x%.4X\n", res_code); + ret = -EFAULT; + break; + } + goto out; + } + + resp = (struct qlink_resp_get_chan_stats *)resp_skb->data; + ret = qtnf_cmd_resp_proc_chan_stat_info(stats, resp->info, + var_data_len); + +out: + qtnf_bus_unlock(mac->bus); + consume_skb(resp_skb); + return ret; +} diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.h b/drivers/net/wireless/quantenna/qtnfmac/commands.h index 155b265d42bf..41e2d50988b7 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.h +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.h @@ -71,5 +71,7 @@ int qtnf_cmd_send_disconnect(struct qtnf_vif *vif, int qtnf_cmd_send_updown_intf(struct qtnf_vif *vif, bool up); int qtnf_cmd_reg_notify(struct qtnf_bus *bus, struct regulatory_request *req); +int qtnf_cmd_get_chan_stats(struct qtnf_wmac *mac, u16 channel, + struct qtnf_chan_stats *stats); #endif /* QLINK_COMMANDS_H_ */ diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.h b/drivers/net/wireless/quantenna/qtnfmac/core.h index 31b7ec2bfd3e..b2d050c4f1e2 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.h +++ b/drivers/net/wireless/quantenna/qtnfmac/core.h @@ -124,6 +124,15 @@ struct qtnf_mac_info { size_t n_limits; }; +struct qtnf_chan_stats { + u32 chan_num; + u32 cca_tx; + u32 cca_rx; + u32 cca_busy; + u32 cca_try; + s8 chan_noise; +}; + struct qtnf_wmac { u8 macid; u8 wiphy_registered; diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index e27833b78940..dd01c0b4f632 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -164,6 +164,7 @@ enum qlink_cmd_type { QLINK_CMD_CHANGE_STA = 0x0051, QLINK_CMD_DEL_STA = 0x0052, QLINK_CMD_SCAN = 0x0053, + QLINK_CMD_CHAN_STATS = 0x0054, QLINK_CMD_CONNECT = 0x0060, QLINK_CMD_DISCONNECT = 0x0061, }; @@ -434,6 +435,16 @@ struct qlink_cmd_chans_info_get { } __packed; /** + * struct qlink_cmd_get_chan_stats - data for QLINK_CMD_CHAN_STATS command + * + * @channel: channel number according to 802.11 17.3.8.3.2 and Annex J + */ +struct qlink_cmd_get_chan_stats { + struct qlink_cmd chdr; + __le16 channel; +} __packed; + +/** * enum qlink_reg_initiator - Indicates the initiator of a reg domain request * * See &enum nl80211_reg_initiator for more info. @@ -635,6 +646,16 @@ struct qlink_resp_phy_params { u8 info[0]; } __packed; +/** + * struct qlink_resp_get_chan_stats - response for QLINK_CMD_CHAN_STATS cmd + * + * @info: variable-length channel info. + */ +struct qlink_resp_get_chan_stats { + struct qlink_cmd rhdr; + u8 info[0]; +} __packed; + /* QLINK Events messages related definitions */ @@ -807,6 +828,7 @@ enum qlink_tlv_id { QTN_TLV_ID_COVERAGE_CLASS = 0x0213, QTN_TLV_ID_IFACE_LIMIT = 0x0214, QTN_TLV_ID_NUM_IFACE_COMB = 0x0215, + QTN_TLV_ID_CHANNEL_STATS = 0x0216, QTN_TLV_ID_STA_BASIC_COUNTERS = 0x0300, QTN_TLV_ID_STA_GENERIC_INFO = 0x0301, QTN_TLV_ID_KEY = 0x0302, @@ -1008,4 +1030,13 @@ struct qlink_auth_encr { u8 control_port_no_encrypt; } __packed; +struct qlink_chan_stats { + __le32 chan_num; + __le32 cca_tx; + __le32 cca_rx; + __le32 cca_busy; + __le32 cca_try; + s8 chan_noise; +} __packed; + #endif /* _QTN_QLINK_H_ */