summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtw89/mac.c
diff options
context:
space:
mode:
authorChing-Te Ku <ku920601@realtek.com>2023-01-06 15:08:42 +0300
committerKalle Valo <kvalo@kernel.org>2023-01-16 16:36:58 +0300
commitae4e1adbb1be65cadde793239a39fa947a3ff828 (patch)
treebda2226d01cc6da63bec4218fdbdcba5a19f6f8a /drivers/net/wireless/realtek/rtw89/mac.c
parent2ce43be348502703cf173fc31ea45bfe5ff43f90 (diff)
downloadlinux-ae4e1adbb1be65cadde793239a39fa947a3ff828.tar.xz
wifi: rtw89: coex: Packet traffic arbitration hardware owner monitor
Because the difference of the hardware design, RTL8852C can not get the PTA owner by the same method with RTL8852B, RTL8852A. Modify the get owner API and related logic. 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/20230106120844.17441-6-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw89/mac.c')
-rw-r--r--drivers/net/wireless/realtek/rtw89/mac.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
index cf9a0a3120a7..5ab0590485e0 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.c
+++ b/drivers/net/wireless/realtek/rtw89/mac.c
@@ -4865,9 +4865,16 @@ EXPORT_SYMBOL(rtw89_mac_cfg_ctrl_path_v1);
bool rtw89_mac_get_ctrl_path(struct rtw89_dev *rtwdev)
{
- u8 val = rtw89_read8(rtwdev, R_AX_SYS_SDIO_CTRL + 3);
+ const struct rtw89_chip_info *chip = rtwdev->chip;
+ u8 val = 0;
+
+ if (chip->chip_id == RTL8852C)
+ return false;
+ else if (chip->chip_id == RTL8852A || chip->chip_id == RTL8852B)
+ val = rtw89_read8_mask(rtwdev, R_AX_SYS_SDIO_CTRL + 3,
+ B_AX_LTE_MUX_CTRL_PATH >> 24);
- return FIELD_GET(B_AX_LTE_MUX_CTRL_PATH >> 24, val);
+ return !!val;
}
u16 rtw89_mac_get_plt_cnt(struct rtw89_dev *rtwdev, u8 band)