wifi: rtw89: 8852a: fix RSSI report when average beacon RSSI is not ready

8852A uses the average beacon RSSI to smooth the RSSI. However, before
the average beacon RSSI is available, the RSSI should use the PPDU
status RSSI of the received packet to avoid reporting the RSSI as -110 dBm.

Fixes: f0f3bf4b37 ("wifi: rtw89: 8852a: report average RSSI to avoid unnecessary scanning")
Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260707091056.42771-13-pkshih@realtek.com
This commit is contained in:
Chih-Kang Chang
2026-07-07 17:10:53 +08:00
committed by Ping-Ke Shih
parent 79afed9426
commit 9bf6bd6ed5

View File

@@ -2211,7 +2211,7 @@ static void rtw8852a_query_ppdu(struct rtw89_dev *rtwdev,
u8 raw;
if (!status->signal) {
if (phy_ppdu->to_self)
if (phy_ppdu->to_self && ewma_rssi_read(&bb->bcn_rssi))
raw = ewma_rssi_read(&bb->bcn_rssi);
else
raw = max(rx_power[RF_PATH_A], rx_power[RF_PATH_B]);