فهرست منبع

qcacld-3.0: Postpone SAP force SCC if set link in progress

After ML STA link state changes, the connection table will
be updated. So defer the force SCC a few second to use
updated table to do force SCC.

Change-Id: I453b1a8d2707bb635f7c1d8d5b397811bf3b4f7b
CRs-Fixed: 3502411
Liangwei Dong 1 سال پیش
والد
کامیت
efd112bf15

+ 14 - 0
components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h

@@ -1214,6 +1214,14 @@ bool
 policy_mgr_ml_link_vdev_need_to_be_disabled(struct wlan_objmgr_psoc *psoc,
 					    struct wlan_objmgr_vdev *vdev);
 
+/**
+ * policy_mgr_is_set_link_in_progress() - Check set link in progress or not
+ * @psoc: psoc pointer
+ *
+ * Return: true if set link in progress
+ */
+bool policy_mgr_is_set_link_in_progress(struct wlan_objmgr_psoc *psoc);
+
 /**
  * policy_mgr_wait_for_set_link_update() - Wait for set/clear link response
  * @psoc: psoc pointer
@@ -1251,6 +1259,12 @@ policy_mgr_move_vdev_from_connection_to_disabled_tbl(
 						struct wlan_objmgr_psoc *psoc,
 						uint8_t vdev_id) {}
 
+static inline bool
+policy_mgr_is_set_link_in_progress(struct wlan_objmgr_psoc *psoc)
+{
+	return false;
+}
+
 static inline QDF_STATUS
 policy_mgr_wait_for_set_link_update(struct wlan_objmgr_psoc *psoc)
 {

+ 7 - 0
components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c

@@ -2451,6 +2451,13 @@ static void __policy_mgr_check_sta_ap_concurrent_ch_intf(
 				       SAP_CONC_CHECK_DEFER_TIMEOUT_MS);
 		goto end;
 	}
+	if (policy_mgr_is_set_link_in_progress(pm_ctx->psoc)) {
+		policy_mgr_debug("defer sap conc check to a later time due to ml sta set link in progress");
+		qdf_delayed_work_start(&pm_ctx->sta_ap_intf_check_work,
+				       SAP_CONC_CHECK_DEFER_TIMEOUT_MS);
+		goto end;
+	}
+
 	if (pm_ctx->hdd_cbacks.hdd_is_chan_switch_in_progress &&
 	    pm_ctx->hdd_cbacks.hdd_is_chan_switch_in_progress()) {
 		policy_mgr_debug("wait as channel switch is already in progress");

+ 19 - 1
components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -4128,11 +4128,25 @@ policy_mgr_get_link_in_progress(struct policy_mgr_psoc_priv_obj *pm_ctx)
 	qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
 	value = pm_ctx->set_link_in_progress;
 	qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
+	if (value)
+		policy_mgr_debug("set_link_in_progress %d", value);
 
-	policy_mgr_debug("set_link_in_progress %d", value);
 	return value;
 }
 
+bool policy_mgr_is_set_link_in_progress(struct wlan_objmgr_psoc *psoc)
+{
+	struct policy_mgr_psoc_priv_obj *pm_ctx;
+
+	pm_ctx = policy_mgr_get_context(psoc);
+	if (!pm_ctx) {
+		policy_mgr_err("Invalid Context");
+		return false;
+	}
+
+	return policy_mgr_get_link_in_progress(pm_ctx);
+}
+
 /*
  * policy_mgr_trigger_roam_on_link_removal() - Trigger roam on link removal
  * @vdev: vdev object
@@ -4363,6 +4377,10 @@ policy_mgr_handle_link_enable_disable_resp(struct wlan_objmgr_vdev *vdev,
 complete_evnt:
 	policy_mgr_set_link_in_progress(pm_ctx, false);
 	qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
+
+	/* reschedule force scc workqueue after link state changes */
+	if (req && resp && !resp->status)
+		policy_mgr_check_concurrent_intf_and_restart_sap(psoc, false);
 }
 
 #else