From patchwork Wed Jul 17 13:27:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sathishkumar Muruganandam X-Patchwork-Id: 11047827 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-2.web.codeaurora.org (Postfix) with ESMTP id 5870B138D for ; Wed, 17 Jul 2019 13:27:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45EB61FF7F for ; Wed, 17 Jul 2019 13:27:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39B2128389; Wed, 17 Jul 2019 13:27:21 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 314431FF7F for ; Wed, 17 Jul 2019 13:27:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=lHoZkN2pWoaE4MA8s60DksPQrhD0EoQbb2PhaxO7NW8=; b=SWu 2RN1R/worJG/J85PKzYJuncG68tjckHl8r0S98Ai4G5isyQcE5sEvgNWlMIJhV++USglE4Xvm9DmT 3mUjc/6rCgVs74F7wYuZ3NgQ7u1dEGcIwVvOIQf+nSMXh1gfiJgPOvmCwunyrJb9TZu8Kev0leFC2 YYEC+W9YCHfsT7D0rcBdm1RqzeqWzF+khYfJeR1tsJS+dUSG9e2goJuA55HQgHvht11QR0Kty5dvY zLfKnuz6mFZeIIFYMMGuvq8O5yrlTsR95pRnLX8JrzpCSlSt9m2vwYiewxhX1lQrb0NGPkU5IFq4W Sl2emJpaVQmDpdkpGNFUrgPGFU9Y1FQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hnjxn-0007qI-4E; Wed, 17 Jul 2019 13:27:19 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hnjxk-0007pi-2a for ath11k@lists.infradead.org; Wed, 17 Jul 2019 13:27:18 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6B27E60F3C; Wed, 17 Jul 2019 13:27:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1563370035; bh=TO/NDSbx8UEdtEaZORBCmsAUZvF/10nieECy0W4Njp8=; h=From:To:Cc:Subject:Date:From; b=JJ4/kpz/9juUvozpKPmUWhmk933KRaLK894/0uaShKtw3kdYDejcFKMZ+X4cUxKcy If8I7/S+xOMJvaRni5G7P3R0a4lfn24wWCS7KSdAp5Ve52/k2hJVeZ4MuAKIXcaHWk KQB56ROzp7moRIeO+NzXvgOB2AV/FJkwQlTCla6Q= Received: from murugana-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: murugana@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 72C216119C; Wed, 17 Jul 2019 13:27:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1563370033; bh=TO/NDSbx8UEdtEaZORBCmsAUZvF/10nieECy0W4Njp8=; h=From:To:Cc:Subject:Date:From; b=FGBUMH1YRKH8cZDI0eYmZZkkG7SVg8/aca6yStv+9K9ah3Txo/1/SjZTtHwyx8iwk DXqDbUhAnAoboa3F9AlOyS61yrCHAh9osgk+I6aq84iEyIuKjQ9UvfRHdwFnZ9YmxQ J0zhIVV6GFq+EpWL4UiMKGvSmG3fnRdXf8RIipbo= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 72C216119C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=murugana@codeaurora.org From: Sathishkumar Muruganandam To: ath11k@lists.infradead.org Subject: [PATCH v2] ath11k: remove deprecated WMI PEER stats Date: Wed, 17 Jul 2019 18:57:02 +0530 Message-Id: <1563370022-6920-1-git-send-email-murugana@codeaurora.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190717_062716_155232_6CA90CA4 X-CRM114-Status: GOOD ( 15.11 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sathishkumar Muruganandam MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Removing WMI PEER stats which has been deprecated in FW and rx_duration of a peer is now fetched from HTT PPDU_END stats. Signed-off-by: Sathishkumar Muruganandam --- v2: rebased to latest sha id drivers/net/wireless/ath/ath11k/core.h | 23 ---- drivers/net/wireless/ath/ath11k/debug.c | 142 +-------------------- drivers/net/wireless/ath/ath11k/debug.h | 7 -- drivers/net/wireless/ath/ath11k/debugfs_sta.c | 19 --- drivers/net/wireless/ath/ath11k/wmi.c | 170 +------------------------- drivers/net/wireless/ath/ath11k/wmi.h | 18 --- 6 files changed, 3 insertions(+), 376 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h index 7af9318b97c4..46e4c083634b 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -362,8 +362,6 @@ struct ath11k_fw_stats { struct list_head pdevs; struct list_head vdevs; struct list_head bcn; - struct list_head peers; - struct list_head peers_extd; }; struct ath11k_dbg_htt_stats { @@ -772,27 +770,6 @@ struct ath11k_fw_stats_bcn { u32 tx_bcn_outage_cnt; }; -struct ath11k_fw_stats_peer { - struct list_head list; - - u8 peer_macaddr[ETH_ALEN]; - u32 peer_rssi; - u32 peer_tx_rate; - u32 peer_rx_rate; -}; - -struct ath11k_fw_stats_peer_extd { - struct list_head list; - - u8 peer_macaddr[ETH_ALEN]; - u32 rx_duration; - u32 peer_tx_bytes; - u32 peer_rx_bytes; - u32 last_tx_rate_code; - s32 last_tx_power; - u32 rx_mc_bc_cnt; -}; - void ath11k_peer_unmap_event(struct ath11k_base *ab, u16 peer_id); void ath11k_peer_map_event(struct ath11k_base *ab, u8 vdev_id, u16 peer_id, u8 *mac_addr, u16 ast_hash); diff --git a/drivers/net/wireless/ath/ath11k/debug.c b/drivers/net/wireless/ath/ath11k/debug.c index f21f33fdc301..4fd99417585c 100644 --- a/drivers/net/wireless/ath/ath11k/debug.c +++ b/drivers/net/wireless/ath/ath11k/debug.c @@ -135,34 +135,12 @@ static void ath11k_fw_stats_bcn_free(struct list_head *head) } } -static void ath11k_fw_stats_peers_free(struct list_head *head) -{ - struct ath11k_fw_stats_peer *i, *tmp; - - list_for_each_entry_safe(i, tmp, head, list) { - list_del(&i->list); - kfree(i); - } -} - -static void ath11k_fw_stats_peers_extd_free(struct list_head *head) -{ - struct ath11k_fw_stats_peer_extd *i, *tmp; - - list_for_each_entry_safe(i, tmp, head, list) { - list_del(&i->list); - kfree(i); - } -} - static void ath11k_debug_fw_stats_reset(struct ath11k *ar) { spin_lock_bh(&ar->data_lock); ar->debug.fw_stats_done = false; ath11k_fw_stats_pdevs_free(&ar->debug.fw_stats.pdevs); ath11k_fw_stats_vdevs_free(&ar->debug.fw_stats.vdevs); - ath11k_fw_stats_peers_free(&ar->debug.fw_stats.peers); - ath11k_fw_stats_peers_extd_free(&ar->debug.fw_stats.peers_extd); spin_unlock_bh(&ar->data_lock); } @@ -171,18 +149,14 @@ void ath11k_debug_fw_stats_process(struct ath11k_base *ab, struct sk_buff *skb) struct ath11k_fw_stats stats = {}; struct ath11k *ar; struct ath11k_pdev *pdev; - struct ath11k_peer *peer; bool is_end; - static unsigned int num_vdev, num_bcn, num_peer; + static unsigned int num_vdev, num_bcn; size_t total_vdevs_started = 0; - size_t num_peer_stats = 0; - int i, ret, total_num_peers = 0; + int i, ret; INIT_LIST_HEAD(&stats.pdevs); INIT_LIST_HEAD(&stats.vdevs); - INIT_LIST_HEAD(&stats.peers); INIT_LIST_HEAD(&stats.bcn); - INIT_LIST_HEAD(&stats.peers_extd); ret = ath11k_wmi_pull_fw_stats(ab, skb, &stats); if (ret) { @@ -250,40 +224,6 @@ void ath11k_debug_fw_stats_process(struct ath11k_base *ab, struct sk_buff *skb) ar->debug.fw_stats_done = true; num_bcn = 0; } - goto complete; - } - - if (stats.stats_id & (WMI_REQUEST_PEER_STAT | - WMI_REQUEST_PEER_EXTD_STAT)) { - if (list_empty(&stats.peers) && list_empty(&stats.peers_extd)) { - ath11k_warn(ab, "empty peer, peer extd stats"); - goto complete; - } - /* FW splits the peer stats when exceeding htc-wmi buffer limit - * and send back-to-back 'update stats' event. Hence we save the - * peer stats based on the count until reaching total peers count - */ - num_peer_stats = ath11k_wmi_fw_stats_num_peers(&stats.peers); - - spin_lock_bh(&ab->base_lock); - list_for_each_entry(peer, &ab->peers, list) - total_num_peers++; - spin_unlock_bh(&ab->base_lock); - - for (i = 0; i < num_peer_stats; i++) { - num_peer++; - list_splice_tail_init(&stats.peers, - &ar->debug.fw_stats.peers); - - list_splice_tail_init(&stats.peers_extd, - &ar->debug.fw_stats.peers_extd); - ath11k_sta_update_rx_duration(ar, &stats); - } - - if (num_peer >= total_num_peers) { - ar->debug.fw_stats_done = true; - num_peer = 0; - } } complete: complete(&ar->debug.fw_stats_complete); @@ -294,8 +234,6 @@ void ath11k_debug_fw_stats_process(struct ath11k_base *ab, struct sk_buff *skb) ath11k_fw_stats_pdevs_free(&stats.pdevs); ath11k_fw_stats_vdevs_free(&stats.vdevs); ath11k_fw_stats_bcn_free(&stats.bcn); - ath11k_fw_stats_peers_free(&stats.peers); - ath11k_fw_stats_peers_extd_free(&stats.peers_extd); } static int ath11k_debug_fw_stats_request(struct ath11k *ar, @@ -575,78 +513,6 @@ static const struct file_operations fops_bcn_stats = { .llseek = default_llseek, }; -static int ath11k_open_peer_stats(struct inode *inode, struct file *file) -{ - struct ath11k *ar = inode->i_private; - struct stats_request_params req_param; - void *buf = NULL; - int ret; - - mutex_lock(&ar->conf_mutex); - - if (ar->state != ATH11K_STATE_ON) { - ret = -ENETDOWN; - goto err_unlock; - } - - buf = vmalloc(ATH11K_FW_STATS_BUF_SIZE); - if (!buf) { - ret = -ENOMEM; - goto err_unlock; - } - - req_param.pdev_id = ar->pdev->pdev_id; - req_param.vdev_id = 0; - req_param.stats_id = (WMI_REQUEST_PEER_STAT | - WMI_REQUEST_PEER_EXTD_STAT); - - ret = ath11k_debug_fw_stats_request(ar, &req_param); - if (ret) { - ath11k_warn(ar->ab, "failed to request fw vdev stats: %d\n", ret); - goto err_free; - } - - ath11k_wmi_fw_stats_fill(ar, &ar->debug.fw_stats, req_param.stats_id, - buf); - - file->private_data = buf; - - mutex_unlock(&ar->conf_mutex); - return 0; - -err_free: - vfree(buf); - -err_unlock: - mutex_unlock(&ar->conf_mutex); - return ret; -} - -static int ath11k_release_peer_stats(struct inode *inode, struct file *file) -{ - vfree(file->private_data); - - return 0; -} - -static ssize_t ath11k_read_peer_stats(struct file *file, - char __user *user_buf, - size_t count, loff_t *ppos) -{ - const char *buf = file->private_data; - size_t len = strlen(buf); - - return simple_read_from_buffer(user_buf, count, ppos, buf, len); -} - -static const struct file_operations fops_peer_stats = { - .open = ath11k_open_peer_stats, - .release = ath11k_release_peer_stats, - .read = ath11k_read_peer_stats, - .owner = THIS_MODULE, - .llseek = default_llseek, -}; - static ssize_t ath11k_read_simulate_fw_crash(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) @@ -977,14 +843,10 @@ void ath11k_debug_fw_stats_init(struct ath11k *ar) &fops_vdev_stats); debugfs_create_file("beacon_stats", 0600, fwstats_dir, ar, &fops_bcn_stats); - debugfs_create_file("peer_stats", 0600, fwstats_dir, ar, - &fops_peer_stats); INIT_LIST_HEAD(&ar->debug.fw_stats.pdevs); INIT_LIST_HEAD(&ar->debug.fw_stats.vdevs); INIT_LIST_HEAD(&ar->debug.fw_stats.bcn); - INIT_LIST_HEAD(&ar->debug.fw_stats.peers); - INIT_LIST_HEAD(&ar->debug.fw_stats.peers_extd); init_completion(&ar->debug.fw_stats_complete); } diff --git a/drivers/net/wireless/ath/ath11k/debug.h b/drivers/net/wireless/ath/ath11k/debug.h index 1a5e4ab43940..ce1f414a95e9 100644 --- a/drivers/net/wireless/ath/ath11k/debug.h +++ b/drivers/net/wireless/ath/ath11k/debug.h @@ -241,8 +241,6 @@ ath11k_accumulate_per_peer_tx_stats(struct ath11k_sta *arsta, void ath11k_update_per_peer_stats_from_txcompl(struct ath11k *ar, struct sk_buff *msdu, struct hal_tx_status *ts); -void ath11k_sta_update_rx_duration(struct ath11k *ar, - struct ath11k_fw_stats *stats); #else /* !CONFIG_MAC80211_DEBUGFS */ static inline void ath11k_accumulate_per_peer_tx_stats(struct ath11k_sta *arsta, @@ -258,11 +256,6 @@ ath11k_update_per_peer_stats_from_txcompl(struct ath11k *ar, { } -static inline void ath11k_sta_update_rx_duration(struct ath11k *ar, - struct ath11k_fw_stats *stats) -{ -} - #endif /* CONFIG_MAC80211_DEBUGFS*/ #define ath11k_dbg(ar, dbg_mask, fmt, ...) \ diff --git a/drivers/net/wireless/ath/ath11k/debugfs_sta.c b/drivers/net/wireless/ath/ath11k/debugfs_sta.c index ce595bda8c1c..83d65ea96c67 100644 --- a/drivers/net/wireless/ath/ath11k/debugfs_sta.c +++ b/drivers/net/wireless/ath/ath11k/debugfs_sta.c @@ -9,25 +9,6 @@ #include "peer.h" #include "debug.h" -void ath11k_sta_update_rx_duration(struct ath11k *ar, - struct ath11k_fw_stats *stats) -{ - struct ath11k_fw_stats_peer_extd *peer; - struct ieee80211_sta *sta; - struct ath11k_sta *arsta; - - rcu_read_lock(); - list_for_each_entry(peer, &stats->peers_extd, list) { - sta = ieee80211_find_sta_by_ifaddr(ar->hw, peer->peer_macaddr, - NULL); - if (!sta) - continue; - arsta = (struct ath11k_sta *)sta->drv_priv; - arsta->rx_duration += (u64)peer->rx_duration; - } - rcu_read_unlock(); -} - void ath11k_accumulate_per_peer_tx_stats(struct ath11k_sta *arsta, struct ath11k_per_peer_tx_stats *peer_stats, diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index cba9f3a9ebfd..1e5ec50115eb 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -3891,29 +3891,6 @@ ath11k_wmi_pull_bcn_stats(const struct wmi_bcn_stats *src, dst->tx_bcn_outage_cnt = src->tx_bcn_outage_cnt; } -static void -ath11k_wmi_pull_peer_stats(const struct wmi_peer_stats *src, - struct ath11k_fw_stats_peer *dst) -{ - ether_addr_copy(dst->peer_macaddr, src->peer_macaddr.addr); - dst->peer_rssi = src->peer_rssi; - dst->peer_tx_rate = src->peer_tx_rate; - dst->peer_rx_rate = src->peer_rx_rate; -} - -static void -ath11k_wmi_pull_peer_extd_stats(const struct wmi_peer_extd_stats *src, - struct ath11k_fw_stats_peer_extd *dst) -{ - ether_addr_copy(dst->peer_macaddr, src->peer_macaddr.addr); - dst->rx_duration = src->rx_duration; - dst->peer_tx_bytes = src->peer_tx_bytes; - dst->peer_rx_bytes = src->peer_rx_bytes; - dst->last_tx_rate_code = src->last_tx_rate_code; - dst->last_tx_power = src->last_tx_power; - dst->rx_mc_bc_cnt = src->rx_mc_bc_cnt; -} - int ath11k_wmi_pull_fw_stats(struct ath11k_base *ab, struct sk_buff *skb, struct ath11k_fw_stats *stats) { @@ -3939,10 +3916,9 @@ int ath11k_wmi_pull_fw_stats(struct ath11k_base *ab, struct sk_buff *skb, } ath11k_dbg(ab, ATH11K_DBG_WMI, - "wmi stats update ev pdev_id %d pdev %i vdev %i peer %i peer_extd %i bcn %i\n", + "wmi stats update ev pdev_id %d pdev %i vdev %i bcn %i\n", ev->pdev_id, ev->num_pdev_stats, ev->num_vdev_stats, - ev->num_peer_stats, ev->num_peer_extd_stats, ev->num_bcn_stats); stats->pdev_id = ev->pdev_id; @@ -4019,79 +3995,10 @@ int ath11k_wmi_pull_fw_stats(struct ath11k_base *ab, struct sk_buff *skb, list_add_tail(&dst->list, &stats->bcn); } - for (i = 0; i < ev->num_peer_stats; i++) { - const struct wmi_peer_stats *src; - struct ath11k_fw_stats_peer *dst; - - src = data; - if (len < sizeof(*src)) { - kfree(tb); - return -EPROTO; - } - - stats->stats_id = WMI_REQUEST_PEER_STAT; - - data += sizeof(*src); - len -= sizeof(*src); - - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); - if (!dst) - continue; - - ath11k_wmi_pull_peer_stats(src, dst); - list_add_tail(&dst->list, &stats->peers); - } - - for (i = 0; i < ev->num_peer_extd_stats; i++) { - const struct wmi_peer_extd_stats *src; - struct ath11k_fw_stats_peer_extd *dst; - - src = data; - if (len < sizeof(*src)) { - kfree(tb); - return -EPROTO; - } - - /* PEER_STAT and PEER_EXTD_STAT come together */ - stats->stats_id |= WMI_REQUEST_PEER_EXTD_STAT; - - data += sizeof(*src); - len -= sizeof(*src); - - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); - if (!dst) - continue; - - ath11k_wmi_pull_peer_extd_stats(src, dst); - list_add_tail(&dst->list, &stats->peers_extd); - } - kfree(tb); return 0; } -size_t ath11k_wmi_fw_stats_num_peers(struct list_head *head) -{ - struct ath11k_fw_stats_peer *i; - size_t num = 0; - - list_for_each_entry(i, head, list) - ++num; - - return num; -} - -size_t ath11k_wmi_fw_stats_num_peers_extd(struct list_head *head) -{ - struct ath11k_fw_stats_peer_extd *i; - size_t num = 0; - - list_for_each_entry(i, head, list) - ++num; - - return num; -} - size_t ath11k_wmi_fw_stats_num_vdevs(struct list_head *head) { struct ath11k_fw_stats_vdev *i; @@ -4328,52 +4235,6 @@ ath11k_wmi_fw_vdev_stats_fill(struct ath11k *ar, } static void -ath11k_wmi_fw_peer_stats_fill(const struct ath11k_fw_stats_peer *peer, - char *buf, u32 *length) -{ - u32 len = *length; - u32 buf_len = ATH11K_FW_STATS_BUF_SIZE; - - len += scnprintf(buf + len, buf_len - len, "%30s %pM\n", - "Peer MAC address", peer->peer_macaddr); - len += scnprintf(buf + len, buf_len - len, "%30s %u\n", - "Peer RSSI", peer->peer_rssi); - len += scnprintf(buf + len, buf_len - len, "%30s %u\n", - "Peer TX rate", peer->peer_tx_rate); - len += scnprintf(buf + len, buf_len - len, "%30s %u\n", - "Peer RX rate", peer->peer_rx_rate); - - len += scnprintf(buf + len, buf_len - len, "\n"); - *length = len; -} - -static void -ath11k_wmi_fw_peer_extd_stats_fill(const struct ath11k_fw_stats_peer_extd *peer, - char *buf, u32 *length) -{ - u32 len = *length; - u32 buf_len = ATH11K_FW_STATS_BUF_SIZE; - - len += scnprintf(buf + len, buf_len - len, "%30s %pM\n", - "Peer MAC address", peer->peer_macaddr); - len += scnprintf(buf + len, buf_len - len, "%30s %u\n", - "Peer RX duration", peer->rx_duration); - len += scnprintf(buf + len, buf_len - len, "%30s %u\n", - "Peer TX bytes", peer->peer_tx_bytes); - len += scnprintf(buf + len, buf_len - len, "%30s %u\n", - "Peer RX bytes", peer->peer_rx_bytes); - len += scnprintf(buf + len, buf_len - len, "%30s %u\n", - "Peer last Tx rate code", peer->last_tx_rate_code); - len += scnprintf(buf + len, buf_len - len, "%30s %d\n", - "Peer last Tx power", peer->last_tx_power); - len += scnprintf(buf + len, buf_len - len, "%30s %u\n", - "Rx bcast/mcast data frames", peer->rx_mc_bc_cnt); - - len += scnprintf(buf + len, buf_len - len, "\n"); - *length = len; -} - -static void ath11k_wmi_fw_bcn_stats_fill(struct ath11k *ar, const struct ath11k_fw_stats_bcn *bcn, char *buf, u32 *length) @@ -4414,11 +4275,7 @@ void ath11k_wmi_fw_stats_fill(struct ath11k *ar, u32 buf_len = ATH11K_FW_STATS_BUF_SIZE; const struct ath11k_fw_stats_pdev *pdev; const struct ath11k_fw_stats_vdev *vdev; - const struct ath11k_fw_stats_peer *peer; - const struct ath11k_fw_stats_peer_extd *peer_extd; const struct ath11k_fw_stats_bcn *bcn; - size_t num_peers; - size_t num_peers_extd; size_t num_bcn; spin_lock_bh(&ar->data_lock); @@ -4460,31 +4317,6 @@ void ath11k_wmi_fw_stats_fill(struct ath11k *ar, ath11k_wmi_fw_bcn_stats_fill(ar, bcn, buf, &len); } - if (stats_id & WMI_REQUEST_PEER_STAT) { - num_peers = ath11k_wmi_fw_stats_num_peers(&fw_stats->peers); - len += scnprintf(buf + len, buf_len - len, "\n"); - len += scnprintf(buf + len, buf_len - len, "%30s (%zu)\n", - "ath11k PEER stats", num_peers); - len += scnprintf(buf + len, buf_len - len, "%30s\n\n", - "================="); - - list_for_each_entry(peer, &fw_stats->peers, list) - ath11k_wmi_fw_peer_stats_fill(peer, buf, &len); - } - - if (stats_id & WMI_REQUEST_PEER_EXTD_STAT) { - num_peers_extd = - ath11k_wmi_fw_stats_num_peers_extd(&fw_stats->peers_extd); - len += scnprintf(buf + len, buf_len - len, "\n"); - len += scnprintf(buf + len, buf_len - len, "%30s (%zu)\n", - "ath11k PEER extd stats", num_peers_extd); - len += scnprintf(buf + len, buf_len - len, "%30s\n\n", - "======================"); - - list_for_each_entry(peer_extd, &fw_stats->peers_extd, list) - ath11k_wmi_fw_peer_extd_stats_fill(peer_extd, buf, &len); - } - unlock: spin_unlock_bh(&ar->data_lock); diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h index 7d933eafd3cd..3bb6803b84c0 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.h +++ b/drivers/net/wireless/ath/ath11k/wmi.h @@ -4025,24 +4025,6 @@ struct wmi_bcn_stats { u32 tx_bcn_outage_cnt; } __packed; -struct wmi_peer_stats { - struct wmi_mac_addr peer_macaddr; - u32 peer_rssi; - u32 peer_tx_rate; - u32 peer_rx_rate; -} __packed; - -struct wmi_peer_extd_stats { - struct wmi_mac_addr peer_macaddr; - u32 rx_duration; - u32 peer_tx_bytes; - u32 peer_rx_bytes; - u32 last_tx_rate_code; - s32 last_tx_power; - u32 rx_mc_bc_cnt; - u32 reserved[3]; -} __packed; - struct wmi_stats_event { u32 stats_id; u32 num_pdev_stats;