|
@@ -3141,3 +3141,37 @@ bool policy_mgr_is_valid_for_channel_switch(struct wlan_objmgr_psoc *psoc,
|
|
|
policy_mgr_debug("Invalid channel for channel switch");
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+bool policy_mgr_is_sta_sap_scc(struct wlan_objmgr_psoc *psoc, uint8_t sap_ch)
|
|
|
+{
|
|
|
+ uint32_t conn_index;
|
|
|
+ bool is_scc = false;
|
|
|
+ struct policy_mgr_psoc_priv_obj *pm_ctx;
|
|
|
+
|
|
|
+ pm_ctx = policy_mgr_get_context(psoc);
|
|
|
+ if (!pm_ctx) {
|
|
|
+ policy_mgr_err("Invalid Context");
|
|
|
+ return is_scc;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!policy_mgr_mode_specific_connection_count(
|
|
|
+ psoc, PM_STA_MODE, NULL)) {
|
|
|
+ policy_mgr_debug("There is no STA+SAP conc");
|
|
|
+ return is_scc;
|
|
|
+ }
|
|
|
+
|
|
|
+ qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
|
|
|
+ for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS;
|
|
|
+ conn_index++) {
|
|
|
+ if (pm_conc_connection_list[conn_index].in_use &&
|
|
|
+ (pm_conc_connection_list[conn_index].mode ==
|
|
|
+ PM_STA_MODE) &&
|
|
|
+ (sap_ch == pm_conc_connection_list[conn_index].chan)) {
|
|
|
+ is_scc = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
|
|
+
|
|
|
+ return is_scc;
|
|
|
+}
|