wifi: rtw89: only reset BB/RF for existing WiFi 6 chips while starting up

The new WiFi 7 chips change the design, so no need to disable/enable
BB/RF when core_start(). Keep the same logic for existing chips.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231211083341.118047-7-pkshih@realtek.com
This commit is contained in:
Ping-Ke Shih 2023-12-11 16:33:41 +08:00 committed by Kalle Valo
parent 293f7bdca2
commit 48fa9b61ae
2 changed files with 18 additions and 4 deletions

View file

@ -3956,10 +3956,7 @@ int rtw89_core_start(struct rtw89_dev *rtwdev)
/* efuse process */
/* pre-config BB/RF, BB reset/RFC reset */
ret = rtw89_chip_disable_bb_rf(rtwdev);
if (ret)
return ret;
ret = rtw89_chip_enable_bb_rf(rtwdev);
ret = rtw89_chip_reset_bb_rf(rtwdev);
if (ret)
return ret;

View file

@ -1108,6 +1108,23 @@ static inline int rtw89_chip_disable_bb_rf(struct rtw89_dev *rtwdev)
return chip->ops->disable_bb_rf(rtwdev);
}
static inline int rtw89_chip_reset_bb_rf(struct rtw89_dev *rtwdev)
{
int ret;
if (rtwdev->chip->chip_gen != RTW89_CHIP_AX)
return 0;
ret = rtw89_chip_disable_bb_rf(rtwdev);
if (ret)
return ret;
ret = rtw89_chip_enable_bb_rf(rtwdev);
if (ret)
return ret;
return 0;
}
u32 rtw89_mac_get_err_status(struct rtw89_dev *rtwdev);
int rtw89_mac_set_err_status(struct rtw89_dev *rtwdev, u32 err);
bool rtw89_mac_c2h_chk_atomic(struct rtw89_dev *rtwdev, u8 class, u8 func);