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
Subject: [RFC] wifi: rtlwifi: rtl8192ce: signal validity without PHY status
Date: Mon, 30 Nov 2026 01:52:08 +0100	[thread overview]
Message-ID: <20261130005208.3375-1-antoniomartinezramirez@gmail.com> (raw)

Hi Ping-Ke and linux-wireless,

Would it be appropriate to extend Ho Jie Feng's RTL8192D change,
d25adca7a8d5 ("wifi: rtlwifi: rtl8192d: report no signal for frames
without PHY status") [1], to RTL8192CE with the two-line change below?

rtl92ce_rx_query_desc() skips the PHY translator when phystatus is
zero, but still assigns stats->recvsignalpower + 10 to
rx_status->signal. The PCI RX loop reuses stats across descriptors
while clearing rx_status for each one. As a result, the no-PHY path
can assign a seemingly valid signal using a zero or stale power value.

On 29 November 2026 I traced the original loaded driver on an RTL8192CE
(PCI 10ec:8178), Debian 13, kernel 7.2.2-antonio. Using an entry kprobe and a kretprobe, I captured one RX descriptor
with matching entry and return records:

  entry:  phystatus=0, recvsignalpower=0
  return: phystatus=0, recvsignalpower=0, signal=+10 dBm,
          RX_FLAG_NO_SIGNAL_VAL=0, return value=true

The capture stopped after 9.1348 seconds. Both probes recorded 65 hits
with zero missed; only one descriptor pair was recorded and analyzed.
Buffer-loss counters were zero. The probes were removed and the
preexisting BPF hook was preserved. Kernel pointers are omitted here.
PAGGR/FAGGR were both set; frame type and PPDU membership were not traced.

This confirms the behaviour observed in rtl92ce_rx_query_desc(),
but it does not establish delivery to mac80211 or an update to station
statistics. The proposed change has not been tested on hardware.
All eight rtl8192ce C files compiled and rtl8192ce.o linked with W=1
and no warnings against rtw-next ae6b9e98b904. This did not include a
final .ko/modpost build or any module installation or loading.

The proposal preserves the historical +10 assignment and marks the
value unavailable when PHY status is missing, following RTL8192D.
Does RTL8192CE have a hardware-specific rule that makes reuse valid,
or should NO_SIGNAL_VAL be set for every missing-PHY descriptor,
including management/control frames? If you think this approach is appropriate, would you recommend
preparing a follow-up patch against rtw or rtw-next?

AI assistance: ChatGPT (GPT-6.2) and OpenAI Codex (GPT-6.1 Sol)
assisted with reviewing the RX path, adapting the RTL8192D precedent,
preparing and analysing the temporary tracing script, and drafting this
RFC. The trace was performed on the original driver; the proposed change
has not been tested on hardware. This is a discussion RFC. I would only
submit a formal patch after my own review and with a Signed-off-by if I
can personally certify the DCO.

[1] https://lore.kernel.org/linux-wireless/20261120113116.153232-3-hjf3108@gmail.com/
    https://github.com/pkshih/rtw/commit/d25adca7a8d556f24816b67e6b8e5aab62e920de

---
Proposed minimal change for discussion:
 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 99472053ccff..005093cfb8d7 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: ae6b9e98b9045e47f609ec2a8197a3f3109627cb

                 reply	other threads:[~2026-11-30  0:52 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=20261130005208.3375-1-antoniomartinezramirez@gmail.com \
    --to=antoniomartinezramirez@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