@@ -1544,10 +1544,10 @@ static void rtw_coex_action_bt_a2dp(struct rtw_dev *rtwdev)
else
table_case = 9;
- if (coex_stat->wl_gl_busy)
- tdma_case = 13;
- else
+ if (coex_stat->wl_connecting || !coex_stat->wl_gl_busy)
tdma_case = 14;
+ else
+ tdma_case = 13;
} else {
/* Non-Shared-Ant */
table_case = 112;
@@ -2270,6 +2270,11 @@ void rtw_coex_connect_notify(struct rtw_dev *rtwdev, u8 type)
} else if (type == COEX_ASSOCIATE_START) {
coex_stat->wl_hi_pri_task1 = true;
coex_stat->cnt_wl[COEX_CNT_WL_CONNPKT] = 2;
+ coex_stat->wl_connecting = true;
+ ieee80211_queue_delayed_work(rtwdev->hw,
+ &coex->wl_connecting_work, 2 * HZ);
+
+ rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], 2G start\n");
/* Force antenna setup for no scan result issue */
rtw_coex_set_ant_path(rtwdev, true, COEX_SET_ANT_2G);
@@ -2286,6 +2291,8 @@ void rtw_coex_connect_notify(struct rtw_dev *rtwdev, u8 type)
coex_stat->wl_hi_pri_task1 = false;
coex->freeze = false;
+ rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], 2G finish\n");
+
rtw_coex_run_coex(rtwdev, COEX_RSN_2GCONFINISH);
}
}
@@ -2633,6 +2640,19 @@ void rtw_coex_bt_remain_work(struct work_struct *work)
mutex_unlock(&rtwdev->mutex);
}
+void rtw_coex_wl_connecting_work(struct work_struct *work)
+{
+ struct rtw_dev *rtwdev = container_of(work, struct rtw_dev,
+ coex.wl_connecting_work.work);
+ struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat;
+
+ mutex_lock(&rtwdev->mutex);
+ coex_stat->wl_connecting = false;
+ rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], WL connecting stop!!\n");
+ rtw_coex_run_coex(rtwdev, COEX_RSN_WLSTATUS);
+ mutex_unlock(&rtwdev->mutex);
+}
+
#ifdef CONFIG_RTW88_DEBUGFS
#define INFO_SIZE 80
@@ -366,6 +366,7 @@ void rtw_coex_bt_reenable_work(struct work_struct *work);
void rtw_coex_defreeze_work(struct work_struct *work);
void rtw_coex_wl_remain_work(struct work_struct *work);
void rtw_coex_bt_remain_work(struct work_struct *work);
+void rtw_coex_wl_connecting_work(struct work_struct *work);
void rtw_coex_power_on_setting(struct rtw_dev *rtwdev);
void rtw_coex_init_hw_config(struct rtw_dev *rtwdev, bool wifi_only);
@@ -1153,6 +1153,7 @@ void rtw_core_stop(struct rtw_dev *rtwdev)
cancel_delayed_work_sync(&coex->defreeze_work);
cancel_delayed_work_sync(&coex->wl_remain_work);
cancel_delayed_work_sync(&coex->bt_remain_work);
+ cancel_delayed_work_sync(&coex->wl_connecting_work);
mutex_lock(&rtwdev->mutex);
@@ -1658,6 +1659,7 @@ int rtw_core_init(struct rtw_dev *rtwdev)
INIT_DELAYED_WORK(&coex->defreeze_work, rtw_coex_defreeze_work);
INIT_DELAYED_WORK(&coex->wl_remain_work, rtw_coex_wl_remain_work);
INIT_DELAYED_WORK(&coex->bt_remain_work, rtw_coex_bt_remain_work);
+ INIT_DELAYED_WORK(&coex->wl_connecting_work, rtw_coex_wl_connecting_work);
INIT_WORK(&rtwdev->c2h_work, rtw_c2h_work);
INIT_WORK(&rtwdev->fw_recovery_work, rtw_fw_recovery_work);
INIT_WORK(&rtwdev->ba_work, rtw_txq_ba_work);
@@ -1329,6 +1329,7 @@ struct rtw_coex_stat {
bool wl_cck_lock;
bool wl_cck_lock_pre;
bool wl_cck_lock_ever;
+ bool wl_connecting;
u32 bt_supported_version;
u32 bt_supported_feature;
@@ -1398,6 +1399,7 @@ struct rtw_coex {
struct delayed_work defreeze_work;
struct delayed_work wl_remain_work;
struct delayed_work bt_remain_work;
+ struct delayed_work wl_connecting_work;
};
#define DPK_RF_REG_NUM 7