|
|
56e3f4 |
From ac6eb6a8bbca1aa358b288ee694c62c740623283 Mon Sep 17 00:00:00 2001
|
|
|
56e3f4 |
From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= <ihuguet@redhat.com>
|
|
|
56e3f4 |
Date: Fri, 21 Jan 2022 08:49:04 +0100
|
|
|
56e3f4 |
Subject: [PATCH 29/36] rtw89: coex: Define LPS state for BTC using
|
|
|
56e3f4 |
MIME-Version: 1.0
|
|
|
56e3f4 |
Content-Type: text/plain; charset=UTF-8
|
|
|
56e3f4 |
Content-Transfer-Encoding: 8bit
|
|
|
56e3f4 |
|
|
|
56e3f4 |
Bugzilla: http://bugzilla.redhat.com/2033291
|
|
|
56e3f4 |
|
|
|
56e3f4 |
commit 2200ff3f0d1df9f41d0a5589e4a9572b4f627796
|
|
|
56e3f4 |
Author: Ching-Te Ku <ku920601@realtek.com>
|
|
|
56e3f4 |
Date: Thu Dec 9 16:32:26 2021 +0800
|
|
|
56e3f4 |
|
|
|
56e3f4 |
rtw89: coex: Define LPS state for BTC using
|
|
|
56e3f4 |
|
|
|
56e3f4 |
To distinguish three types of LPS state.
|
|
|
56e3f4 |
|
|
|
56e3f4 |
Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
|
|
|
56e3f4 |
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
|
|
56e3f4 |
Signed-off-by: Kalle Valo <kvalo@kernel.org>
|
|
|
56e3f4 |
Link: https://lore.kernel.org/r/20211209083229.10815-5-pkshih@realtek.com
|
|
|
56e3f4 |
|
|
|
56e3f4 |
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
|
|
|
56e3f4 |
---
|
|
|
56e3f4 |
drivers/net/wireless/realtek/rtw89/coex.c | 8 ++++----
|
|
|
56e3f4 |
drivers/net/wireless/realtek/rtw89/coex.h | 6 ++++++
|
|
|
56e3f4 |
2 files changed, 10 insertions(+), 4 deletions(-)
|
|
|
56e3f4 |
|
|
|
56e3f4 |
diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c
|
|
|
56e3f4 |
index 8763114eab27..436f5ccb193a 100644
|
|
|
56e3f4 |
--- a/drivers/net/wireless/realtek/rtw89/coex.c
|
|
|
56e3f4 |
+++ b/drivers/net/wireless/realtek/rtw89/coex.c
|
|
|
56e3f4 |
@@ -1622,7 +1622,7 @@ static void _set_rf_trx_para(struct rtw89_dev *rtwdev)
|
|
|
56e3f4 |
_set_bt_rx_gain(rtwdev, para.bt_rx_gain);
|
|
|
56e3f4 |
|
|
|
56e3f4 |
if (bt->enable.now == 0 || wl->status.map.rf_off == 1 ||
|
|
|
56e3f4 |
- wl->status.map.lps == 1)
|
|
|
56e3f4 |
+ wl->status.map.lps == BTC_LPS_RF_OFF)
|
|
|
56e3f4 |
wl_stb_chg = 0;
|
|
|
56e3f4 |
else
|
|
|
56e3f4 |
wl_stb_chg = 1;
|
|
|
56e3f4 |
@@ -4225,16 +4225,16 @@ void rtw89_btc_ntfy_radio_state(struct rtw89_dev *rtwdev, enum btc_rfctrl rf_sta
|
|
|
56e3f4 |
switch (rf_state) {
|
|
|
56e3f4 |
case BTC_RFCTRL_WL_OFF:
|
|
|
56e3f4 |
wl->status.map.rf_off = 1;
|
|
|
56e3f4 |
- wl->status.map.lps = 0;
|
|
|
56e3f4 |
+ wl->status.map.lps = BTC_LPS_OFF;
|
|
|
56e3f4 |
break;
|
|
|
56e3f4 |
case BTC_RFCTRL_FW_CTRL:
|
|
|
56e3f4 |
wl->status.map.rf_off = 0;
|
|
|
56e3f4 |
- wl->status.map.lps = 1;
|
|
|
56e3f4 |
+ wl->status.map.lps = BTC_LPS_RF_OFF;
|
|
|
56e3f4 |
break;
|
|
|
56e3f4 |
case BTC_RFCTRL_WL_ON:
|
|
|
56e3f4 |
default:
|
|
|
56e3f4 |
wl->status.map.rf_off = 0;
|
|
|
56e3f4 |
- wl->status.map.lps = 0;
|
|
|
56e3f4 |
+ wl->status.map.lps = BTC_LPS_OFF;
|
|
|
56e3f4 |
break;
|
|
|
56e3f4 |
}
|
|
|
56e3f4 |
|
|
|
56e3f4 |
diff --git a/drivers/net/wireless/realtek/rtw89/coex.h b/drivers/net/wireless/realtek/rtw89/coex.h
|
|
|
56e3f4 |
index 4b4565d15c9e..c3a722d259d7 100644
|
|
|
56e3f4 |
--- a/drivers/net/wireless/realtek/rtw89/coex.h
|
|
|
56e3f4 |
+++ b/drivers/net/wireless/realtek/rtw89/coex.h
|
|
|
56e3f4 |
@@ -130,6 +130,12 @@ enum btc_rfctrl {
|
|
|
56e3f4 |
BTC_RFCTRL_MAX
|
|
|
56e3f4 |
};
|
|
|
56e3f4 |
|
|
|
56e3f4 |
+enum btc_lps_state {
|
|
|
56e3f4 |
+ BTC_LPS_OFF = 0,
|
|
|
56e3f4 |
+ BTC_LPS_RF_OFF = 1,
|
|
|
56e3f4 |
+ BTC_LPS_RF_ON = 2
|
|
|
56e3f4 |
+};
|
|
|
56e3f4 |
+
|
|
|
56e3f4 |
void rtw89_btc_ntfy_poweron(struct rtw89_dev *rtwdev);
|
|
|
56e3f4 |
void rtw89_btc_ntfy_poweroff(struct rtw89_dev *rtwdev);
|
|
|
56e3f4 |
void rtw89_btc_ntfy_init(struct rtw89_dev *rtwdev, u8 mode);
|
|
|
56e3f4 |
--
|
|
|
56e3f4 |
2.13.6
|
|
|
56e3f4 |
|