On 5/20/2025 2:10 PM, Johannes Berg wrote:
On Thu, 2025-05-15 at 23:17 +0530, Sarika Sharma wrote:
Looks like we can flatten them. In existing code as well we have
flattened and use, during sta_set_sinfo()
"if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_TX_PACKETS))) {
sinfo->tx_packets = 0;
for (ac = 0; ac < IEEE80211_NUM_ACS; ac++)
sinfo->tx_packets +=
sta->deflink.tx_stats.packets[ac];
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_PACKETS);
} "
Indeed, weird, why do we even bother counting them per AC?
Currently, tx_packets and tx_bytes are maintained per AC only in mac80211.
I'm not entirely sure why this per-AC tracking was introduced, as I
haven't come across a specific use case that justifies maintaining these
metrics separately per AC.
I also checked to see if there are any other parameters tracking
tx_packets and tx_bytes, but couldn't find any.
Would you like me to consolidate tx_packets and tx_bytes instead of
maintaining them per AC?
Or should we consider this change separately as different patch?
johannes