]> git.baikalelectronics.ru Git - kernel.git/commitdiff
rtw88: coex: add power off setting
authorPing-Ke Shih <pkshih@realtek.com>
Fri, 19 Feb 2021 05:41:40 +0000 (13:41 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 15 Mar 2021 08:22:22 +0000 (10:22 +0200)
Clear WL/BT on/off bit in scoreboard register that is used to exchange
WL/BT status. Since the status is preserved after warm reboot, we must
clear it when WL is going to down.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210219054140.7835-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw88/coex.c
drivers/net/wireless/realtek/rtw88/coex.h
drivers/net/wireless/realtek/rtw88/main.c

index ea2be1e25065afbc718baad9a6a554119e1b205b..7eee2c5ecb115274d11a7b653d03f0715afac239 100644 (file)
@@ -2646,6 +2646,11 @@ void rtw_coex_power_on_setting(struct rtw_dev *rtwdev)
        rtw_coex_set_gnt_debug(rtwdev);
 }
 
+void rtw_coex_power_off_setting(struct rtw_dev *rtwdev)
+{
+       rtw_write16(rtwdev, REG_WIFI_BT_INFO, BIT_BT_INT_EN);
+}
+
 void rtw_coex_init_hw_config(struct rtw_dev *rtwdev, bool wifi_only)
 {
        __rtw_coex_init_hw_config(rtwdev, wifi_only);
index 8ab9852ec9ed02f9a2911faa808a33c00c3ec642..57018700ac39c8809bd3b5d63b3a2db24c60bcba 100644 (file)
@@ -393,6 +393,7 @@ void rtw_coex_bt_multi_link_remain_work(struct work_struct *work);
 void rtw_coex_wl_ccklock_work(struct work_struct *work);
 
 void rtw_coex_power_on_setting(struct rtw_dev *rtwdev);
+void rtw_coex_power_off_setting(struct rtw_dev *rtwdev);
 void rtw_coex_init_hw_config(struct rtw_dev *rtwdev, bool wifi_only);
 void rtw_coex_ips_notify(struct rtw_dev *rtwdev, u8 type);
 void rtw_coex_lps_notify(struct rtw_dev *rtwdev, u8 type);
index e6989c0525cc84d49e18dbd1084fd6e8b2d48fd5..d20aa069d62a54012cb7f89e2c6e502cafe5ed39 100644 (file)
@@ -1138,6 +1138,7 @@ int rtw_core_start(struct rtw_dev *rtwdev)
 static void rtw_power_off(struct rtw_dev *rtwdev)
 {
        rtw_hci_stop(rtwdev);
+       rtw_coex_power_off_setting(rtwdev);
        rtw_mac_power_off(rtwdev);
 }