rtw89: packed IGI configuration flow into function for DIG feature
Refinement of DIG flow, a mechanism to adjust Rx gain for better Rx performance, by packing IGI(initial gain index) configuration flow into one function. Signed-off-by: Johnson Lin <johnson.lin@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/20220318023214.32411-6-pkshih@realtek.com
This commit is contained in:
Родитель
1ae30c37ec
Коммит
bed4045ffb
|
@ -3180,6 +3180,21 @@ static void rtw89_phy_dig_sdagc_follow_pagc_config(struct rtw89_dev *rtwdev,
|
|||
rtw89_debug(rtwdev, RTW89_DBG_DIG, "sdagc_follow_pagc=%d\n", enable);
|
||||
}
|
||||
|
||||
static void rtw89_phy_dig_config_igi(struct rtw89_dev *rtwdev)
|
||||
{
|
||||
struct rtw89_dig_info *dig = &rtwdev->dig;
|
||||
|
||||
if (dig->force_gaincode_idx_en) {
|
||||
rtw89_phy_dig_set_igi_cr(rtwdev, dig->force_gaincode);
|
||||
rtw89_debug(rtwdev, RTW89_DBG_DIG,
|
||||
"Force gaincode index enabled.\n");
|
||||
} else {
|
||||
rtw89_phy_dig_gaincode_by_rssi(rtwdev, dig->igi_fa_rssi,
|
||||
&dig->cur_gaincode);
|
||||
rtw89_phy_dig_set_igi_cr(rtwdev, dig->cur_gaincode);
|
||||
}
|
||||
}
|
||||
|
||||
static void rtw89_phy_dig_dyn_pd_th(struct rtw89_dev *rtwdev, u8 rssi,
|
||||
bool enable)
|
||||
{
|
||||
|
@ -3294,15 +3309,7 @@ void rtw89_phy_dig(struct rtw89_dev *rtwdev)
|
|||
dig->igi_rssi, dig->dyn_igi_max, dig->dyn_igi_min,
|
||||
dig->igi_fa_rssi);
|
||||
|
||||
if (dig->force_gaincode_idx_en) {
|
||||
rtw89_phy_dig_set_igi_cr(rtwdev, dig->force_gaincode);
|
||||
rtw89_debug(rtwdev, RTW89_DBG_DIG,
|
||||
"Force gaincode index enabled.\n");
|
||||
} else {
|
||||
rtw89_phy_dig_gaincode_by_rssi(rtwdev, dig->igi_fa_rssi,
|
||||
&dig->cur_gaincode);
|
||||
rtw89_phy_dig_set_igi_cr(rtwdev, dig->cur_gaincode);
|
||||
}
|
||||
rtw89_phy_dig_config_igi(rtwdev);
|
||||
|
||||
rtw89_phy_dig_dyn_pd_th(rtwdev, dig->igi_fa_rssi, dig->dyn_pd_th_en);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче