8852A uses single antenna during power save, when the loss
between two antennas is too large, previous logic induces
greater RSSI variation. Report the average beacon RSSI for
connected AP to get more stable RSSI and less unnecessary scanning.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250819034428.26307-3-pkshih@realtek.com
{
u8 path;
u8 *rx_power = phy_ppdu->rssi;
+ u8 raw;
+
+ if (!status->signal) {
+ if (phy_ppdu->to_self)
+ raw = ewma_rssi_read(&rtwdev->phystat.bcn_rssi);
+ else
+ raw = max(rx_power[RF_PATH_A], rx_power[RF_PATH_B]);
+
+ status->signal = RTW89_RSSI_RAW_TO_DBM(raw);
+ }
- if (!status->signal)
- status->signal = RTW89_RSSI_RAW_TO_DBM(max(rx_power[RF_PATH_A],
- rx_power[RF_PATH_B]));
for (path = 0; path < rtwdev->chip->rf_path_num; path++) {
status->chains |= BIT(path);
status->chain_signal[path] = RTW89_RSSI_RAW_TO_DBM(rx_power[path]);