* [RFC] wifi: rtlwifi: rtl8192ce: signal validity without PHY status
@ 2026-11-30 0:52 Antonio Martínez Ramírez
2026-11-30 5:56 ` Ping-Ke Shih
0 siblings, 1 reply; 3+ messages in thread
From: Antonio Martínez Ramírez @ 2026-11-30 0:52 UTC (permalink / raw)
To: linux-wireless; +Cc: pkshih
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
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [RFC] wifi: rtlwifi: rtl8192ce: signal validity without PHY status
2026-11-30 0:52 [RFC] wifi: rtlwifi: rtl8192ce: signal validity without PHY status Antonio Martínez Ramírez
@ 2026-11-30 5:56 ` Ping-Ke Shih
2026-11-30 9:40 ` Antonio Martínez Ramírez
0 siblings, 1 reply; 3+ messages in thread
From: Ping-Ke Shih @ 2026-11-30 5:56 UTC (permalink / raw)
To: Antonio Martínez Ramírez,
linux-wireless@vger.kernel.org
Antonio Martínez Ramírez <antoniomartinezramirez@gmail.com> wrote:
> 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?
I think it is okay, but there are more chips use similar patterns.
Should they change in one go?
>
> 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
If you have real hardware, just send out a patch.
To be conservative, I'm not very willing to touch old chips.
>
> 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?
The code was there for many years, just go via rtw-next.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFC] wifi: rtlwifi: rtl8192ce: signal validity without PHY status
2026-11-30 5:56 ` Ping-Ke Shih
@ 2026-11-30 9:40 ` Antonio Martínez Ramírez
0 siblings, 0 replies; 3+ messages in thread
From: Antonio Martínez Ramírez @ 2026-11-30 9:40 UTC (permalink / raw)
To: Ping-Ke Shih; +Cc: linux-wireless@vger.kernel.org
Hi Ping-Ke,
Thank you for your feedback.
Given your concerns about modifying older chips, I think it would be
better to limit this change to RTL8192CE for now, as this is the only
hardware I have available.
I have reproduced the issue on my RTL8192CE and prepared the patch
against rtw-next, as suggested. The modified driver has passed the
object compilation checks, but has not yet been tested on hardware.
I will submit the formal patch separately.
Thanks for your guidance.
Antonio
El lun, 30 nov 2026 a las 6:56, Ping-Ke Shih (<pkshih@realtek.com>) escribió:
>
> Antonio Martínez Ramírez <antoniomartinezramirez@gmail.com> wrote:
> > 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?
>
> I think it is okay, but there are more chips use similar patterns.
> Should they change in one go?
>
> >
> > 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
>
> If you have real hardware, just send out a patch.
> To be conservative, I'm not very willing to touch old chips.
>
> >
> > 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?
>
> The code was there for many years, just go via rtw-next.
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-30 9:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 0:52 [RFC] wifi: rtlwifi: rtl8192ce: signal validity without PHY status Antonio Martínez Ramírez
2026-11-30 5:56 ` Ping-Ke Shih
2026-11-30 9:40 ` Antonio Martínez Ramírez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox