Skip to content

Commit

Permalink
rtw88: fix not disabling beacon filter after disconnection
Browse files Browse the repository at this point in the history
Correct the judgment to let beacon filter disable after disconnection.

Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220428020521.8015-2-pkshih@realtek.com
  • Loading branch information
Chih-Kang Chang authored and Kalle Valo committed May 1, 2022
1 parent 1d6d131 commit 02ee806
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/wireless/realtek/rtw88/fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ void rtw_fw_beacon_filter_config(struct rtw_dev *rtwdev, bool connect,
s32 threshold = bss_conf->cqm_rssi_thold + rssi_offset;
u8 h2c_pkt[H2C_PKT_SIZE] = {0};

if (!rtw_fw_feature_check(&rtwdev->fw, FW_FEATURE_BCN_FILTER) || !si)
if (!rtw_fw_feature_check(&rtwdev->fw, FW_FEATURE_BCN_FILTER))
return;

if (!connect) {
Expand All @@ -659,6 +659,10 @@ void rtw_fw_beacon_filter_config(struct rtw_dev *rtwdev, bool connect,

return;
}

if (!si)
return;

SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_BCN_FILTER_OFFLOAD_P0);
ether_addr_copy(&h2c_pkt[1], bss_conf->bssid);
rtw_fw_send_h2c_command(rtwdev, h2c_pkt);
Expand Down

0 comments on commit 02ee806

Please sign in to comment.