mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Enver Ikromov <owner@ph4ntom-rev.uz>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: linux-wireless@vger.kernel.org, Ahmet Zeren <niko3x@proton.me>,
	Luka Gejak <luka.gejak@linux.dev>,
	Bitterblue Smith <rtl8821cerfe2@gmail.com>,
	linux-kernel@vger.kernel.org,
	Enver Ikromov <owner@ph4ntom-rev.uz>
Subject: [PATCH rtw-next v2 2/2] wifi: rtw89: pci: fix NO_ACK TX status reporting
Date: Fri, 27 Nov 2026 15:13:07 +0500	[thread overview]
Message-ID: <20261127101307.15-3-owner@ph4ntom-rev.uz> (raw)
In-Reply-To: <20261127101307.15-1-owner@ph4ntom-rev.uz>

PCIe devices report TX status via rtw89_pci_tx_status() rather than
rtw89_tx_rpt_tx_status(). Currently it sets
IEEE80211_TX_STAT_NOACK_TRANSMITTED even when a NO_ACK skb was dropped
(MACID_DROP or LIFE_TIME), so mac80211 counts dropped frames as sent,
and it also sets IEEE80211_TX_STAT_ACK on RTW89_TX_DONE.

Only set NOACK_TRANSMITTED on RTW89_TX_DONE or RTW89_TX_RETRY_LIMIT,
skip the TX failure debug log in that case, and do not set
IEEE80211_TX_STAT_ACK for NO_ACK frames.

Signed-off-by: Enver Ikromov <owner@ph4ntom-rev.uz>
---
 drivers/net/wireless/realtek/rtw89/pci.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw89/pci.c b/drivers/net/wireless/realtek/rtw89/pci.c
index 76523d0578..2b6a5e2222 100644
--- a/drivers/net/wireless/realtek/rtw89/pci.c
+++ b/drivers/net/wireless/realtek/rtw89/pci.c
@@ -470,13 +470,17 @@ static void rtw89_pci_tx_status(struct rtw89_dev *rtwdev,
 	info = IEEE80211_SKB_CB(skb);
 	ieee80211_tx_info_clear_status(info);
 
-	if (info->flags & IEEE80211_TX_CTL_NO_ACK)
-		info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED;
 	if (tx_status == RTW89_TX_DONE) {
-		info->flags |= IEEE80211_TX_STAT_ACK;
+		if (info->flags & IEEE80211_TX_CTL_NO_ACK)
+			info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED;
+		else
+			info->flags |= IEEE80211_TX_STAT_ACK;
 		tx_ring->tx_acked++;
 	} else {
-		if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)
+		if (info->flags & IEEE80211_TX_CTL_NO_ACK &&
+		    tx_status == RTW89_TX_RETRY_LIMIT)
+			info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED;
+		else if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)
 			rtw89_debug(rtwdev, RTW89_DBG_FW,
 				    "failed to TX of status %x\n", tx_status);
 		switch (tx_status) {
-- 
2.53.0


      parent reply	other threads:[~2026-11-27 10:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 10:13 [PATCH rtw-next v2 0/2] wifi: rtw89: fix injected retry limit and NO_ACK TX status Enver Ikromov
2026-11-27 10:13 ` [PATCH rtw-next v2 1/2] wifi: rtw89: fix retry limit and NO_ACK status for injected frames Enver Ikromov
2026-11-27 10:13 ` Enver Ikromov [this message]

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=20261127101307.15-3-owner@ph4ntom-rev.uz \
    --to=owner@ph4ntom-rev.uz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luka.gejak@linux.dev \
    --cc=niko3x@proton.me \
    --cc=pkshih@realtek.com \
    --cc=rtl8821cerfe2@gmail.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

all inboxes | Powered by JetHome®