Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

wifi: mac80211: fix missing RX bitrate update for mesh forwarding path

Currently, RX bitrate statistics are not updated for packets received
on the mesh forwarding path during fast RX processing. This results in
incomplete RX rate tracking in station dump outputs for mesh scenarios.

Update ieee80211_invoke_fast_rx() to record the RX rate using
sta_stats_encode_rate() and store it in the last_rate field of
ieee80211_sta_rx_stats when RX_QUEUED is returned from
ieee80211_rx_mesh_data(). This ensures that RX bitrate is properly
accounted for in both RSS and non-RSS paths.

Signed-off-by: Sarika Sharma <sarika.sharma@oss.qualcomm.com>
Link: https://patch.msgid.link/20251024043627.1640447-1-sarika.sharma@oss.qualcomm.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Sarika Sharma and committed by
Johannes Berg
cc18fffa bca76b87

+7 -5
+7 -5
net/mac80211/rx.c
··· 4952 4952 4953 4953 /* after this point, don't punt to the slowpath! */ 4954 4954 4955 + if (fast_rx->uses_rss) 4956 + stats = this_cpu_ptr(rx->link_sta->pcpu_rx_stats); 4957 + else 4958 + stats = &rx->link_sta->rx_stats; 4959 + 4955 4960 if (rx->key && !(status->flag & RX_FLAG_MIC_STRIPPED) && 4956 4961 pskb_trim(skb, skb->len - fast_rx->icv_len)) 4957 4962 goto drop; ··· 4991 4986 res = ieee80211_rx_mesh_data(rx->sdata, rx->sta, rx->skb); 4992 4987 switch (res) { 4993 4988 case RX_QUEUED: 4989 + stats->last_rx = jiffies; 4990 + stats->last_rate = sta_stats_encode_rate(status); 4994 4991 return true; 4995 4992 case RX_CONTINUE: 4996 4993 break; ··· 5005 4998 return true; 5006 4999 drop: 5007 5000 dev_kfree_skb(skb); 5008 - 5009 - if (fast_rx->uses_rss) 5010 - stats = this_cpu_ptr(rx->link_sta->pcpu_rx_stats); 5011 - else 5012 - stats = &rx->link_sta->rx_stats; 5013 5001 5014 5002 stats->dropped++; 5015 5003 return true;