Commit 48fa9b61 authored by Ping-Ke Shih's avatar Ping-Ke Shih Committed by Kalle Valo

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: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231211083341.118047-7-pkshih@realtek.com
parent 293f7bdc
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment