Commit 2200ff3f authored by Ching-Te Ku's avatar Ching-Te Ku Committed by Kalle Valo

rtw89: coex: Define LPS state for BTC using

To distinguish three types of LPS state.
Signed-off-by: default avatarChing-Te Ku <ku920601@realtek.com>
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20211209083229.10815-5-pkshih@realtek.com
parent 8c7e9ceb
...@@ -1622,7 +1622,7 @@ static void _set_rf_trx_para(struct rtw89_dev *rtwdev) ...@@ -1622,7 +1622,7 @@ static void _set_rf_trx_para(struct rtw89_dev *rtwdev)
_set_bt_rx_gain(rtwdev, para.bt_rx_gain); _set_bt_rx_gain(rtwdev, para.bt_rx_gain);
if (bt->enable.now == 0 || wl->status.map.rf_off == 1 || if (bt->enable.now == 0 || wl->status.map.rf_off == 1 ||
wl->status.map.lps == 1) wl->status.map.lps == BTC_LPS_RF_OFF)
wl_stb_chg = 0; wl_stb_chg = 0;
else else
wl_stb_chg = 1; wl_stb_chg = 1;
...@@ -4225,16 +4225,16 @@ void rtw89_btc_ntfy_radio_state(struct rtw89_dev *rtwdev, enum btc_rfctrl rf_sta ...@@ -4225,16 +4225,16 @@ void rtw89_btc_ntfy_radio_state(struct rtw89_dev *rtwdev, enum btc_rfctrl rf_sta
switch (rf_state) { switch (rf_state) {
case BTC_RFCTRL_WL_OFF: case BTC_RFCTRL_WL_OFF:
wl->status.map.rf_off = 1; wl->status.map.rf_off = 1;
wl->status.map.lps = 0; wl->status.map.lps = BTC_LPS_OFF;
break; break;
case BTC_RFCTRL_FW_CTRL: case BTC_RFCTRL_FW_CTRL:
wl->status.map.rf_off = 0; wl->status.map.rf_off = 0;
wl->status.map.lps = 1; wl->status.map.lps = BTC_LPS_RF_OFF;
break; break;
case BTC_RFCTRL_WL_ON: case BTC_RFCTRL_WL_ON:
default: default:
wl->status.map.rf_off = 0; wl->status.map.rf_off = 0;
wl->status.map.lps = 0; wl->status.map.lps = BTC_LPS_OFF;
break; break;
} }
......
...@@ -130,6 +130,12 @@ enum btc_rfctrl { ...@@ -130,6 +130,12 @@ enum btc_rfctrl {
BTC_RFCTRL_MAX BTC_RFCTRL_MAX
}; };
enum btc_lps_state {
BTC_LPS_OFF = 0,
BTC_LPS_RF_OFF = 1,
BTC_LPS_RF_ON = 2
};
void rtw89_btc_ntfy_poweron(struct rtw89_dev *rtwdev); void rtw89_btc_ntfy_poweron(struct rtw89_dev *rtwdev);
void rtw89_btc_ntfy_poweroff(struct rtw89_dev *rtwdev); void rtw89_btc_ntfy_poweroff(struct rtw89_dev *rtwdev);
void rtw89_btc_ntfy_init(struct rtw89_dev *rtwdev, u8 mode); void rtw89_btc_ntfy_init(struct rtw89_dev *rtwdev, u8 mode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment