All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: greearb@candelatech.com
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 05/11] mt76: mt7915: ethtool group-5 rx stats information
Date: Tue, 4 Jan 2022 11:58:10 +0100	[thread overview]
Message-ID: <YdQoQqyzWHfqc9is@localhost.localdomain> (raw)
In-Reply-To: <20211118164056.2965-5-greearb@candelatech.com>

[-- Attachment #1: Type: text/plain, Size: 2591 bytes --]

> From: Ben Greear <greearb@candelatech.com>
> 

[...]
>  
>  		msta = container_of(status->wcid, struct mt7915_sta, wcid);
> +		stats = &msta->stats;
>  		spin_lock_bh(&dev->sta_poll_lock);
>  		if (list_empty(&msta->poll_list))
>  			list_add_tail(&msta->poll_list, &dev->sta_poll_list);
> @@ -654,8 +656,19 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
>  				WARN_ON_ONCE(nss > 4);
>  			}
>  
> +			if (stats) {
> +				if (nss > 3)
> +					stats->rx_nss[3]++;
> +				else
> +					stats->rx_nss[nss - 1]++;
> +
> +				stats->rx_mode[mode]++;
> +			}
> +
>  			switch (FIELD_GET(MT_CRXV_FRAME_MODE, v2)) {
>  			case IEEE80211_STA_RX_BW_20:
> +				if (stats)
> +					stats->rx_bw_20++;
>  				break;
>  			case IEEE80211_STA_RX_BW_40:
>  				if (mode & MT_PHY_TYPE_HE_EXT_SU &&
> @@ -663,14 +676,24 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)

after mt7916 support, I guess this patch must be rebased

Regards,
Lorenzo

>  					status->bw = RATE_INFO_BW_HE_RU;
>  					status->he_ru =
>  						NL80211_RATE_INFO_HE_RU_ALLOC_106;
> +					if (stats) {
> +						stats->rx_bw_he_ru++;
> +						stats->rx_ru_106++;
> +					}
>  				} else {
>  					status->bw = RATE_INFO_BW_40;
> +					if (stats)
> +						stats->rx_bw_40++;
>  				}
>  				break;
>  			case IEEE80211_STA_RX_BW_80:
>  				status->bw = RATE_INFO_BW_80;
> +				if (stats)
> +					stats->rx_bw_80++;
>  				break;
>  			case IEEE80211_STA_RX_BW_160:
> +				if (stats)
> +					stats->rx_bw_160++;
>  				status->bw = RATE_INFO_BW_160;
>  				break;
>  			default:
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
> index e973b2527b34..bfc81e008f86 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
> @@ -1170,6 +1170,27 @@ static const char mt7915_gstrings_stats[][ETH_GSTRING_LEN] = {
>  	"v_tx_mcs_9",
>  	"v_tx_mcs_10",
>  	"v_tx_mcs_11",
> +
> +	/* per-vif rx counters */
> +	"v_rx_nss1",
> +	"v_rx_nss2",
> +	"v_rx_nss3",
> +	"v_rx_nss4",
> +	"v_rx_mode_cck",
> +	"v_rx_mode_ofdm",
> +	"v_rx_mode_ht",
> +	"v_rx_mode_ht_gf",
> +	"v_rx_mode_vht",
> +	"v_rx_mode_he_su",
> +	"v_rx_mode_he_ext_su",
> +	"v_rx_mode_he_tb",
> +	"v_rx_mode_he_mu",
> +	"v_rx_bw_20",
> +	"v_rx_bw_40",
> +	"v_rx_bw_80",
> +	"v_rx_bw_160",
> +	"v_rx_bw_he_ru",
> +	"v_rx_ru_106",
>  };
>  
>  #define MT7915_SSTATS_LEN ARRAY_SIZE(mt7915_gstrings_stats)
> -- 
> 2.20.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2022-01-04 10:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18 16:40 [PATCH 01/11] mt76: mt7915: add comments about rx descriptor parsing greearb
2021-11-18 16:40 ` [PATCH 02/11] mt76: mt7915: print out hw revision greearb
2021-11-18 16:59   ` Ryder Lee
2021-11-18 16:40 ` [PATCH 03/11] mt76: mt7915: support enabling rx group-5 status greearb
2022-01-04 10:39   ` Lorenzo Bianconi
2021-11-18 16:40 ` [PATCH 04/11] mt76: mt7915: use nss for calculating rx-chains greearb
2021-12-03  9:16   ` Felix Fietkau
2021-12-03 15:33     ` Ben Greear
2021-11-18 16:40 ` [PATCH 05/11] mt76: mt7915: ethtool group-5 rx stats information greearb
2022-01-04 10:58   ` Lorenzo Bianconi [this message]
2021-11-18 16:40 ` [PATCH 06/11] mt76: mt7915: ethtool counters for driver rx path greearb
2021-11-18 16:40 ` [PATCH 07/11] mt76: mt7915: fix rate rix and flags in txs path greearb
2022-01-04 11:15   ` Lorenzo Bianconi
2021-11-18 16:40 ` [PATCH 08/11] mt76: mt7915: add ethtool tx/rx pkts/bytes greearb
2021-11-18 16:40 ` [PATCH 09/11] mt76: mt7915: add rx-ppdu-size-out-of-range ethtool counter greearb
2021-11-18 16:40 ` [PATCH 10/11] mt76: mt7915: ethtool and mib rx stats greearb
2021-11-18 16:40 ` [PATCH 11/11] mt76: mt7915: poll mib counters every 200ms greearb
2021-11-18 17:01   ` Ryder Lee
2021-11-19 16:33 ` [PATCH 01/11] mt76: mt7915: add comments about rx descriptor parsing Lorenzo Bianconi
2021-11-19 16:41   ` Ben Greear

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YdQoQqyzWHfqc9is@localhost.localdomain \
    --to=lorenzo@kernel.org \
    --cc=greearb@candelatech.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.