Quellcode durchsuchen

qcacld-3.0: Replace tpAniSirGlobal in WMA

To align with the Linux coding style replace tpAniSirGlobal with
struct mac_context * in:
wlan_qct_wma_legacy.c
wma.h
wma_api.h
wma_data.c
wma_dev_if.c
wma_features.c
wma_if.h
wma_internal.h
wma_main.c
wma_mgmt.c
wma_scan_roam.c
wma_twt.c
wma_types.h
wma_utils.c

Change-Id: Ic48ad188f1b33da3d13ebead24b0827aed5ae6f0
CRs-Fixed: 2360298
Jeff Johnson vor 6 Jahren
Ursprung
Commit
9f18aa74a4

+ 3 - 3
core/wma/inc/wma.h

@@ -1252,11 +1252,11 @@ typedef struct {
 	bool tx_chain_mask_cck;
 	qdf_mc_timer_t service_ready_ext_timer;
 
-	QDF_STATUS (*csr_roam_synch_cb)(tpAniSirGlobal mac,
+	QDF_STATUS (*csr_roam_synch_cb)(struct mac_context *mac,
 		roam_offload_synch_ind *roam_synch_data,
 		tpSirBssDescription  bss_desc_ptr,
 		enum sir_roam_op_code reason);
-	QDF_STATUS (*pe_roam_synch_cb)(tpAniSirGlobal mac,
+	QDF_STATUS (*pe_roam_synch_cb)(struct mac_context *mac,
 		roam_offload_synch_ind *roam_synch_data,
 		tpSirBssDescription  bss_desc_ptr,
 		enum sir_roam_op_code reason);
@@ -1267,7 +1267,7 @@ typedef struct {
 	struct wma_ini_config ini_config;
 	struct wma_valid_channels saved_chan;
 	bool nan_datapath_enabled;
-	QDF_STATUS (*pe_ndp_event_handler)(tpAniSirGlobal mac_ctx,
+	QDF_STATUS (*pe_ndp_event_handler)(struct mac_context *mac_ctx,
 					   struct scheduler_msg *msg);
 	bool fw_timeout_crash;
 	bool sub_20_support;

+ 1 - 1
core/wma/inc/wma_api.h

@@ -171,7 +171,7 @@ void *wma_get_beacon_buffer_by_vdev_id(uint8_t vdev_id, uint32_t *buffer_size);
 bool wma_get_fw_wlan_feat_caps(enum cap_bitmap feature);
 void wma_set_fw_wlan_feat_caps(enum cap_bitmap feature);
 
-QDF_STATUS wma_post_ctrl_msg(tpAniSirGlobal mac, struct scheduler_msg *pMsg);
+QDF_STATUS wma_post_ctrl_msg(struct mac_context *mac, struct scheduler_msg *pMsg);
 
 void wma_register_wow_wakeup_events(WMA_HANDLE handle, uint8_t vdev_id,
 					uint8_t vdev_type, uint8_t sub_type);

+ 3 - 3
core/wma/inc/wma_if.h

@@ -934,7 +934,7 @@ typedef struct {
 	uint16_t reduced_beacon_interval;
 } tSwitchChannelParams, *tpSwitchChannelParams;
 
-typedef void (*tpSetLinkStateCallback)(tpAniSirGlobal mac, void *msgParam,
+typedef void (*tpSetLinkStateCallback)(struct mac_context *mac, void *msgParam,
 		bool status);
 
 /**
@@ -1029,7 +1029,7 @@ typedef struct {
 } tAggrAddTsParams, *tpAggrAddTsParams;
 
 
-typedef QDF_STATUS (*tHalMsgCallback)(tpAniSirGlobal mac, uint32_t mesgId,
+typedef QDF_STATUS (*tHalMsgCallback)(struct mac_context *mac, uint32_t mesgId,
 				      void *mesgParam);
 
 /**
@@ -1386,7 +1386,7 @@ typedef struct tHalHiddenSsidVdevRestart {
 } tHalHiddenSsidVdevRestart, *tpHalHiddenSsidVdevRestart;
 
 
-extern void sys_process_mmh_msg(tpAniSirGlobal mac,
+extern void sys_process_mmh_msg(struct mac_context *mac,
 				struct scheduler_msg *pMsg);
 
 /**

+ 1 - 1
core/wma/inc/wma_internal.h

@@ -284,7 +284,7 @@ A_UINT32 e_csr_auth_type_to_rsn_authmode(eCsrAuthType authtype,
 A_UINT32 e_csr_encryption_type_to_rsn_cipherset(eCsrEncryptionType encr);
 
 void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
-				    tpAniSirGlobal mac,
+				    struct mac_context *mac,
 				    tSirRoamOffloadScanReq *roam_req,
 				    wmi_start_scan_cmd_fixed_param *
 				    scan_params);

+ 5 - 5
core/wma/inc/wma_types.h

@@ -671,7 +671,7 @@ enum rateid {
 	RATEID_DEFAULT
 };
 
-QDF_STATUS wma_post_ctrl_msg(tpAniSirGlobal mac, struct scheduler_msg *pMsg);
+QDF_STATUS wma_post_ctrl_msg(struct mac_context *mac, struct scheduler_msg *pMsg);
 
 QDF_STATUS u_mac_post_ctrl_msg(void *pSirGlobal, tSirMbMsg *pMb);
 
@@ -741,21 +741,21 @@ QDF_STATUS wma_register_mgmt_frm_client(void);
 QDF_STATUS wma_de_register_mgmt_frm_client(void);
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 QDF_STATUS wma_register_roaming_callbacks(
-		QDF_STATUS (*csr_roam_synch_cb)(tpAniSirGlobal mac,
+		QDF_STATUS (*csr_roam_synch_cb)(struct mac_context *mac,
 			roam_offload_synch_ind *roam_synch_data,
 			tpSirBssDescription  bss_desc_ptr,
 			enum sir_roam_op_code reason),
-		QDF_STATUS (*pe_roam_synch_cb)(tpAniSirGlobal mac,
+		QDF_STATUS (*pe_roam_synch_cb)(struct mac_context *mac,
 			roam_offload_synch_ind *roam_synch_data,
 			tpSirBssDescription  bss_desc_ptr,
 			enum sir_roam_op_code reason));
 #else
 static inline QDF_STATUS wma_register_roaming_callbacks(
-		QDF_STATUS (*csr_roam_synch_cb)(tpAniSirGlobal mac,
+		QDF_STATUS (*csr_roam_synch_cb)(struct mac_context *mac,
 			roam_offload_synch_ind *roam_synch_data,
 			tpSirBssDescription  bss_desc_ptr,
 			enum sir_roam_op_code reason),
-		QDF_STATUS (*pe_roam_synch_cb)(tpAniSirGlobal mac,
+		QDF_STATUS (*pe_roam_synch_cb)(struct mac_context *mac,
 			roam_offload_synch_ind *roam_synch_data,
 			tpSirBssDescription  bss_desc_ptr,
 			enum sir_roam_op_code reason))

+ 3 - 3
core/wma/src/wlan_qct_wma_legacy.c

@@ -45,7 +45,7 @@
  * Return: Success or Failure
  */
 
-QDF_STATUS wma_post_ctrl_msg(tpAniSirGlobal mac, struct scheduler_msg *pMsg)
+QDF_STATUS wma_post_ctrl_msg(struct mac_context *mac, struct scheduler_msg *pMsg)
 {
 	if (QDF_STATUS_SUCCESS !=
 	    scheduler_post_message(QDF_MODULE_ID_WMA,
@@ -64,7 +64,7 @@ QDF_STATUS wma_post_ctrl_msg(tpAniSirGlobal mac, struct scheduler_msg *pMsg)
  * Return: Success or Failure
  */
 
-static QDF_STATUS wma_post_cfg_msg(tpAniSirGlobal mac,
+static QDF_STATUS wma_post_cfg_msg(struct mac_context *mac,
 				   struct scheduler_msg *pMsg)
 {
 	QDF_STATUS rc = QDF_STATUS_SUCCESS;
@@ -103,7 +103,7 @@ QDF_STATUS u_mac_post_ctrl_msg(void *pSirGlobal, tSirMbMsg *pMb)
 {
 	struct scheduler_msg msg = {0};
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tpAniSirGlobal mac = (tpAniSirGlobal) pSirGlobal;
+	struct mac_context *mac = (struct mac_context *) pSirGlobal;
 
 	msg.type = pMb->type;
 	msg.bodyval = 0;

+ 3 - 3
core/wma/src/wma_data.c

@@ -860,7 +860,7 @@ static void wma_data_tx_ack_work_handler(void *ack_work)
 
 	/* Call the Ack Cb registered by UMAC */
 	if (ack_cb)
-		ack_cb((tpAniSirGlobal) (wma_handle->mac_context), NULL,
+		ack_cb((struct mac_context *) (wma_handle->mac_context), NULL,
 			work->status ? 0 : 1, NULL);
 	else
 		WMA_LOGE("Data Tx Ack Cb is NULL");
@@ -2395,7 +2395,7 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
 	uint16_t newFrmLen = 0;
 #endif /* WLAN_FEATURE_11W */
 	struct wma_txrx_node *iface;
-	tpAniSirGlobal mac;
+	struct mac_context *mac;
 	tpSirMacMgmtHdr mHdr;
 	struct wmi_mgmt_params mgmt_param = {0};
 	struct cdp_cfg *ctrl_pdev;
@@ -2798,7 +2798,7 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
 	}
 
 	status = wlan_mgmt_txrx_mgmt_frame_tx(peer,
-			(tpAniSirGlobal)wma_handle->mac_context,
+			(struct mac_context *)wma_handle->mac_context,
 			(qdf_nbuf_t)tx_frame,
 			NULL, tx_frm_ota_comp_cb,
 			WLAN_UMAC_COMP_MLME, &mgmt_param);

+ 5 - 5
core/wma/src/wma_dev_if.c

@@ -1255,7 +1255,7 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
 	target_resource_config *wlan_res_cfg;
 	struct wlan_objmgr_psoc *psoc = wma->psoc;
 #ifdef FEATURE_AP_MCC_CH_AVOIDANCE
-	tpAniSirGlobal mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
 #endif
 #ifdef CONFIG_VDEV_SM
 	enum wlan_vdev_sm_evt  event;
@@ -2152,7 +2152,7 @@ static QDF_STATUS wma_config_active_apf_mode(t_wma_handle *wma, uint8_t vdev_id)
 static void
 wma_check_and_find_mcc_ap(tp_wma_handle wma, uint8_t vdev_id)
 {
-	tpAniSirGlobal mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (NULL == mac_ctx) {
 		WMA_LOGE("%s: Failed to get mac_ctx", __func__);
@@ -2917,7 +2917,7 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
 	struct vdev_start_params params = { 0 };
 	wmi_vdev_start_request_cmd_fixed_param *cmd;
 	struct wma_txrx_node *intr = wma->interfaces;
-	tpAniSirGlobal mac_ctx = NULL;
+	struct mac_context *mac_ctx = NULL;
 	uint32_t temp_ssid_len = 0;
 	uint32_t temp_flags = 0;
 	uint32_t temp_chan_info = 0;
@@ -3704,7 +3704,7 @@ void wma_vdev_resp_timer(void *data)
 	struct wma_txrx_node *iface;
 	struct del_sta_self_params *del_sta_self_params;
 #ifdef FEATURE_AP_MCC_CH_AVOIDANCE
-	tpAniSirGlobal mac_ctx;
+	struct mac_context *mac_ctx;
 #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
 
 	wma = cds_get_context(QDF_MODULE_ID_WMA);
@@ -4442,7 +4442,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
 	struct wma_txrx_node *iface;
 	int pps_val = 0;
 	bool roam_synch_in_progress = false;
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 	struct policy_mgr_hw_mode_params hw_mode = {0};
 	bool peer_assoc_sent = false;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);

+ 11 - 11
core/wma/src/wma_features.c

@@ -1389,7 +1389,7 @@ int wma_oem_data_response_handler(void *handle,
 	uint8_t *data;
 	uint32_t datalen;
 	struct oem_data_rsp *oem_rsp;
-	tpAniSirGlobal pmac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *pmac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!pmac) {
 		WMA_LOGE(FL("Invalid pmac"));
@@ -4400,7 +4400,7 @@ int wma_get_apf_caps_event_handler(void *handle, u_int8_t *cmd_param_info,
 	WMI_BPF_CAPABILIY_INFO_EVENTID_param_tlvs  *param_buf;
 	wmi_bpf_capability_info_evt_fixed_param *event;
 	struct sir_apf_get_offload *apf_get_offload;
-	tpAniSirGlobal pmac = (tpAniSirGlobal)cds_get_context(
+	struct mac_context *pmac = (struct mac_context *)cds_get_context(
 				QDF_MODULE_ID_PE);
 
 	if (!pmac) {
@@ -4619,7 +4619,7 @@ int wma_apf_read_work_memory_event_handler(void *handle, uint8_t *evt_buf,
 	wmi_unified_t wmi_handle;
 	struct wmi_apf_read_memory_resp_event_params evt_params = {0};
 	QDF_STATUS status;
-	tpAniSirGlobal pmac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *pmac = cds_get_context(QDF_MODULE_ID_PE);
 
 	WMA_LOGD(FL("handle:%pK event:%pK len:%u"), handle, evt_buf, len);
 
@@ -5086,7 +5086,7 @@ int wma_p2p_lo_event_handler(void *handle, uint8_t *event_buf,
 	struct sir_p2p_lo_event *event;
 	WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID_param_tlvs *param_tlvs;
 	wmi_p2p_lo_stopped_event_fixed_param *fix_param;
-	tpAniSirGlobal p_mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *p_mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!wma) {
 		WMA_LOGE("%s: Invalid WMA Context", __func__);
@@ -5416,7 +5416,7 @@ int wma_get_arp_stats_handler(void *handle, uint8_t *data,
 	wmi_vdev_get_connectivity_check_stats *connect_stats_event;
 	uint8_t *buf_ptr;
 	struct rsp_stats rsp = {0};
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!mac) {
 		WMA_LOGE("%s: Invalid mac context", __func__);
@@ -5493,7 +5493,7 @@ int wma_unified_power_debug_stats_event_handler(void *handle,
 	wmi_pdev_chip_power_stats_event_fixed_param *param_buf;
 	uint32_t power_stats_len, stats_registers_len, *debug_registers;
 
-	tpAniSirGlobal mac = (tpAniSirGlobal)cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = (struct mac_context *)cds_get_context(QDF_MODULE_ID_PE);
 
 	param_tlvs =
 		(WMI_PDEV_CHIP_POWER_STATS_EVENTID_param_tlvs *) cmd_param_info;
@@ -5573,13 +5573,13 @@ int wma_chan_info_event_handler(void *handle, uint8_t *event_buf,
 	WMI_CHAN_INFO_EVENTID_param_tlvs *param_buf;
 	wmi_chan_info_event_fixed_param *event;
 	struct scan_chan_info buf;
-	tpAniSirGlobal mac = NULL;
+	struct mac_context *mac = NULL;
 	struct lim_channel_status *channel_status;
 
 	WMA_LOGD("%s: Enter", __func__);
 
 	if (wma != NULL && wma->cds_context != NULL)
-		mac = (tpAniSirGlobal)cds_get_context(QDF_MODULE_ID_PE);
+		mac = (struct mac_context *)cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!mac) {
 		WMA_LOGE("%s: Invalid mac context", __func__);
@@ -5667,9 +5667,9 @@ int wma_rx_aggr_failure_event_handler(void *handle, u_int8_t *event_buf,
 	wmi_rx_aggr_failure_event_fixed_param *rx_aggr_failure_info;
 	wmi_rx_aggr_failure_info *hole_info;
 	uint32_t i, alloc_len;
-	tpAniSirGlobal mac;
+	struct mac_context *mac;
 
-	mac = (tpAniSirGlobal)cds_get_context(QDF_MODULE_ID_PE);
+	mac = (struct mac_context *)cds_get_context(QDF_MODULE_ID_PE);
 	if (!mac || !mac->sme.stats_ext2_cb) {
 		WMA_LOGD("%s: NULL mac ptr or HDD callback is null", __func__);
 		return -EINVAL;
@@ -5770,7 +5770,7 @@ int wma_pdev_div_info_evt_handler(void *handle, u_int8_t *event_buf,
 	u_int32_t i;
 	u_int8_t macaddr[IEEE80211_ADDR_LEN];
 
-	tpAniSirGlobal pmac = (tpAniSirGlobal)cds_get_context(
+	struct mac_context *pmac = (struct mac_context *)cds_get_context(
 					QDF_MODULE_ID_PE);
 	if (!pmac) {
 		WMA_LOGE(FL("Invalid pmac"));

+ 1 - 1
core/wma/src/wma_main.c

@@ -963,7 +963,7 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma,
 	int vid = privcmd->param_vdev_id, pps_val = 0;
 	QDF_STATUS ret;
 	struct wma_txrx_node *intr = wma->interfaces;
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 	struct qpower_params *qparams = &intr[vid].config.qpower_params;
 	struct pdev_params pdev_param;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);

+ 4 - 4
core/wma/src/wma_mgmt.c

@@ -1727,7 +1727,7 @@ static void wma_read_cfg_wepkey(tp_wma_handle wma_handle,
 	QDF_STATUS status;
 	qdf_size_t val = SIR_MAC_KEY_LENGTH;
 	uint8_t i, j;
-	tpAniSirGlobal mac_ctx = wma_handle->mac_context;
+	struct mac_context *mac_ctx = wma_handle->mac_context;
 
 	WMA_LOGD("Reading WEP keys from cfg");
 
@@ -3074,7 +3074,7 @@ void wma_set_keepalive_req(tp_wma_handle wma,
 void wma_beacon_miss_handler(tp_wma_handle wma, uint32_t vdev_id, int32_t rssi)
 {
 	tSirSmeMissedBeaconInd *beacon_miss_ind;
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	beacon_miss_ind = (tSirSmeMissedBeaconInd *) qdf_mem_malloc
 				  (sizeof(tSirSmeMissedBeaconInd));
@@ -4297,11 +4297,11 @@ QDF_STATUS wma_de_register_mgmt_frm_client(void)
  * Return: Success or Failure Status
  */
 QDF_STATUS wma_register_roaming_callbacks(
-	QDF_STATUS (*csr_roam_synch_cb)(tpAniSirGlobal mac,
+	QDF_STATUS (*csr_roam_synch_cb)(struct mac_context *mac,
 		roam_offload_synch_ind *roam_synch_data,
 		tpSirBssDescription  bss_desc_ptr,
 		enum sir_roam_op_code reason),
-	QDF_STATUS (*pe_roam_synch_cb)(tpAniSirGlobal mac,
+	QDF_STATUS (*pe_roam_synch_cb)(struct mac_context *mac,
 		roam_offload_synch_ind *roam_synch_data,
 		tpSirBssDescription  bss_desc_ptr,
 		enum sir_roam_op_code reason))

+ 20 - 20
core/wma/src/wma_scan_roam.c

@@ -944,7 +944,7 @@ void wma_process_set_pdev_vht_ie_req(tp_wma_handle wma,
  * Return: none
  */
 void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
-				    tpAniSirGlobal mac,
+				    struct mac_context *mac,
 				    tSirRoamOffloadScanReq *roam_req,
 				    wmi_start_scan_cmd_fixed_param *
 				    scan_params)
@@ -1409,7 +1409,7 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
 {
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
 	wmi_start_scan_cmd_fixed_param scan_params;
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 	uint32_t mode = 0;
 	struct wma_txrx_node *intr = NULL;
 
@@ -2082,7 +2082,7 @@ static int wma_fill_roam_synch_buffer(tp_wma_handle wma,
 		roam_synch_ind_ptr->rssi, roam_synch_ind_ptr->isBeacon);
 
 	if (!QDF_IS_STATUS_SUCCESS(
-		wma->csr_roam_synch_cb((tpAniSirGlobal)wma->mac_context,
+		wma->csr_roam_synch_cb((struct mac_context *)wma->mac_context,
 		roam_synch_ind_ptr, NULL, SIR_ROAMING_DEREGISTER_STA))) {
 		WMA_LOGE("LFR3: CSR Roam synch cb failed");
 		wma_free_roam_synch_frame_ind(iface);
@@ -2438,7 +2438,7 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
 	}
 	qdf_mem_zero(bss_desc_ptr, sizeof(tSirBssDescription) + ie_len);
 	if (QDF_IS_STATUS_ERROR(wma->pe_roam_synch_cb(
-			(tpAniSirGlobal)wma->mac_context,
+			(struct mac_context *)wma->mac_context,
 			roam_synch_ind_ptr, bss_desc_ptr,
 			SIR_ROAM_SYNCH_PROPAGATION))) {
 		WMA_LOGE("LFR3: PE roam synch cb failed");
@@ -2447,7 +2447,7 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
 	}
 
 	wma_roam_update_vdev(wma, roam_synch_ind_ptr);
-	wma->csr_roam_synch_cb((tpAniSirGlobal)wma->mac_context,
+	wma->csr_roam_synch_cb((struct mac_context *)wma->mac_context,
 		roam_synch_ind_ptr, bss_desc_ptr, SIR_ROAM_SYNCH_PROPAGATION);
 	wma_process_roam_synch_complete(wma, synch_event->vdev_id);
 
@@ -2458,13 +2458,13 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
 		wma->interfaces[synch_event->vdev_id].chan_width =
 			roam_synch_ind_ptr->join_rsp->vht_channel_width;
 
-	wma->csr_roam_synch_cb((tpAniSirGlobal)wma->mac_context,
+	wma->csr_roam_synch_cb((struct mac_context *)wma->mac_context,
 		roam_synch_ind_ptr, bss_desc_ptr, SIR_ROAM_SYNCH_COMPLETE);
 	wma->interfaces[synch_event->vdev_id].roam_synch_delay =
 		qdf_get_system_timestamp() - roam_synch_received;
 	WMA_LOGD("LFR3: roam_synch_delay:%d",
 		wma->interfaces[synch_event->vdev_id].roam_synch_delay);
-	wma->csr_roam_synch_cb((tpAniSirGlobal)wma->mac_context,
+	wma->csr_roam_synch_cb((struct mac_context *)wma->mac_context,
 		roam_synch_ind_ptr, bss_desc_ptr, SIR_ROAM_SYNCH_NAPI_OFF);
 
 	status = 0;
@@ -2472,7 +2472,7 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
 cleanup_label:
 	if (status != 0) {
 		if (roam_synch_ind_ptr)
-			wma->csr_roam_synch_cb((tpAniSirGlobal)wma->mac_context,
+			wma->csr_roam_synch_cb((struct mac_context *)wma->mac_context,
 				roam_synch_ind_ptr, NULL, SIR_ROAMING_ABORT);
 		roam_req = qdf_mem_malloc(sizeof(tSirRoamOffloadScanReq));
 		if (roam_req && synch_event) {
@@ -2848,7 +2848,7 @@ int wma_rssi_breached_event_handler(void *handle,
 	WMI_RSSI_BREACH_EVENTID_param_tlvs *param_buf;
 	wmi_rssi_breach_event_fixed_param  *event;
 	struct rssi_breach_event  rssi;
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!mac) {
 		WMA_LOGE("%s: Invalid mac context", __func__);
@@ -3403,7 +3403,7 @@ int wma_extscan_start_stop_event_handler(void *handle,
 	wmi_extscan_start_stop_event_fixed_param *event;
 	struct sir_extscan_generic_response   *extscan_ind;
 	uint16_t event_type;
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!mac) {
 		WMA_LOGE("%s: Invalid mac", __func__);
@@ -3501,7 +3501,7 @@ int wma_extscan_operations_event_handler(void *handle,
 	wmi_extscan_operation_event_fixed_param *oprn_event;
 	tSirExtScanOnScanEventIndParams *oprn_ind;
 	uint32_t cnt;
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!mac) {
 		WMA_LOGE("%s: Invalid mac", __func__);
@@ -3614,7 +3614,7 @@ int wma_extscan_table_usage_event_handler(void *handle,
 	WMI_EXTSCAN_TABLE_USAGE_EVENTID_param_tlvs *param_buf;
 	wmi_extscan_table_usage_event_fixed_param *event;
 	tSirExtScanResultsAvailableIndParams *tbl_usg_ind;
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!mac) {
 		WMA_LOGE("%s: Invalid mac", __func__);
@@ -3666,7 +3666,7 @@ int wma_extscan_capabilities_event_handler(void *handle,
 	wmi_extscan_hotlist_monitor_capabilities *src_hotlist;
 	wmi_extscan_wlan_change_monitor_capabilities *src_change;
 	struct ext_scan_capabilities_response  *dest_capab;
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!mac) {
 		WMA_LOGE("%s: Invalid mac", __func__);
@@ -3771,7 +3771,7 @@ int wma_extscan_hotlist_match_event_handler(void *handle,
 	uint32_t numap;
 	int j, ap_found = 0;
 	uint32_t buf_len;
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!mac) {
 		WMA_LOGE("%s: Invalid mac", __func__);
@@ -4069,7 +4069,7 @@ int wma_extscan_cached_results_event_handler(void *handle,
 	wmi_extscan_wlan_descriptor *src_hotlist;
 	wmi_extscan_rssi_info *src_rssi;
 	int i, moredata, scan_ids_cnt, buf_len, status;
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 	uint32_t total_len;
 	bool excess_data = false;
 
@@ -4221,7 +4221,7 @@ int wma_extscan_change_results_event_handler(void *handle,
 	int count = 0;
 	int moredata;
 	uint32_t rssi_num = 0;
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 	uint32_t buf_len;
 	bool excess_data = false;
 
@@ -4360,7 +4360,7 @@ int wma_passpoint_match_event_handler(void *handle,
 	uint8_t *buf_ptr;
 	uint32_t buf_len = 0;
 	bool excess_data = false;
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!mac) {
 		WMA_LOGE("%s: Invalid mac", __func__);
@@ -4911,10 +4911,10 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
 		}
 		roam_synch_data->roamedVdevId = wmi_event->vdev_id;
 		wma_handle->pe_roam_synch_cb(
-				(tpAniSirGlobal)wma_handle->mac_context,
+				(struct mac_context *)wma_handle->mac_context,
 				roam_synch_data, NULL, op_code);
 		wma_handle->csr_roam_synch_cb(
-				(tpAniSirGlobal)wma_handle->mac_context,
+				(struct mac_context *)wma_handle->mac_context,
 				roam_synch_data, NULL, op_code);
 		qdf_mem_free(roam_synch_data);
 		break;
@@ -4928,7 +4928,7 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
 
 		roam_synch_data->roamedVdevId = wmi_event->vdev_id;
 		wma_handle->csr_roam_synch_cb(
-				(tpAniSirGlobal)wma_handle->mac_context,
+				(struct mac_context *)wma_handle->mac_context,
 				roam_synch_data, NULL, SIR_ROAMING_INVOKE_FAIL);
 		qdf_mem_free(roam_synch_data);
 		break;

+ 1 - 1
core/wma/src/wma_twt.c

@@ -51,7 +51,7 @@ int wma_twt_en_complete_event_handler(void *handle,
 	struct wmi_twt_enable_complete_event_param param;
 	tp_wma_handle wma_handle = (tp_wma_handle) handle;
 	wmi_unified_t wmi_handle;
-	tpAniSirGlobal mac = (tpAniSirGlobal)cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = (struct mac_context *)cds_get_context(QDF_MODULE_ID_PE);
 	int status = -EINVAL;
 
 	if (!wma_handle) {

+ 10 - 10
core/wma/src/wma_utils.c

@@ -1087,11 +1087,11 @@ static int wma_ll_stats_evt_handler(void *handle, u_int8_t *event,
 	struct sir_wifi_peer_signal_stats *peer_signal;
 	uint8_t *result;
 	uint32_t i, peer_num, result_size, dst_len;
-	tpAniSirGlobal mac;
+	struct mac_context *mac;
 	struct scheduler_msg sme_msg = { 0 };
 	QDF_STATUS qdf_status;
 
-	mac = (tpAniSirGlobal)cds_get_context(QDF_MODULE_ID_PE);
+	mac = (struct mac_context *)cds_get_context(QDF_MODULE_ID_PE);
 	if (!mac) {
 		WMA_LOGD("%s: NULL mac ptr. Exiting", __func__);
 		return -EINVAL;
@@ -1258,7 +1258,7 @@ static int wma_unified_link_peer_stats_event_handler(void *handle,
 	bool excess_data = false;
 	uint32_t buf_len = 0;
 
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!mac) {
 		WMA_LOGD("%s: NULL mac ptr. Exiting", __func__);
@@ -1452,7 +1452,7 @@ static int wma_unified_radio_tx_power_level_stats_event_handler(void *handle,
 	uint32_t max_total_num_tx_power_levels = MAX_TPC_LEVELS * NUM_OF_BANDS *
 						MAX_SPATIAL_STREAM_ANY_V3;
 
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!mac) {
 		WMA_LOGD("%s: NULL mac ptr. Exiting", __func__);
@@ -1622,7 +1622,7 @@ static int wma_unified_link_radio_stats_event_handler(void *handle,
 	tSirWifiRadioStat *rs_results;
 	tSirWifiChannelStats *chn_results;
 
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!mac) {
 		WMA_LOGD("%s: NULL mac ptr. Exiting", __func__);
@@ -1838,7 +1838,7 @@ static int wma_peer_ps_evt_handler(void *handle, u_int8_t *event,
 	cds_msg_t sme_msg = { 0 };
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
 
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!mac) {
 		WMA_LOGD("%s: NULL mac ptr. Exiting", __func__);
@@ -2091,7 +2091,7 @@ int wma_unified_link_iface_stats_event_handler(void *handle,
 	size_t link_stats_results_size, offload_stats_size;
 	size_t total_ac_size, total_offload_size;
 
-	tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
 	if (!mac) {
 		WMA_LOGD("%s: NULL mac ptr. Exiting", __func__);
@@ -3060,7 +3060,7 @@ int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info,
 	uint32_t buf_len = 0;
 	bool excess_data = false;
 	wmi_congestion_stats *congestion_stats;
-	tpAniSirGlobal mac;
+	struct mac_context *mac;
 
 	param_buf = (WMI_UPDATE_STATS_EVENTID_param_tlvs *) cmd_param_info;
 	if (!param_buf) {
@@ -3440,7 +3440,7 @@ int wma_peer_info_event_handler(void *handle, u_int8_t *cmd_param_info,
  */
 QDF_STATUS wma_send_link_speed(uint32_t link_speed)
 {
-	tpAniSirGlobal mac_ctx;
+	struct mac_context *mac_ctx;
 	tSirLinkSpeedInfo *ls_ind;
 
 	mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
@@ -4636,7 +4636,7 @@ int wma_chip_power_save_failure_detected_handler(void *handle,
 	WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID_param_tlvs *param_buf;
 	wmi_chip_power_save_failure_detected_fixed_param  *event;
 	struct chip_pwr_save_fail_detected_params  pwr_save_fail_params;
-	tpAniSirGlobal mac = (tpAniSirGlobal)cds_get_context(
+	struct mac_context *mac = (struct mac_context *)cds_get_context(
 						QDF_MODULE_ID_PE);
 	if (wma == NULL) {
 		WMA_LOGE("%s: wma_handle is NULL", __func__);