From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Subject: [PATCH v3 05/22] wifi: rtw88: Allow rtw_chip_info.ltecoex_addr to be NULL
Date: Wed, 23 Oct 2024 17:09:04 +0300 [thread overview]
Message-ID: <d1004817-1760-41d1-9136-3d799757c444@gmail.com> (raw)
In-Reply-To: <ee6d97b3-0c82-4225-a07f-b0d4043a901a@gmail.com>
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>
---
v2:
- No change.
v3:
- No change.
---
drivers/net/wireless/realtek/rtw88/coex.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw88/coex.c b/drivers/net/wireless/realtek/rtw88/coex.c
index a99776af56c2..13096fa7025c 100644
--- a/drivers/net/wireless/realtek/rtw88/coex.c
+++ b/drivers/net/wireless/realtek/rtw88/coex.c
@@ -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) &&
--
2.46.0
next prev parent reply other threads:[~2024-10-23 14:09 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 13:59 [PATCH v3 00/22] wifi: rtw88: Add support for RTL8821AU and RTL8812AU Bitterblue Smith
2024-10-23 14:00 ` [PATCH v3 01/22] wifi: rtw88: Add some definitions for RTL8821AU/RTL8812AU Bitterblue Smith
2024-10-29 4:22 ` Ping-Ke Shih
2024-10-29 13:32 ` Bitterblue Smith
2024-10-30 2:54 ` Ping-Ke Shih
2024-10-30 13:14 ` Bitterblue Smith
2024-10-23 14:02 ` [PATCH v3 02/22] wifi: rtw88: Dump the HW features only for some chips Bitterblue Smith
2024-10-23 14:06 ` [PATCH v3 03/22] wifi: rtw88: Allow different C2H RA report sizes Bitterblue Smith
2024-10-23 14:08 ` [PATCH v3 04/22] wifi: rtw88: Extend the init table parsing for RTL8812AU Bitterblue Smith
2024-10-23 14:09 ` Bitterblue Smith [this message]
2024-10-23 14:09 ` [PATCH v3 06/22] wifi: rtw88: Let each driver control the power on/off process Bitterblue Smith
2024-10-23 14:10 ` [PATCH v3 07/22] wifi: rtw88: Enable data rate fallback for older chips Bitterblue Smith
2024-10-23 14:10 ` [PATCH v3 08/22] wifi: rtw88: Make txagc_remnant_ofdm an array Bitterblue Smith
2024-10-23 14:12 ` [PATCH v3 09/22] wifi: rtw88: Support TX page sizes bigger than 128 Bitterblue Smith
2024-10-23 14:12 ` [PATCH v3 10/22] wifi: rtw88: Move pwr_track_tbl to struct rtw_rfe_def Bitterblue Smith
2024-10-23 14:13 ` [PATCH v3 11/22] wifi: rtw88: usb: Set pkt_info.ls for the reserved page Bitterblue Smith
2024-10-23 14:13 ` [PATCH v3 12/22] wifi: rtw88: Detect beacon loss with chips other than 8822c Bitterblue Smith
2024-10-23 14:14 ` [PATCH v3 13/22] wifi: rtw88: coex: Support chips without a scoreboard Bitterblue Smith
2024-10-23 14:14 ` [PATCH v3 14/22] wifi: rtw88: 8821a: Regularly ask for BT info updates Bitterblue Smith
2024-10-23 14:15 ` [PATCH v3 15/22] wifi: rtw88: 8812a: Mitigate beacon loss Bitterblue Smith
2024-10-23 14:15 ` [PATCH v3 16/22] wifi: rtw88: Add rtw8812a_table.{c,h} Bitterblue Smith
2024-10-23 14:17 ` [PATCH v3 17/22] wifi: rtw88: Add rtw8821a_table.{c,h} Bitterblue Smith
2024-10-23 14:17 ` [PATCH v3 18/22] wifi: rtw88: Add rtw88xxa.{c,h} Bitterblue Smith
2024-10-23 14:18 ` [PATCH v3 19/22] wifi: rtw88: Add rtw8821a.{c,h} Bitterblue Smith
2024-10-23 14:19 ` [PATCH v3 20/22] wifi: rtw88: Add rtw8812a.{c,h} Bitterblue Smith
2024-10-23 14:20 ` [PATCH v3 21/22] wifi: rtw88: Add rtw8821au.c and rtw8812au.c Bitterblue Smith
2024-10-23 14:22 ` [PATCH v3 22/22] wifi: rtw88: Enable the new RTL8821AU/RTL8812AU drivers Bitterblue Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d1004817-1760-41d1-9136-3d799757c444@gmail.com \
--to=rtl8821cerfe2@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.