Commit 1f88d59e authored by Yan-Hsuan Chuang's avatar Yan-Hsuan Chuang Committed by Kalle Valo

rtlwifi: btcoex: 21a 2ant: run mechanism if status changes or auto adjust is set

The driver will periodically ask the coex, and the coex only runs the
mechanism when the status was changed or the auto adjust is set.
Signed-off-by: default avatarYan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Cc: Pkshih <pkshih@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent eee87f26
...@@ -3485,14 +3485,14 @@ static void btc8821a2ant_run_coexist_mechanism(struct btc_coexist *btcoexist) ...@@ -3485,14 +3485,14 @@ static void btc8821a2ant_run_coexist_mechanism(struct btc_coexist *btcoexist)
if (btc8821a2ant_is_common_action(btcoexist)) { if (btc8821a2ant_is_common_action(btcoexist)) {
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], Action 2-Ant common\n"); "[BTCoex], Action 2-Ant common\n");
coex_dm->reset_tdma_adjust = true; coex_dm->auto_tdma_adjust = true;
} else { } else {
if (coex_dm->cur_algorithm != coex_dm->pre_algorithm) { if (coex_dm->cur_algorithm != coex_dm->pre_algorithm) {
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], pre_algorithm = %d, cur_algorithm = %d\n", "[BTCoex], pre_algorithm = %d, cur_algorithm = %d\n",
coex_dm->pre_algorithm, coex_dm->pre_algorithm,
coex_dm->cur_algorithm); coex_dm->cur_algorithm);
coex_dm->reset_tdma_adjust = true; coex_dm->auto_tdma_adjust = false;
} }
switch (coex_dm->cur_algorithm) { switch (coex_dm->cur_algorithm) {
case BT_8821A_2ANT_COEX_ALGO_SCO: case BT_8821A_2ANT_COEX_ALGO_SCO:
...@@ -4200,7 +4200,14 @@ void ex_btc8821a2ant_periodical(struct btc_coexist *btcoexist) ...@@ -4200,7 +4200,14 @@ void ex_btc8821a2ant_periodical(struct btc_coexist *btcoexist)
"[BTCoex], ****************************************************************\n"); "[BTCoex], ****************************************************************\n");
} }
btc8821a2ant_query_bt_info(btcoexist); if (btcoexist->auto_report_2ant) {
btc8821a2ant_monitor_bt_ctr(btcoexist); btc8821a2ant_query_bt_info(btcoexist);
btc8821a2ant_monitor_wifi_ctr(btcoexist); } else {
btc8821a2ant_monitor_bt_ctr(btcoexist);
btc8821a2ant_monitor_wifi_ctr(btcoexist);
if (btc8821a2ant_is_wifi_status_changed(btcoexist) ||
coex_dm->auto_tdma_adjust)
btc8821a2ant_run_coexist_mechanism(btcoexist);
}
} }
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