mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
wifi: rtw89: 8852a: report average RSSI to avoid unnecessary scanning
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
This commit is contained in:
parent
4367000c0e
commit
f0f3bf4b37
|
|
@ -2109,10 +2109,17 @@ static void rtw8852a_query_ppdu(struct rtw89_dev *rtwdev,
|
|||
{
|
||||
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]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user