mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
wifi: rtw88: Allow rtw_chip_info.ltecoex_addr to be NULL
RTL8821A doesn't have this. Trying to use it results in error messages, so don't try if ltecoex_addr is NULL. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/d1004817-1760-41d1-9136-3d799757c444@gmail.com
This commit is contained in:
parent
95a772e30b
commit
7c5bbeba7c
|
|
@ -950,12 +950,18 @@ static void rtw_coex_coex_ctrl_owner(struct rtw_dev *rtwdev, bool wifi_control)
|
|||
|
||||
static void rtw_coex_set_gnt_bt(struct rtw_dev *rtwdev, u8 state)
|
||||
{
|
||||
if (!rtwdev->chip->ltecoex_addr)
|
||||
return;
|
||||
|
||||
rtw_coex_write_indirect_reg(rtwdev, LTE_COEX_CTRL, 0xc000, state);
|
||||
rtw_coex_write_indirect_reg(rtwdev, LTE_COEX_CTRL, 0x0c00, state);
|
||||
}
|
||||
|
||||
static void rtw_coex_set_gnt_wl(struct rtw_dev *rtwdev, u8 state)
|
||||
{
|
||||
if (!rtwdev->chip->ltecoex_addr)
|
||||
return;
|
||||
|
||||
rtw_coex_write_indirect_reg(rtwdev, LTE_COEX_CTRL, 0x3000, state);
|
||||
rtw_coex_write_indirect_reg(rtwdev, LTE_COEX_CTRL, 0x0300, state);
|
||||
}
|
||||
|
|
@ -3904,7 +3910,7 @@ void rtw_coex_display_coex_info(struct rtw_dev *rtwdev, struct seq_file *m)
|
|||
u8 sys_lte;
|
||||
u16 score_board_WB, score_board_BW;
|
||||
u32 wl_reg_6c0, wl_reg_6c4, wl_reg_6c8, wl_reg_778, wl_reg_6cc;
|
||||
u32 lte_coex, bt_coex;
|
||||
u32 lte_coex = 0, bt_coex = 0;
|
||||
int i;
|
||||
|
||||
score_board_BW = rtw_coex_read_scbd(rtwdev);
|
||||
|
|
@ -3916,8 +3922,10 @@ void rtw_coex_display_coex_info(struct rtw_dev *rtwdev, struct seq_file *m)
|
|||
wl_reg_778 = rtw_read8(rtwdev, REG_BT_STAT_CTRL);
|
||||
|
||||
sys_lte = rtw_read8(rtwdev, 0x73);
|
||||
lte_coex = rtw_coex_read_indirect_reg(rtwdev, 0x38);
|
||||
bt_coex = rtw_coex_read_indirect_reg(rtwdev, 0x54);
|
||||
if (rtwdev->chip->ltecoex_addr) {
|
||||
lte_coex = rtw_coex_read_indirect_reg(rtwdev, 0x38);
|
||||
bt_coex = rtw_coex_read_indirect_reg(rtwdev, 0x54);
|
||||
}
|
||||
|
||||
if (!coex_stat->wl_under_ips &&
|
||||
(!coex_stat->wl_under_lps || coex_stat->wl_force_lps_ctrl) &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user