diff options
author | Po-Hao Huang <phhuang@realtek.com> | 2021-05-28 06:29:01 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2021-06-22 18:21:31 +0300 |
commit | ae04f15b1a83e813f5c270f44692766dc3c5a6ce (patch) | |
tree | 5bf4db6b805eeae4569f4dec7c7222fbb03c7fd1 /drivers/net/wireless/realtek | |
parent | 7b80f3e48c4b0ff85ff91945a2537d0bbc3e3cc4 (diff) | |
download | linux-ae04f15b1a83e813f5c270f44692766dc3c5a6ce.tar.xz |
rtw88: refine unwanted h2c command
Don't send beacon filter h2c when there is no valid context.
Return early instead of printing out warning messages, so others
won't get confused.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210528032901.12927-3-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/fw.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c index 58f4e47aa96a..176e8b67530e 100644 --- a/drivers/net/wireless/realtek/rtw88/fw.c +++ b/drivers/net/wireless/realtek/rtw88/fw.c @@ -601,7 +601,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)) + if (!rtw_fw_feature_check(&rtwdev->fw, FW_FEATURE_BCN_FILTER) || !si) return; if (!connect) { @@ -623,10 +623,7 @@ void rtw_fw_beacon_filter_config(struct rtw_dev *rtwdev, bool connect, BCN_FILTER_OFFLOAD_MODE_DEFAULT); SET_BCN_FILTER_OFFLOAD_P1_THRESHOLD(h2c_pkt, (u8)threshold); SET_BCN_FILTER_OFFLOAD_P1_BCN_LOSS_CNT(h2c_pkt, BCN_LOSS_CNT); - if (si) - SET_BCN_FILTER_OFFLOAD_P1_MACID(h2c_pkt, si->mac_id); - else - rtw_warn(rtwdev, "CQM config with station not found\n"); + SET_BCN_FILTER_OFFLOAD_P1_MACID(h2c_pkt, si->mac_id); SET_BCN_FILTER_OFFLOAD_P1_HYST(h2c_pkt, bss_conf->cqm_rssi_hyst); SET_BCN_FILTER_OFFLOAD_P1_BCN_INTERVAL(h2c_pkt, bss_conf->beacon_int); rtw_fw_send_h2c_command(rtwdev, h2c_pkt); |