mirror of https://lore.kernel.org/ath12k/
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Sarika Sharma <quic_sarishar@quicinc.com>, ath12k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net
Subject: Re: [PATCH v2 1/5] wifi: mac80211: correct RX stats packet increment for multi-link
Date: Thu, 13 Feb 2025 12:17:37 -0800	[thread overview]
Message-ID: <26f57f33-459d-4563-b0a5-2c5c287e1d55@candelatech.com> (raw)
In-Reply-To: <20250213173206.1665731-2-quic_sarishar@quicinc.com>

On 2/13/25 9:32 AM, Sarika Sharma wrote:
> Currently, RX stats packets are incremented for deflink member for
> non-ML and multi-link(ML) station case. However, for ML station,
> packets should be incremented based on the specific link.
> 
> Therefore, if a valid link_id is present, fetch the corresponding
> link station information and increment the RX packets for that link.
> For non-MLO stations, the deflink will still be used.
> 
> Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com>
> ---
>   net/mac80211/rx.c | 15 +++++++++++++--
>   1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 1e28efe4203c..eb3e2d550c8f 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -231,8 +231,19 @@ static void __ieee80211_queue_skb_to_iface(struct ieee80211_sub_if_data *sdata,
>   
>   	skb_queue_tail(&sdata->skb_queue, skb);
>   	wiphy_work_queue(sdata->local->hw.wiphy, &sdata->work);
> -	if (sta)
> -		sta->deflink.rx_stats.packets++;
> +	if (sta) {
> +		struct link_sta_info *link_sta_info;
> +
> +		if (link_id >= 0) {
> +			link_sta_info = rcu_dereference(sta->link[link_id]);
> +			if (!link_sta_info)
> +				return;

I think if you cannot find the link_sta_info here, you should just use deflink
so the packet is still counted?

Thanks,
Ben

> +		} else {
> +			link_sta_info = &sta->deflink;
> +		}
> +
> +		link_sta_info->rx_stats.packets++;
> +	}
>   }
>   
>   static void ieee80211_queue_skb_to_iface(struct ieee80211_sub_if_data *sdata,


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


  reply	other threads:[~2025-02-13 21:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 17:32 [PATCH v2 0/5] wifi: mac80211/ath12k: add support to fill link statistics of multi-link station Sarika Sharma
2025-02-13 17:32 ` [PATCH v2 1/5] wifi: mac80211: correct RX stats packet increment for multi-link Sarika Sharma
2025-02-13 20:17   ` Ben Greear [this message]
2025-02-17  3:52     ` Sarika Sharma
2025-02-13 17:32 ` [PATCH v2 2/5] wifi: ath12k: add link support for multi-link in arsta Sarika Sharma
2025-02-13 17:32 ` [PATCH v2 3/5] wifi: ath12k: add EHT support for TX rate Sarika Sharma
2025-02-22 14:23   ` kernel test robot
2025-02-23  2:27   ` kernel test robot
2025-02-13 17:32 ` [PATCH v2 4/5] wifi: ath12k: correctly update bw for ofdma packets Sarika Sharma
2025-02-13 17:32 ` [PATCH v2 5/5] wifi: ath12k: fetch tx_retry and tx_failed from htt_ppdu_stats_user_cmpltn_common_tlv Sarika Sharma

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=26f57f33-459d-4563-b0a5-2c5c287e1d55@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=ath12k@lists.infradead.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_sarishar@quicinc.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox