rtw89: 8852c: rfk: get calibrated channels to notify firmware
The commit 16b44ed0ff
("rtw89: add RF H2C to notify firmware") is to
add firmware command, and this commit is to prepare the channels. Then,
firmware can get proper channels.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220503120001.79272-2-pkshih@realtek.com
This commit is contained in:
parent
eeff214dbf
commit
5309cd5ec9
|
@ -1786,6 +1786,7 @@ static void rtw8852c_rfk_channel(struct rtw89_dev *rtwdev)
|
|||
{
|
||||
enum rtw89_phy_idx phy_idx = RTW89_PHY_0;
|
||||
|
||||
rtw8852c_mcc_get_ch_info(rtwdev, phy_idx);
|
||||
rtw8852c_rx_dck(rtwdev, phy_idx, false);
|
||||
rtw8852c_iqk(rtwdev, phy_idx);
|
||||
rtw8852c_tssi(rtwdev, phy_idx);
|
||||
|
|
|
@ -3809,6 +3809,24 @@ void rtw8852c_set_channel_rf(struct rtw89_dev *rtwdev,
|
|||
param->bandwidth);
|
||||
}
|
||||
|
||||
void rtw8852c_mcc_get_ch_info(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx)
|
||||
{
|
||||
struct rtw89_mcc_info *mcc_info = &rtwdev->mcc;
|
||||
u8 idx = mcc_info->table_idx;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < RTW89_IQK_CHS_NR; i++) {
|
||||
if (mcc_info->ch[idx] == 0)
|
||||
break;
|
||||
if (++idx >= RTW89_IQK_CHS_NR)
|
||||
idx = 0;
|
||||
}
|
||||
|
||||
mcc_info->table_idx = idx;
|
||||
mcc_info->ch[idx] = rtwdev->hal.current_channel;
|
||||
mcc_info->band[idx] = rtwdev->hal.current_band_type;
|
||||
}
|
||||
|
||||
void rtw8852c_rck(struct rtw89_dev *rtwdev)
|
||||
{
|
||||
u8 path;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include "core.h"
|
||||
|
||||
void rtw8852c_mcc_get_ch_info(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy);
|
||||
void rtw8852c_rck(struct rtw89_dev *rtwdev);
|
||||
void rtw8852c_dack(struct rtw89_dev *rtwdev);
|
||||
void rtw8852c_iqk(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx);
|
||||
|
|
Loading…
Reference in New Issue