Эх сурвалжийг харах

qcacld-3.0: Support Low Latency SAP + SAP/GO concurrency

Add a support to check if low latency SAP is present on 5 GHz
channel then do not allow SAP/GO to come up on 5 GHz for
both gaming and lossless audio profile.

Change-Id: Ibb9e3365522beec541f70c6c45b8cb68405fd3bc
CRs-Fixed: 3294748
Jyoti Kumari 2 жил өмнө
parent
commit
a142d2edde

+ 24 - 0
components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -6155,6 +6155,25 @@ static bool policy_mgr_is_third_conn_sta_p2p_p2p_valid(
 
 	return true;
 }
+
+static bool policy_mgr_is_sap_go_allowed_with_ll_sap(
+					struct wlan_objmgr_psoc *psoc,
+					qdf_freq_t freq,
+					enum policy_mgr_con_mode mode)
+{
+	/**
+	 * Scenario: When ll SAP(whose profile is set as gaming or
+	 * lossless audio) is present on 5GHz channel and SAP/GO
+	 * is trying to come up.
+	 * Validate the ch_freq of SAP/GO for both DBS and SBS case
+	 */
+	if ((mode == PM_SAP_MODE || mode == PM_P2P_GO_MODE) &&
+	    !policy_mgr_is_ll_sap_concurrency_valid(psoc, freq, mode))
+		return false;
+
+	return true;
+}
+
 bool policy_mgr_is_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
 				       enum policy_mgr_con_mode mode,
 				       uint32_t ch_freq,
@@ -6301,6 +6320,11 @@ bool policy_mgr_is_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
 		return status;
 	}
 
+	/* Validate ll sap + sap/go concurrency */
+	if (!policy_mgr_is_sap_go_allowed_with_ll_sap(psoc, ch_freq, mode)) {
+		policy_mgr_err("LL SAP concurrency is not valid");
+		return status;
+	}
 	status = true;
 
 	return status;