Explorar el Código

qcacld-3.0: change wma code for policy manager restructuring

Modify wma code to cope with the policy manager moving to host
common.

Change-Id: Ie75b3da1291fcf1126a9e269f7b3b7974f9992a1
CRs-Fixed: 2009818
Tushnim Bhattacharyya hace 8 años
padre
commit
51258a79c2

+ 2 - 4
core/wma/inc/wma.h

@@ -51,7 +51,7 @@
 #include "cds_ieee80211_common.h"
 #include "wlan_objmgr_psoc_obj.h"
 #include <cdp_txrx_handle.h>
-#include "wlan_policy_mgr_api.h"
+#include <wlan_policy_mgr_api.h>
 
 /* Platform specific configuration for max. no. of fragments */
 #define QCA_OL_11AC_TX_MAX_FRAGS            2
@@ -1490,7 +1490,6 @@ typedef struct {
 
 	/* OCB request contexts */
 	struct sir_ocb_config *ocb_config_req;
-	struct dual_mac_config dual_mac_cfg;
 	uint8_t max_scan;
 	uint16_t self_gen_frm_pwr;
 	bool tx_chain_mask_cck;
@@ -2153,7 +2152,7 @@ QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
 		struct wmi_pcl_chan_weights *msg);
 
 QDF_STATUS wma_send_pdev_set_hw_mode_cmd(tp_wma_handle wma_handle,
-		struct sir_hw_mode *msg);
+		struct policy_mgr_hw_mode *msg);
 QDF_STATUS wma_get_scan_id(uint32_t *scan_id);
 
 QDF_STATUS wma_send_pdev_set_dual_mac_config(tp_wma_handle wma_handle,
@@ -2202,7 +2201,6 @@ static inline QDF_STATUS wma_set_gateway_params(tp_wma_handle wma,
 QDF_STATUS wma_lro_config_cmd(void *handle,
 	 struct cdp_lro_hash_config *wma_lro_cmd);
 
-bool wma_is_current_hwmode_dbs(void);
 void
 wma_indicate_err(enum ol_rx_err_type err_type,
 	 struct ol_error_info *err_info);

+ 0 - 41
core/wma/inc/wma_api.h

@@ -37,7 +37,6 @@
 #include "htc_api.h"
 #endif
 #include "lim_global.h"
-#include "cds_concurrency.h"
 #include "cds_utils.h"
 #include "scheduler_api.h"
 #include "wlan_policy_mgr_api.h"
@@ -165,49 +164,10 @@ tSirRetStatus wma_post_ctrl_msg(tpAniSirGlobal pMac,
 void wma_register_wow_wakeup_events(WMA_HANDLE handle, uint8_t vdev_id,
 					uint8_t vdev_type, uint8_t sub_type);
 void wma_register_wow_default_patterns(WMA_HANDLE handle, uint8_t vdev_id);
-int8_t wma_get_hw_mode_idx_from_dbs_hw_list(enum hw_mode_ss_config mac0_ss,
-		enum hw_mode_bandwidth mac0_bw,
-		enum hw_mode_ss_config mac1_ss,
-		enum hw_mode_bandwidth mac1_bw,
-		enum hw_mode_dbs_capab dbs,
-		enum hw_mode_agile_dfs_capab dfs,
-		enum hw_mode_sbs_capab sbs);
-QDF_STATUS wma_get_hw_mode_from_idx(uint32_t idx,
-		struct sir_hw_mode_params *hw_mode);
-int8_t wma_get_num_dbs_hw_modes(void);
-bool wma_is_hw_dbs_capable(void);
-bool wma_is_hw_sbs_capable(void);
-bool wma_is_hw_dbs_2x2_capable(void);
 int8_t wma_get_mac_id_of_vdev(uint32_t vdev_id);
 void wma_update_intf_hw_mode_params(uint32_t vdev_id, uint32_t mac_id,
 				uint32_t cfgd_hw_mode_index);
-QDF_STATUS wma_get_old_and_new_hw_index(uint32_t *old_hw_mode_index,
-		uint32_t *new_hw_mode_index);
 void wma_set_dbs_capability_ut(uint32_t dbs);
-QDF_STATUS wma_get_dbs_hw_modes(bool *one_by_one_dbs, bool *two_by_two_dbs);
-QDF_STATUS wma_get_current_hw_mode(struct sir_hw_mode_params *hw_mode);
-bool wma_is_dbs_enable(void);
-enum cds_hw_mode_change
-wma_get_cds_hw_mode_change_from_hw_mode_index(uint32_t hw_mode_index);
-
-QDF_STATUS wma_get_updated_scan_config(uint32_t *scan_config,
-		bool dbs_scan,
-		bool dbs_plus_agile_scan,
-		bool single_mac_scan_with_dfs);
-QDF_STATUS wma_get_updated_fw_mode_config(uint32_t *fw_mode_config,
-		bool dbs,
-		bool agile_dfs);
-bool wma_get_dbs_scan_config(void);
-bool wma_get_dbs_plus_agile_scan_config(void);
-bool wma_get_single_mac_scan_with_dfs_config(void);
-bool wma_get_dbs_config(void);
-bool wma_get_agile_dfs_config(void);
-bool wma_is_dual_mac_disabled_in_ini(void);
-bool wma_get_prev_dbs_config(void);
-bool wma_get_prev_agile_dfs_config(void);
-bool wma_get_prev_dbs_scan_config(void);
-bool wma_get_prev_dbs_plus_agile_scan_config(void);
-bool wma_get_prev_single_mac_scan_with_dfs_config(void);
 QDF_STATUS wma_get_caps_for_phyidx_hwmode(struct wma_caps_per_phy *caps_per_phy,
 		enum hw_mode_dbs_capab hw_mode, enum cds_band_type band);
 bool wma_is_rx_ldpc_supported_for_channel(uint32_t channel);
@@ -215,7 +175,6 @@ bool wma_is_rx_ldpc_supported_for_channel(uint32_t channel);
 #if defined(FEATURE_LRO)
 int wma_lro_init(struct cdp_lro_hash_config *lro_config);
 #endif
-bool wma_is_scan_simultaneous_capable(void);
 
 QDF_STATUS wma_remove_beacon_filter(WMA_HANDLE wma,
 				struct beacon_filter_param *filter_params);

+ 29 - 20
core/wma/src/wma_dev_if.c

@@ -52,7 +52,6 @@
 #include "lim_session_utils.h"
 
 #include "cds_utils.h"
-#include "cds_concurrency.h"
 
 #if !defined(REMOVE_PKT_LOG)
 #include "pktlog_ac.h"
@@ -72,7 +71,7 @@
 #include <cdp_txrx_cmn.h>
 #include <cdp_txrx_misc.h>
 
-#include "cds_concurrency.h"
+#include "wlan_policy_mgr_api.h"
 #include "wma_nan_datapath.h"
 #include "wlan_tgt_def_config.h"
 #include <cdp_txrx_handle.h>
@@ -820,7 +819,8 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
 	if (NULL == mac_ctx) {
 		wma_release_wmi_resp_wakelock(wma);
 		WMA_LOGE("%s: Failed to get mac_ctx", __func__);
-		cds_set_do_hw_mode_change_flag(false);
+		policy_mgr_set_do_hw_mode_change_flag(
+			wma->psoc, false);
 		return -EINVAL;
 	}
 #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
@@ -832,14 +832,16 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
 	param_buf = (WMI_VDEV_START_RESP_EVENTID_param_tlvs *) cmd_param_info;
 	if (!param_buf) {
 		WMA_LOGE("Invalid start response event buffer");
-		cds_set_do_hw_mode_change_flag(false);
+		policy_mgr_set_do_hw_mode_change_flag(
+			wma->psoc, false);
 		return -EINVAL;
 	}
 
 	resp_event = param_buf->fixed_param;
 	if (!resp_event) {
 		WMA_LOGE("Invalid start response event buffer");
-		cds_set_do_hw_mode_change_flag(false);
+		policy_mgr_set_do_hw_mode_change_flag(
+			wma->psoc, false);
 		return -EINVAL;
 	}
 
@@ -895,7 +897,8 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
 			    wma->interfaces[resp_event->vdev_id].bssid,
 				&param) != QDF_STATUS_SUCCESS) {
 			WMA_LOGE("%s : failed to send vdev up", __func__);
-			cds_set_do_hw_mode_change_flag(false);
+			policy_mgr_set_do_hw_mode_change_flag(
+				wma->psoc, false);
 			return -EEXIST;
 		}
 		qdf_atomic_set(&wma->interfaces[resp_event->vdev_id].
@@ -920,7 +923,8 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
 	if (!req_msg) {
 		WMA_LOGE("%s: Failed to lookup request message for vdev %d",
 			 __func__, resp_event->vdev_id);
-		cds_set_do_hw_mode_change_flag(false);
+		policy_mgr_set_do_hw_mode_change_flag(
+			wma->psoc, false);
 		return -EINVAL;
 	}
 
@@ -938,7 +942,8 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
 		if (!params) {
 			WMA_LOGE("%s: channel switch params is NULL for vdev %d",
 				__func__, resp_event->vdev_id);
-			cds_set_do_hw_mode_change_flag(false);
+			policy_mgr_set_do_hw_mode_change_flag(
+				wma->psoc, false);
 			return -EINVAL;
 		}
 
@@ -969,7 +974,8 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
 					 __func__, resp_event->vdev_id);
 				wma_vdev_set_mlme_state(wma,
 					resp_event->vdev_id, WLAN_VDEV_S_STOP);
-				cds_set_do_hw_mode_change_flag(false);
+				policy_mgr_set_do_hw_mode_change_flag(
+					wma->psoc, false);
 			} else {
 				wma_vdev_set_mlme_state(wma,
 					resp_event->vdev_id, WLAN_VDEV_S_RUN);
@@ -989,7 +995,8 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
 					     iface->bssid,
 					     &param) != QDF_STATUS_SUCCESS) {
 			WMA_LOGE(FL("failed to send vdev up"));
-			cds_set_do_hw_mode_change_flag(false);
+			policy_mgr_set_do_hw_mode_change_flag(
+				wma->psoc, false);
 			return -EEXIST;
 		}
 		wma_vdev_set_mlme_state(wma, resp_event->vdev_id,
@@ -2886,7 +2893,7 @@ static void wma_add_bss_ap_mode(tp_wma_handle wma, tpAddBssParams add_bss)
 	uint8_t vdev_id, peer_id;
 	QDF_STATUS status;
 	int8_t maxTxPower;
-	struct sir_hw_mode_params hw_mode = {0};
+	struct policy_mgr_hw_mode_params hw_mode = {0};
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 
 	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
@@ -2962,9 +2969,9 @@ static void wma_add_bss_ap_mode(tp_wma_handle wma, tpAddBssParams add_bss)
 	if (req.ssid.length > 0)
 		qdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId,
 			     add_bss->ssId.length);
-	status = wma_get_current_hw_mode(&hw_mode);
+	status = policy_mgr_get_current_hw_mode(wma->psoc, &hw_mode);
 	if (!QDF_IS_STATUS_SUCCESS(status))
-		WMA_LOGE("wma_get_current_hw_mode failed");
+		WMA_LOGE("policy_mgr_get_current_hw_mode failed");
 
 	if ((add_bss->nss == 2) && !hw_mode.dbs_cap) {
 		req.preferred_rx_streams = 2;
@@ -3015,7 +3022,7 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
 	uint8_t vdev_id, peer_id;
 	QDF_STATUS status;
 	tSetBssKeyParams key_info;
-	struct sir_hw_mode_params hw_mode = {0};
+	struct policy_mgr_hw_mode_params hw_mode = {0};
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 
 	vdev = wma_find_vdev_by_addr(wma, add_bss->selfMacAddr, &vdev_id);
@@ -3111,9 +3118,9 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
 	if (req.ssid.length > 0)
 		qdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId,
 			     add_bss->ssId.length);
-	status = wma_get_current_hw_mode(&hw_mode);
+	status = policy_mgr_get_current_hw_mode(wma->psoc, &hw_mode);
 	if (!QDF_IS_STATUS_SUCCESS(status))
-		WMA_LOGE("wma_get_current_hw_mode failed");
+		WMA_LOGE("policy_mgr_get_current_hw_mode failed");
 
 	if ((add_bss->nss == 2) && !hw_mode.dbs_cap) {
 		req.preferred_rx_streams = 2;
@@ -3173,7 +3180,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
 	int pps_val = 0;
 	bool roam_synch_in_progress = false;
 	tpAniSirGlobal pMac = cds_get_context(QDF_MODULE_ID_PE);
-	struct sir_hw_mode_params hw_mode = {0};
+	struct policy_mgr_hw_mode_params hw_mode = {0};
 	bool peer_assoc_sent = false;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 
@@ -3295,9 +3302,10 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
 			if (req.ssid.length > 0)
 				qdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId,
 					     add_bss->ssId.length);
-			status = wma_get_current_hw_mode(&hw_mode);
+			status = policy_mgr_get_current_hw_mode(wma->psoc,
+				&hw_mode);
 			if (!QDF_IS_STATUS_SUCCESS(status))
-				WMA_LOGE("wma_get_current_hw_mode failed");
+				WMA_LOGE("policy_mgr_get_current_hw_mode failed");
 
 			if ((add_bss->nss == 2) && !hw_mode.dbs_cap) {
 				req.preferred_rx_streams = 2;
@@ -4020,7 +4028,8 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
 				     &param) != QDF_STATUS_SUCCESS) {
 		WMA_LOGP("%s: Failed to send vdev up cmd: vdev %d bssid %pM",
 			 __func__, params->smesessionId, params->bssId);
-		cds_set_do_hw_mode_change_flag(false);
+		policy_mgr_set_do_hw_mode_change_flag(
+			wma->psoc, false);
 		status = QDF_STATUS_E_FAILURE;
 	} else {
 		wma_set_vdev_mgmt_rate(wma, params->smesessionId);

+ 26 - 64
core/wma/src/wma_main.c

@@ -73,7 +73,7 @@
 #include "wma_internal.h"
 
 #include "wma_ocb.h"
-#include "cds_concurrency.h"
+#include "wlan_policy_mgr_api.h"
 #include "cdp_txrx_cfg.h"
 #include "cdp_txrx_flow_ctrl_legacy.h"
 #include "cdp_txrx_flow_ctrl_v2.h"
@@ -2794,6 +2794,8 @@ static int wma_pdev_set_hw_mode_resp_evt_handler(void *handle,
 			wma->old_hw_mode_index = wma->new_hw_mode_index;
 			wma->new_hw_mode_index = wmi_event->cfgd_hw_mode_index;
 		}
+		policy_mgr_update_hw_mode_index(wma->psoc,
+		wmi_event->cfgd_hw_mode_index);
 	}
 
 	WMA_LOGI("%s: Updated: old_hw_mode_index:%d new_hw_mode_index:%d",
@@ -2870,6 +2872,10 @@ void wma_process_pdev_hw_mode_trans_ind(void *handle,
 	}
 	wma->old_hw_mode_index = fixed_param->old_hw_mode_index;
 	wma->new_hw_mode_index = fixed_param->new_hw_mode_index;
+	policy_mgr_update_new_hw_mode_index(wma->psoc,
+		fixed_param->new_hw_mode_index);
+	policy_mgr_update_old_hw_mode_index(wma->psoc,
+		fixed_param->old_hw_mode_index);
 
 	WMA_LOGI("%s: Updated: old_hw_mode_index:%d new_hw_mode_index:%d",
 		__func__, wma->old_hw_mode_index, wma->new_hw_mode_index);
@@ -2981,14 +2987,8 @@ static int wma_pdev_set_dual_mode_config_resp_evt_handler(void *handle,
 	dual_mac_cfg_resp->status = wmi_event->status;
 
 	if (SET_HW_MODE_STATUS_OK == dual_mac_cfg_resp->status) {
-		wma->dual_mac_cfg.prev_scan_config =
-			wma->dual_mac_cfg.cur_scan_config;
-		wma->dual_mac_cfg.prev_fw_mode_config =
-			wma->dual_mac_cfg.cur_fw_mode_config;
-		wma->dual_mac_cfg.cur_scan_config =
-			wma->dual_mac_cfg.req_scan_config;
-		wma->dual_mac_cfg.cur_fw_mode_config =
-			wma->dual_mac_cfg.req_fw_mode_config;
+		policy_mgr_update_dbs_scan_config(wma->psoc);
+		policy_mgr_update_dbs_fw_config(wma->psoc);
 	}
 
 	/* Pass the message to PE */
@@ -4470,6 +4470,7 @@ static void wma_dump_dbs_hw_mode(tp_wma_handle wma_handle)
 			WMA_HW_MODE_DBS_MODE_GET(param),
 			WMA_HW_MODE_SBS_MODE_GET(param));
 	}
+	policy_mgr_dump_dbs_hw_mode(wma_handle->psoc);
 }
 
 /**
@@ -4487,61 +4488,14 @@ static void wma_init_scan_fw_mode_config(tp_wma_handle wma_handle,
 					 uint32_t scan_config,
 					 uint32_t fw_config)
 {
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
-
 	WMA_LOGD("%s: Enter", __func__);
 
-	if (!mac) {
-		WMA_LOGE("%s: Invalid mac handle", __func__);
-		return;
-	}
-
 	if (!wma_handle) {
 		WMA_LOGE("%s: Invalid WMA handle", __func__);
 		return;
 	}
 
-	wma_handle->dual_mac_cfg.cur_scan_config = 0;
-	wma_handle->dual_mac_cfg.cur_fw_mode_config = 0;
-
-	/* If dual mac features are disabled in the INI, we
-	 * need not proceed further
-	 */
-	if (mac->dual_mac_feature_disable) {
-		WMA_LOGE("%s: Disabling dual mac capabilities", __func__);
-		/* All capabilites are initialized to 0. We can return */
-		goto done;
-	}
-
-	/* Initialize concurrent_scan_config_bits with default FW value */
-	WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(
-			wma_handle->dual_mac_cfg.cur_scan_config,
-			WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_config));
-	WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(
-			wma_handle->dual_mac_cfg.cur_scan_config,
-			WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_config));
-	WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(
-			wma_handle->dual_mac_cfg.cur_scan_config,
-			WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_config));
-
-	/* Initialize fw_mode_config_bits with default FW value */
-	WMI_DBS_FW_MODE_CFG_DBS_SET(
-			wma_handle->dual_mac_cfg.cur_fw_mode_config,
-			WMI_DBS_FW_MODE_CFG_DBS_GET(fw_config));
-	WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(
-			wma_handle->dual_mac_cfg.cur_fw_mode_config,
-			WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_config));
-done:
-	/* Initialize the previous scan/fw mode config */
-	wma_handle->dual_mac_cfg.prev_scan_config =
-		wma_handle->dual_mac_cfg.cur_scan_config;
-	wma_handle->dual_mac_cfg.prev_fw_mode_config =
-		wma_handle->dual_mac_cfg.cur_fw_mode_config;
-
-	WMA_LOGD("%s: cur_scan_config:%x cur_fw_mode_config:%x",
-			__func__,
-			wma_handle->dual_mac_cfg.cur_scan_config,
-			wma_handle->dual_mac_cfg.cur_fw_mode_config);
+	policy_mgr_init_dbs_config(wma_handle->psoc, scan_config, fw_config);
 }
 
 /**
@@ -4612,7 +4566,8 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
 			ev_wlan_dbs_hw_mode_list,
 			(sizeof(*wma_handle->hw_mode.hw_mode_list) *
 						wma_handle->num_dbs_hw_modes));
-
+	policy_mgr_init_dbs_hw_mode(wma_handle->psoc,
+	ev->num_dbs_hw_modes, ev_wlan_dbs_hw_mode_list);
 	wma_dump_dbs_hw_mode(wma_handle);
 
 	/* Initializes the fw_mode and scan_config to zero.
@@ -4635,6 +4590,8 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
 
 	wma_handle->target_fw_version = ev->fw_build_vers;
 	wma_handle->new_hw_mode_index = ev->default_dbs_hw_mode_index;
+	policy_mgr_update_new_hw_mode_index(wma_handle->psoc,
+	ev->default_dbs_hw_mode_index);
 	wma_handle->fine_time_measurement_cap = ev->wmi_fw_sub_feat_caps;
 
 	WMA_LOGD("%s: Firmware default hw mode index : %d",
@@ -4960,7 +4917,7 @@ QDF_STATUS wma_get_caps_for_phyidx_hwmode(struct wma_caps_per_phy *caps_per_phy,
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	if (!wma_is_dbs_enable())
+	if (!policy_mgr_is_dbs_enable(wma_handle->psoc))
 		our_hw_mode = HW_MODE_DBS_NONE;
 
 	if (!caps_per_phy) {
@@ -5324,6 +5281,10 @@ static QDF_STATUS wma_update_hw_mode_list(t_wma_handle *wma_handle)
 				       mac1_ss_bw_info, i, dbs_mode,
 				       sbs_mode);
 	}
+
+	if (QDF_STATUS_SUCCESS !=
+	policy_mgr_update_hw_mode_list(wma_handle->psoc, phy_caps))
+		WMA_LOGE("%s: failed to update policy manager", __func__);
 	wma_dump_dbs_hw_mode(wma_handle);
 	return QDF_STATUS_SUCCESS;
 }
@@ -7002,7 +6963,7 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, struct scheduler_msg *msg)
 		break;
 	case SIR_HAL_PDEV_SET_HW_MODE:
 		wma_send_pdev_set_hw_mode_cmd(wma_handle,
-				(struct sir_hw_mode *)msg->bodyptr);
+				(struct policy_mgr_hw_mode *)msg->bodyptr);
 		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_OCB_SET_CONFIG_CMD:
@@ -7262,7 +7223,8 @@ QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
 	}
 
 	msg->saved_num_chan = wma_handle->saved_chan.num_channels;
-	status = cds_get_valid_chan_weights((struct sir_pcl_chan_weights *)msg);
+	status = policy_mgr_get_valid_chan_weights(wma_handle->psoc,
+		(struct policy_mgr_pcl_chan_weights *)msg);
 
 	for (i = 0; i < msg->saved_num_chan; i++) {
 		msg->weighed_valid_list[i] =
@@ -7298,7 +7260,7 @@ QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
  * Return: Success if the cmd is sent successfully to the firmware
  */
 QDF_STATUS wma_send_pdev_set_hw_mode_cmd(tp_wma_handle wma_handle,
-				struct sir_hw_mode *msg)
+				struct policy_mgr_hw_mode *msg)
 {
 	struct sir_set_hw_mode_resp *param;
 
@@ -7371,8 +7333,8 @@ QDF_STATUS wma_send_pdev_set_dual_mac_config(tp_wma_handle wma_handle,
 		return status;
 	}
 
-	wma_handle->dual_mac_cfg.req_scan_config = msg->scan_config;
-	wma_handle->dual_mac_cfg.req_fw_mode_config = msg->fw_mode_config;
+	policy_mgr_update_dbs_req_config(wma_handle->psoc,
+	msg->scan_config, msg->fw_mode_config);
 
 	return QDF_STATUS_SUCCESS;
 }

+ 3 - 2
core/wma/src/wma_mgmt.c

@@ -63,7 +63,7 @@
 #include "ol_fw.h"
 #include "dfs.h"
 #include "wma_internal.h"
-#include "cds_concurrency.h"
+#include "wlan_policy_mgr_api.h"
 #include "cdp_txrx_flow_ctrl_legacy.h"
 #include <cdp_txrx_peer_ops.h>
 #include <cdp_txrx_pmf.h>
@@ -2554,7 +2554,8 @@ void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info)
 					&param);
 			if (QDF_IS_STATUS_ERROR(status)) {
 				WMA_LOGE(FL("failed to send vdev up"));
-				cds_set_do_hw_mode_change_flag(false);
+				policy_mgr_set_do_hw_mode_change_flag(
+					wma->psoc, false);
 				return;
 			}
 			wma_vdev_set_mlme_state(wma, vdev_id, WLAN_VDEV_S_RUN);

+ 12 - 8
core/wma/src/wma_scan_roam.c

@@ -55,7 +55,7 @@
 #include "lim_session_utils.h"
 
 #include "cds_utils.h"
-#include "cds_concurrency.h"
+#include "wlan_policy_mgr_api.h"
 
 #if !defined(REMOVE_PKT_LOG)
 #include "pktlog_ac.h"
@@ -74,6 +74,8 @@
 #include <cdp_txrx_handle.h>
 #include "wma_he.h"
 #include <wlan_scan_public_structs.h>
+#include <wlan_scan_ucfg_api.h>
+
 #define WMA_MCC_MIRACAST_REST_TIME 400
 #define WMA_SCAN_ID_MASK 0x0fff
 
@@ -425,14 +427,16 @@ QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
 			QDF_MIN(scan_req->maxChannelTime,
 					(WMA_CTS_DURATION_MS_MAX -
 					 WMA_ROAM_SCAN_CHANNEL_SWITCH_TIME));
-		if (!wma_is_hw_dbs_capable() ||
-			(wma_is_hw_dbs_capable() &&
+		if (!policy_mgr_is_hw_dbs_capable(wma_handle->psoc) ||
+			(policy_mgr_is_hw_dbs_capable(wma_handle->psoc) &&
 				CDS_IS_CHANNEL_5GHZ(
-					cds_get_channel(CDS_SAP_MODE, NULL)))) {
+					policy_mgr_get_channel(wma_handle->psoc,
+						PM_SAP_MODE, NULL)))) {
 			cmd->dwell_time_passive = cmd->dwell_time_active;
 		}
 		cmd->burst_duration = 0;
-		if (CDS_IS_DFS_CH(cds_get_channel(CDS_SAP_MODE, NULL)))
+		if (CDS_IS_DFS_CH(policy_mgr_get_channel(wma_handle->psoc,
+			PM_SAP_MODE, NULL)))
 			cmd->burst_duration =
 				WMA_BURST_SCAN_MAX_NUM_OFFCHANNELS *
 				scan_req->maxChannelTime;
@@ -2895,7 +2899,7 @@ void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params)
 	void *peer;
 	struct cdp_pdev *pdev;
 	struct wma_txrx_node *intr = wma->interfaces;
-	struct sir_hw_mode_params hw_mode = {0};
+	struct policy_mgr_hw_mode_params hw_mode = {0};
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 
 	WMA_LOGD("%s: Enter", __func__);
@@ -2935,9 +2939,9 @@ void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params)
 	WMA_LOGI(FL("vht_capable: %d, dot11_mode: %d"),
 		 req.vht_capable, req.dot11_mode);
 
-	status = wma_get_current_hw_mode(&hw_mode);
+	status = policy_mgr_get_current_hw_mode(wma->psoc, &hw_mode);
 	if (!QDF_IS_STATUS_SUCCESS(status))
-		WMA_LOGE("wma_get_current_hw_mode failed");
+		WMA_LOGE("policy_mgr_get_current_hw_mode failed");
 
 	if ((params->nss == 2) && !hw_mode.dbs_cap) {
 		req.preferred_rx_streams = 2;

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 38 - 1019
core/wma/src/wma_utils.c


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio