Jelajahi Sumber

qcacld-3.0: Enhance logic for dwell time 2g

With this change,in concurrent mode
(SAP on 5g and peer connected + STA Scan ongoing),
active dwell time 2g is not reset to 0.

Change-Id: I20ace5561137a0dd8def497e3bbbbcbeede80ea5
CRs-Fixed: 2572918
Amruta Kulkarni 5 tahun lalu
induk
melakukan
59f6350e8b

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

@@ -3184,4 +3184,13 @@ uint32_t policy_mgr_get_mode_specific_conn_info(struct wlan_objmgr_psoc *psoc,
 						uint32_t *ch_freq_list,
 						uint8_t *vdev_id,
 						enum policy_mgr_con_mode mode);
+
+/**
+ * policy_mgr_is_sap_go_on_2g() - check if sap/go is on 2g
+ * @psoc: PSOC object information
+ *
+ * Return: true or false
+ */
+bool policy_mgr_is_sap_go_on_2g(struct wlan_objmgr_psoc *psoc);
+
 #endif /* __WLAN_POLICY_MGR_API_H */

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

@@ -4029,3 +4029,31 @@ QDF_STATUS policy_mgr_update_nan_vdev_mac_info(struct wlan_objmgr_psoc *psoc,
 
 	return status;
 }
+
+bool policy_mgr_is_sap_go_on_2g(struct wlan_objmgr_psoc *psoc)
+{
+	struct policy_mgr_psoc_priv_obj *pm_ctx;
+	uint32_t conn_index;
+	bool ret = false;
+
+	pm_ctx = policy_mgr_get_context(psoc);
+	if (!pm_ctx) {
+		policy_mgr_err("Invalid Context");
+		return ret;
+	}
+
+	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].mode == PM_SAP_MODE ||
+		     pm_conc_connection_list[conn_index].mode == PM_P2P_GO_MODE) &&
+			 pm_conc_connection_list[conn_index].freq <=
+				WLAN_REG_MAX_24GHZ_CHAN_FREQ &&
+			 pm_conc_connection_list[conn_index].in_use)
+			ret = true;
+	}
+	qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
+
+	return ret;
+}
+