فهرست منبع

qcacld-3.0: Do not pass mode as arg in policy_mgr_is_vdev_ll_sap

Do not pass mode as an argument in policy_mgr_is_vdev_ll_sap().
Use vde_id to get the mode for further condition check.

Change-Id: Ie12c31d4cf536ba6c80f0e28524b4c99c23600d1
CRs-Fixed: 3414277
Jyoti Kumari 2 سال پیش
والد
کامیت
da3f3f0403

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

@@ -1596,7 +1596,6 @@ policy_mgr_get_pcl_ch_for_sap_go_with_ll_sap_present(
  * policy_mgr_get_pcl_channel_for_ll_sap_concurrency() - Get pcl channel list
  * for LL SAP concurrency
  * @psoc: PSOC object information
- * @curr_mode: Device mode
  * @vdev_id: Vdev id
  * @pcl_channels: Preferred channel freq list
  * @pcl_weight: Weights of the PCL
@@ -1608,7 +1607,6 @@ policy_mgr_get_pcl_ch_for_sap_go_with_ll_sap_present(
 QDF_STATUS
 policy_mgr_get_pcl_channel_for_ll_sap_concurrency(
 					struct wlan_objmgr_psoc *psoc,
-					enum policy_mgr_con_mode curr_mode,
 					uint32_t vdev_id,
 					uint32_t *pcl_channels,
 					uint8_t *pcl_weight, uint32_t *len);
@@ -1616,14 +1614,12 @@ policy_mgr_get_pcl_channel_for_ll_sap_concurrency(
 /**
  * policy_mgr_is_vdev_ll_sap() - Check whether given vdev is LL SAP or not
  * @psoc: psoc object
- * @mode: device mode
  * @vdev_id: vdev id
  *
  * Return: true if it's present otherwise false
  */
 bool
 policy_mgr_is_vdev_ll_sap(struct wlan_objmgr_psoc *psoc,
-			  enum policy_mgr_con_mode mode,
 			  uint32_t vdev_id);
 
 /**

+ 14 - 7
components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c

@@ -4088,14 +4088,24 @@ bool policy_mgr_is_sta_chan_valid_for_connect_and_roam(
 
 bool
 policy_mgr_is_vdev_ll_sap(struct wlan_objmgr_psoc *psoc,
-			  enum policy_mgr_con_mode curr_mode,
 			  uint32_t vdev_id)
 {
 	struct wlan_objmgr_vdev *vdev;
 	bool is_ll_sap = false;
+	enum QDF_OPMODE mode;
+	struct policy_mgr_psoc_priv_obj *pm_ctx;
 	enum host_concurrent_ap_policy profile =
 					HOST_CONCURRENT_AP_POLICY_UNSPECIFIED;
-	if (curr_mode != PM_SAP_MODE)
+
+	pm_ctx = policy_mgr_get_context(psoc);
+	if (!pm_ctx) {
+		policy_mgr_err("Invalid pm_ctx");
+		return is_ll_sap;
+	}
+
+	mode = wlan_get_opmode_from_vdev_id(pm_ctx->pdev, vdev_id);
+
+	if (mode != QDF_SAP_MODE)
 		return is_ll_sap;
 
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
@@ -4190,7 +4200,6 @@ policy_mgr_get_pcl_ch_for_sap_go_with_ll_sap_present(
 	uint8_t weight_list[NUM_CHANNELS];
 	qdf_freq_t freq;
 	uint32_t vdev_id;
-	enum policy_mgr_con_mode mode;
 	bool is_ll_sap = 0;
 
 	pm_ctx = policy_mgr_get_context(psoc);
@@ -4207,8 +4216,7 @@ policy_mgr_get_pcl_ch_for_sap_go_with_ll_sap_present(
 
 		freq = pm_conc_connection_list[conn_idx].freq;
 		vdev_id = pm_conc_connection_list[conn_idx].vdev_id;
-		mode = pm_conc_connection_list[conn_idx].mode;
-		if (!policy_mgr_is_vdev_ll_sap(psoc, mode, vdev_id))
+		if (!policy_mgr_is_vdev_ll_sap(psoc, vdev_id))
 			continue;
 
 		is_ll_sap = 1;
@@ -4242,14 +4250,13 @@ policy_mgr_get_pcl_ch_for_sap_go_with_ll_sap_present(
 QDF_STATUS
 policy_mgr_get_pcl_channel_for_ll_sap_concurrency(
 					struct wlan_objmgr_psoc *psoc,
-					enum policy_mgr_con_mode curr_mode,
 					uint32_t vdev_id,
 					uint32_t *pcl_channels,
 					uint8_t *pcl_weight, uint32_t *len)
 {
 	uint32_t orig_len = *len;
 
-	if (policy_mgr_is_vdev_ll_sap(psoc, curr_mode, vdev_id)) {
+	if (policy_mgr_is_vdev_ll_sap(psoc, vdev_id)) {
 		/* Scenario: If there is some existing interface present and
 		 * LL SAP is coming up.
 		 * Filter pcl channel for LL SAP

+ 3 - 7
core/hdd/src/wlan_hdd_cfg80211.c

@@ -3557,7 +3557,6 @@ static bool wlan_hdd_check_is_acs_request_same(struct hdd_adapter *adapter,
  * @sap_config: Pointer to sap_config
  * @psoc: Pointer to psoc
  * @pdev: Pointer to pdev
- * @curr_mode: Current mode
  * @vdev_id: Vdev Id
  *
  * This function will remove passive/dfs acs channel for low latency SAP
@@ -3569,13 +3568,12 @@ static void hdd_remove_passive_dfs_acs_channel_for_ll_sap(
 					struct sap_config *sap_config,
 					struct wlan_objmgr_psoc *psoc,
 					struct wlan_objmgr_pdev *pdev,
-					enum policy_mgr_con_mode curr_mode,
 					uint8_t vdev_id)
 {
 	uint32_t i, ch_cnt = 0;
 	uint32_t freq = 0;
 
-	if (!policy_mgr_is_vdev_ll_sap(psoc, curr_mode, vdev_id))
+	if (!policy_mgr_is_vdev_ll_sap(psoc, vdev_id))
 		return;
 
 	for (i = 0; i < sap_config->acs_cfg.ch_list_count; i++) {
@@ -3859,7 +3857,6 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 	hdd_remove_passive_dfs_acs_channel_for_ll_sap(sap_config,
 						      hdd_ctx->psoc,
 						      hdd_ctx->pdev,
-						      pm_mode,
 						      adapter->vdev_id);
 
 	/* consult policy manager to get PCL */
@@ -3871,7 +3868,7 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 					NUM_CHANNELS);
 
 	policy_mgr_get_pcl_channel_for_ll_sap_concurrency(
-				hdd_ctx->psoc, pm_mode, adapter->vdev_id,
+				hdd_ctx->psoc, adapter->vdev_id,
 				sap_config->acs_cfg.pcl_chan_freq,
 				sap_config->acs_cfg.pcl_channels_weight_list,
 				&sap_config->acs_cfg.pcl_ch_count);
@@ -3901,8 +3898,7 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 		if (!sap_config->acs_cfg.ch_list_count &&
 		    sap_config->acs_cfg.master_ch_list_count &&
 		    !is_vendor_unsafe_ch_present &&
-		    !policy_mgr_is_vdev_ll_sap(hdd_ctx->psoc, pm_mode,
-					       adapter->vdev_id))
+		    !policy_mgr_is_vdev_ll_sap(hdd_ctx->psoc, adapter->vdev_id))
 			wlan_hdd_handle_zero_acs_list(
 				hdd_ctx,
 				sap_config->acs_cfg.freq_list,

+ 1 - 3
core/mac/src/pe/sch/sch_message.c

@@ -537,9 +537,7 @@ void sch_edca_profile_update(struct mac_context *mac, struct pe_session *pe_sess
 		sch_qos_concurrency_update();
 
 		if (policy_mgr_is_vdev_ll_sap(
-				mac->psoc,
-				policy_mgr_convert_device_mode_to_qdf_type(
-				pe_session->opmode), pe_session->vdev_id))
+				mac->psoc, pe_session->vdev_id))
 			sch_qos_update_edca_pifs_param_for_ll_sap(
 							mac,
 							pe_session->vdev_id);

+ 2 - 7
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -1752,14 +1752,9 @@ void populate_dot11f_qcn_ie(struct mac_context *mac,
 	}
 
 	populate_dot11f_qcn_ie_he_params(mac, pe_session, qcn_ie, attr_id);
-	if (policy_mgr_is_vdev_ll_sap(
-				mac->psoc,
-				policy_mgr_convert_device_mode_to_qdf_type(
-				pe_session->opmode), pe_session->vdev_id)) {
+	if (policy_mgr_is_vdev_ll_sap(mac->psoc, pe_session->vdev_id)) {
 		pe_debug("Populate edca/pifs param ie for ll sap");
-		populate_dot11f_edca_pifs_param_set(
-					mac,
-					qcn_ie);
+		populate_dot11f_edca_pifs_param_set(mac, qcn_ie);
 	}
 }
 

+ 1 - 5
core/sme/src/csr/csr_util.c

@@ -618,11 +618,7 @@ uint16_t csr_check_concurrent_channel_overlap(struct mac_context *mac_ctx,
 			QDF_MCC_TO_SCC_SWITCH_DISABLE)
 		return 0;
 
-	op_mode = wlan_get_opmode_vdev_id(mac_ctx->pdev, vdev_id);
-	if (policy_mgr_is_vdev_ll_sap(
-			mac_ctx->psoc,
-			policy_mgr_convert_device_mode_to_qdf_type(op_mode),
-			vdev_id))
+	if (policy_mgr_is_vdev_ll_sap(mac_ctx->psoc, vdev_id))
 		return 0;
 
 	if (sap_ch_freq != 0) {