summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorChing-Te Ku <ku920601@realtek.com>2023-01-03 22:02:37 +0800
committerKalle Valo <kvalo@kernel.org>2023-01-16 15:34:31 +0200
commit891b6a3f9407965436136319ad81f03bbf97310d (patch)
tree56a9d82d59541ffc9b5b9f43428195f7644ec803 /drivers/net/wireless
parent0c06fd47335ab9bbcbca250267eb22227e98ffa4 (diff)
wifi: rtw89: coex: only read Bluetooth counter of report version 1 for RTL8852A
Only when firmware control report version is 1, need to get the counter by reading the register. The other version will monitor the counter at firmware. And upstream branch only RTL8852A has this old version. Signed-off-by: Ching-Te Ku <ku920601@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/20230103140238.15601-7-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/realtek/rtw89/rtw8852a.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852a.c b/drivers/net/wireless/realtek/rtw89/rtw8852a.c
index 1875c2537ddb..1800a56091be 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852a.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852a.c
@@ -1878,9 +1878,13 @@ static
void rtw8852a_btc_update_bt_cnt(struct rtw89_dev *rtwdev)
{
struct rtw89_btc *btc = &rtwdev->btc;
+ const struct rtw89_btc_ver *ver = btc->ver;
struct rtw89_btc_cx *cx = &btc->cx;
u32 val;
+ if (ver->fcxbtcrpt != 1)
+ return;
+
val = rtw89_read32(rtwdev, R_AX_BT_STAST_HIGH);
cx->cnt_bt[BTC_BCNT_HIPRI_TX] = FIELD_GET(B_AX_STATIS_BT_HI_TX_MASK, val);
cx->cnt_bt[BTC_BCNT_HIPRI_RX] = FIELD_GET(B_AX_STATIS_BT_HI_RX_MASK, val);