]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtl8xxxu: Report the signal strength only if it's known
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Thu, 9 Oct 2025 11:52:39 +0000 (14:52 +0300)
committerPing-Ke Shih <pkshih@realtek.com>
Tue, 21 Oct 2025 06:44:22 +0000 (14:44 +0800)
These chips don't report the signal strength for many (any?) data
frames. When the signal strength is not known, set RX_FLAG_NO_SIGNAL_VAL
in order to avoid reporting a signal strength of 0.

Tested with RTL8192FU and RTL8192CU.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/cdbe1a18-f6f1-4575-bad9-e85db8101247@gmail.com
drivers/net/wireless/realtek/rtl8xxxu/core.c

index be39463bd6c464b88983237c8a6ac2e9b7cfc174..2d88b7fba3173a64045b43d5432ab91bb086c21f 100644 (file)
@@ -6454,6 +6454,8 @@ int rtl8xxxu_parse_rxdesc16(struct rtl8xxxu_priv *priv, struct sk_buff *skb)
                                        rtl8xxxu_rx_update_rssi(priv,
                                                                rx_status,
                                                                hdr);
+                       } else {
+                               rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;
                        }
 
                        rx_status->mactime = rx_desc->tsfl;
@@ -6560,6 +6562,8 @@ int rtl8xxxu_parse_rxdesc24(struct rtl8xxxu_priv *priv, struct sk_buff *skb)
                                        rtl8xxxu_rx_update_rssi(priv,
                                                                rx_status,
                                                                hdr);
+                       } else {
+                               rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;
                        }
 
                        rx_status->mactime = rx_desc->tsfl;