From: Yan-Hsuan Chuang <yhchu...@realtek.com>

Before entering IPS, set the PTA control to default value and re-init it
after it leaves IPS to avoid running some redundant code in
run_coexist_mechanism.

Signed-off-by: Yan-Hsuan Chuang <yhchu...@realtek.com>
Signed-off-by: Larry Finger <larry.fin...@lwfinger.net>
Cc: Pkshih <pks...@realtek.com>
Cc: Birming Chiu <birm...@realtek.com>
Cc: Shaofu <sha...@realtek.com>
Cc: Steven Ting <stevent...@realtek.com>
---
 drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c 
b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
index 6b1ded6a0576..b8d5b73011ba 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
@@ -2473,7 +2473,7 @@ void ex_btc8821a1ant_ips_notify(struct btc_coexist 
*btcoexist, u8 type)
                btc8821a1ant_set_ant_path(btcoexist,
                                          BTC_ANT_PATH_BT, false, true);
                /* set PTA control */
-               btc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8);
+               btc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 0);
                btc8821a1ant_coex_table_with_type(btcoexist,
                                                  NORMAL_EXEC, 0);
        } else if (BTC_IPS_LEAVE == type) {
@@ -2481,7 +2481,9 @@ void ex_btc8821a1ant_ips_notify(struct btc_coexist 
*btcoexist, u8 type)
                         "[BTCoex], IPS LEAVE notify\n");
                coex_sta->under_ips = false;
 
-               btc8821a1ant_run_coexist_mechanism(btcoexist);
+               btc8821a1ant_init_hw_config(btcoexist, false, false);
+               btc8821a1ant_init_coex_dm(btcoexist);
+               btc8821a1ant_query_bt_info(btcoexist);
        }
 }
 
-- 
2.12.0

Reply via email to