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

qcacld-3.0: Support Low Latency SAP + STA/GC concurrency

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

Change-Id: I8e1c62dfea3c27306e338392448f5cc6eed912aa
CRs-Fixed: 3302763
Jyoti Kumari 2 жил өмнө
parent
commit
8a1899b457

+ 8 - 0
components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c

@@ -893,5 +893,13 @@ QDF_STATUS if_mgr_validate_candidate(struct wlan_objmgr_vdev *vdev,
 	if (conc_freq)
 	if (conc_freq)
 		return QDF_STATUS_E_INVAL;
 		return QDF_STATUS_E_INVAL;
 
 
+	/* Check low latency SAP and STA/GC concurrency are valid or not */
+	if (!policy_mgr_is_ll_sap_concurrency_valid(psoc, chan_freq, mode)) {
+		ifmgr_debug("STA connection not allowed on bssid: "QDF_MAC_ADDR_FMT" with freq: %d due to LL SAP present",
+			    QDF_MAC_ADDR_REF(candidate_info->peer_addr.bytes),
+			    chan_freq);
+		return QDF_STATUS_E_INVAL;
+	}
+
 	return QDF_STATUS_SUCCESS;
 	return QDF_STATUS_SUCCESS;
 }
 }

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

@@ -4614,4 +4614,17 @@ QDF_STATUS policy_mgr_get_sbs_cfg(struct wlan_objmgr_psoc *psoc, bool *sbs);
  */
  */
 qdf_freq_t policy_mgr_get_ll_sap_freq(struct wlan_objmgr_psoc *psoc);
 qdf_freq_t policy_mgr_get_ll_sap_freq(struct wlan_objmgr_psoc *psoc);
 
 
+/**
+ * policy_mgr_is_ll_sap_concurrency_valid() - Function to check whether
+ * low latency SAP + STA/SAP/GC/GO concurrency allowed or not
+ * @psoc: PSOC object
+ * @freq: Channel frequency
+ * @mode: Device mode
+ *
+ * Return: True if concurrency are allowed otherwise false
+ *
+ */
+bool policy_mgr_is_ll_sap_concurrency_valid(struct wlan_objmgr_psoc *psoc,
+					    qdf_freq_t freq,
+					    enum policy_mgr_con_mode mode);
 #endif /* __WLAN_POLICY_MGR_API_H */
 #endif /* __WLAN_POLICY_MGR_API_H */

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

@@ -8922,3 +8922,32 @@ qdf_freq_t policy_mgr_get_ll_sap_freq(struct wlan_objmgr_psoc *psoc)
 
 
 	return freq;
 	return freq;
 }
 }
+
+bool policy_mgr_is_ll_sap_concurrency_valid(struct wlan_objmgr_psoc *psoc,
+					    qdf_freq_t freq,
+					    enum policy_mgr_con_mode mode)
+{
+	qdf_freq_t ll_sap_freq;
+
+	ll_sap_freq = policy_mgr_get_ll_sap_freq(psoc);
+	if (!ll_sap_freq)
+		return true;
+
+	/*
+	 * Scenario: When low latency SAP with 5GHz channel(whose
+	 * profile is set as gaming or lossless audio) is present
+	 * on SBS/DBS hardware and the other interface like
+	 * STA/SAP/GC/GO trying to form connection.
+	 * Allow connection on those freq which are mutually exclusive
+	 * to LL SAP mac
+	 */
+
+	if (policy_mgr_2_freq_always_on_same_mac(psoc, ll_sap_freq,
+						 freq)) {
+		policy_mgr_debug("Invalid LL-SAP concurrency for SBS/DBS hw, ll-sap freq %d, conc_freq %d, conc_mode %d",
+				 ll_sap_freq, freq, mode);
+		return false;
+	}
+
+	return true;
+}