From: Christopher Griffin via B4 Relay <devnull+christophergriffin05.gmail.com@kernel.org>
To: Jeff Johnson <jjohnson@kernel.org>
Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
linux-kernel@vger.kernel.org,
Christopher Griffin <christophergriffin05@gmail.com>
Subject: [PATCH ath-next] wifi: ath11k: report a station's TX retries
Date: Sun, 01 Nov 2026 10:06:38 -0600 [thread overview]
Message-ID: <20261101-b62-tx-retries-v1-1-c00d4e6e2739@gmail.com> (raw)
From: Christopher Griffin <christophergriffin05@gmail.com>
ath11k_dp_tx_complete_msdu() hands mac80211 a status with no entry in
info->status.rates[], so that mac80211 does not update its rate
statistics from it, and a single rate with a try count of 1. mac80211
takes its retry count from info->status.rates[], so it counts none, and
"iw station dump" shows "tx retries: 0" for every station: on an Arista
C-360 (QCN9074, 6 GHz) a client showed 0 retries after 55284 frames at
HE-MCS 11.
The TX completion carries the frame's transmit count (try_cnt), which
the extended TX stats already use. Count the retransmissions per
station from it and report them as NL80211_STA_INFO_TX_RETRIES, as
ath12k does. mac80211's TX failed count (frames never acked) is
unchanged.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.r4-00683-QCAHKSWPL_SILICONZ-1
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Christopher Griffin <christophergriffin05@gmail.com>
---
Seen on an Arista C-360 with OpenWrt, on its IPQ8074 and QCN9074 radios.
---
drivers/net/wireless/ath/ath11k/core.h | 1 +
drivers/net/wireless/ath/ath11k/dp_tx.c | 2 ++
drivers/net/wireless/ath/ath11k/mac.c | 3 +++
3 files changed, 6 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
index a0d725923ef24..ba32063092254 100644
--- a/drivers/net/wireless/ath/ath11k/core.h
+++ b/drivers/net/wireless/ath/ath11k/core.h
@@ -556,6 +556,7 @@ struct ath11k_sta {
struct rate_info last_txrate;
u64 rx_duration;
u64 tx_duration;
+ u64 tx_retries;
u8 rssi_comb;
struct ewma_avg_rssi avg_rssi;
s8 rssi_beacon;
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index cac970c92806a..2329c2449b572 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -637,6 +637,8 @@ static void ath11k_dp_tx_complete_msdu(struct ath11k *ar,
return;
}
arsta = ath11k_sta_to_arsta(peer->sta);
+ if (ts->try_cnt > 1)
+ arsta->tx_retries += ts->try_cnt - 1;
status.sta = peer->sta;
status.skb = msdu;
status.info = info;
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 1a237adaa37d1..066a503d76d4c 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -9435,6 +9435,9 @@ static void ath11k_mac_op_sta_statistics(struct ieee80211_hw *hw,
sinfo->tx_duration = arsta->tx_duration;
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_DURATION);
+ sinfo->tx_retries = arsta->tx_retries;
+ sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_RETRIES);
+
if (arsta->txrate.legacy || arsta->txrate.nss) {
if (arsta->txrate.legacy) {
sinfo->txrate.legacy = arsta->txrate.legacy;
---
base-commit: a3ddbb45768717b5c9f923489387cf55c838d1ad
change-id: 20261101-b62-tx-retries-e171cea8c822
Best regards,
--
Christopher Griffin <christophergriffin05@gmail.com>
reply other threads:[~2026-11-01 16:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261101-b62-tx-retries-v1-1-c00d4e6e2739@gmail.com \
--to=devnull+christophergriffin05.gmail.com@kernel.org \
--cc=ath11k@lists.infradead.org \
--cc=christophergriffin05@gmail.com \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®