Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Antonio Martínez Ramírez" <antoniomartinezramirez@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: pkshih@realtek.com, hjf3108@gmail.com, hemanth.selam@gmail.com
Subject: [PATCH rtw-next v2] wifi: rtlwifi: rtl8192ce: report no signal for frames without PHY status
Date: Tue,  1 Dec 2026 10:49:26 +0100	[thread overview]
Message-ID: <20261201094926.19406-1-antoniomartinezramirez@gmail.com> (raw)

Without PHY status, rtl92ce_rx_query_desc() skips the PHY translator but
still assigns recvsignalpower + 10 to the RX signal. The PCI RX loop
reuses stats and clears rx_status for each descriptor, so a missing
measurement can be reported as a valid signal value with
RX_FLAG_NO_SIGNAL_VAL unset.

Set RX_FLAG_NO_SIGNAL_VAL when PHY status is absent and retain the
historical +10 assignment.

Signed-off-by: Antonio Martínez Ramírez <antoniomartinezramirez@gmail.com>
Reviewed-by: Ho Jie Feng <hjf3108@gmail.com>
---
Changes in v2:
- State in the first paragraph that RX_FLAG_NO_SIGNAL_VAL is unset.
- Shorten the commit message and remove the RTL8192D references and links.
- Move testing details and AI-assistance disclosure below this delimiter.
- Preserve the code unchanged and retain Ho Jie Feng's Reviewed-by.

v1: https://lore.kernel.org/linux-wireless/20261130094232.8734-1-antoniomartinezramirez@gmail.com/

Testing previously reported in the v1 thread on physical RTL8192CE
(PCI 10ec:8178), Debian 13, kernel 7.2.2-antonio:
- Original driver: one correlated descriptor with phystatus=0,
  recvsignalpower=0 before/after, signal=+10 dBm and NO_SIGNAL_VAL=0.
- Locally built module with the same two-line change: one correlated
  descriptor with the same zero power and +10 dBm, but NO_SIGNAL_VAL=1
  and return value=true. Both probes had two hits and zero missed;
  recorded buffer-loss counters were zero.
- Router ping checks before loading the modified module, with it loaded,
  and after restoring the original module had zero packet loss. Tracing
  was removed and the restored original-module identity was verified.

These are the author's previously published test results, not new v2
hardware tests. Delivery to mac80211 and station-statistics updates were
not tested. The hardware test used a local-kernel build, not a module
built against this updated rtw-next checkout. The previous upstream W=1
check compiled eight C files and linked rtl8192ce.o without warnings;
it did not constitute a complete upstream .ko/modpost build. No new
compilation or hardware test was performed for this text-only revision.

AI assistance: ChatGPT and OpenAI Codex assisted with RX-path analysis,
the minimal change, temporary tracing, trace interpretation and drafting.
The requests were to investigate RTL8192CE and keep the change minimal;
this revision follows the maintainer's requests to shorten the message.

 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c
index 9947205..005093c 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c
@@ -331,6 +331,8 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
 		_rtl92ce_translate_rx_signal_stuff(hw,
 						   skb, stats, pdesc,
 						   p_drvinfo);
+	} else {
+		rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;
 	}
 
 	/*rx_status->qual = stats->signal; */

base-commit: b64d6b5ae79cebd13aef6f9afb284899768cbc46

                 reply	other threads:[~2026-12-01  9:49 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=20261201094926.19406-1-antoniomartinezramirez@gmail.com \
    --to=antoniomartinezramirez@gmail.com \
    --cc=hemanth.selam@gmail.com \
    --cc=hjf3108@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.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