Explorar o código

qcacld-3.0: Replace tpAniSirGlobal in MAC misc

To align with the Linux coding style replace tpAniSirGlobal with
struct mac_context * in:
ani_global.h
cfg_api.c
cfg_api.h
cfg_priv.h
cfg_proc_msg.c
cfg_send_msg.c
dph_hash_table.c
dph_hash_table.h
mac_init_api.c
mac_trace.c
mac_trace.h
sys_entry_func.c
sys_entry_func.h
utils_api.h
wlan_qct_sys.c

Change-Id: Iffe25ad77d7f289bdade2c0bd9ddb566c5ddadff
CRs-Fixed: 2360300
Jeff Johnson %!s(int64=6) %!d(string=hai) anos
pai
achega
2d3d13f121

+ 7 - 7
core/mac/inc/ani_global.h

@@ -55,9 +55,9 @@
  *
  *
  * Return: mac context for @handle
  * Return: mac context for @handle
  */
  */
-static inline tpAniSirGlobal MAC_CONTEXT(mac_handle_t handle)
+static inline struct mac_context *MAC_CONTEXT(mac_handle_t handle)
 {
 {
-	return (tpAniSirGlobal)handle;
+	return (struct mac_context *)handle;
 }
 }
 
 
 /**
 /**
@@ -71,12 +71,12 @@ static inline tpAniSirGlobal MAC_CONTEXT(mac_handle_t handle)
  *
  *
  * Return: opaque handle for @mac
  * Return: opaque handle for @mac
  */
  */
-static inline mac_handle_t MAC_HANDLE(tpAniSirGlobal mac)
+static inline mac_handle_t MAC_HANDLE(struct mac_context *mac)
 {
 {
 	return (mac_handle_t)mac;
 	return (mac_handle_t)mac;
 }
 }
 
 
-#define ANI_DRIVER_TYPE(mac)     (((tpAniSirGlobal)(mac))->gDriverType)
+#define ANI_DRIVER_TYPE(mac)     (((struct mac_context *)(mac))->gDriverType)
 
 
 /* ------------------------------------------------------------------- */
 /* ------------------------------------------------------------------- */
 /* Bss Qos Caps bit map definition */
 /* Bss Qos Caps bit map definition */
@@ -245,7 +245,7 @@ enum wifi_logging_ring_id {
 
 
 /* ------------------------------------------------------------------- */
 /* ------------------------------------------------------------------- */
 /* Change channel generic scheme */
 /* Change channel generic scheme */
-typedef void (*CHANGE_CHANNEL_CALLBACK)(tpAniSirGlobal mac, QDF_STATUS status,
+typedef void (*CHANGE_CHANNEL_CALLBACK)(struct mac_context *mac, QDF_STATUS status,
 					uint32_t *data,
 					uint32_t *data,
 					struct pe_session *pe_session);
 					struct pe_session *pe_session);
 
 
@@ -724,9 +724,9 @@ typedef struct sAniSirLim {
 	uint8_t gLimDfsChanSwTxCount;
 	uint8_t gLimDfsChanSwTxCount;
 	uint8_t gLimDfsTargetChanNum;
 	uint8_t gLimDfsTargetChanNum;
 	QDF_STATUS(*sme_msg_callback)
 	QDF_STATUS(*sme_msg_callback)
-		(tpAniSirGlobal mac, struct scheduler_msg *msg);
+		(struct mac_context *mac, struct scheduler_msg *msg);
 	QDF_STATUS(*stop_roaming_callback)
 	QDF_STATUS(*stop_roaming_callback)
-		(tpAniSirGlobal mac, uint8_t session_id, uint8_t reason);
+		(struct mac_context *mac, uint8_t session_id, uint8_t reason);
 	uint8_t retry_packet_cnt;
 	uint8_t retry_packet_cnt;
 	uint8_t beacon_probe_rsp_cnt_per_scan;
 	uint8_t beacon_probe_rsp_cnt_per_scan;
 	wlan_scan_requester req_id;
 	wlan_scan_requester req_id;

+ 2 - 2
core/mac/inc/mac_trace.h

@@ -39,9 +39,9 @@
 #define eLOG_NODROP_MISSED_BEACON_SCENARIO 0
 #define eLOG_NODROP_MISSED_BEACON_SCENARIO 0
 #define eLOG_PROC_DEAUTH_FRAME_SCENARIO 1
 #define eLOG_PROC_DEAUTH_FRAME_SCENARIO 1
 
 
-void mac_trace(tpAniSirGlobal mac, uint8_t code, uint16_t session,
+void mac_trace(struct mac_context *mac, uint8_t code, uint16_t session,
 	       uint32_t data);
 	       uint32_t data);
-void mac_trace_new(tpAniSirGlobal mac, uint8_t module, uint8_t code,
+void mac_trace_new(struct mac_context *mac, uint8_t module, uint8_t code,
 		   uint16_t session, uint32_t data);
 		   uint16_t session, uint32_t data);
 uint8_t *mac_trace_get_cfg_msg_string(uint16_t cfgMsg);
 uint8_t *mac_trace_get_cfg_msg_string(uint16_t cfgMsg);
 uint8_t *mac_trace_get_lim_msg_string(uint16_t limMsg);
 uint8_t *mac_trace_get_lim_msg_string(uint16_t limMsg);

+ 20 - 20
core/mac/src/cfg/cfg_api.c

@@ -40,7 +40,7 @@ static uint8_t __g_s_buffer[CFG_MAX_STR_LEN];
 static uint32_t __g_param_list[WNI_CFG_MAX_PARAM_NUM +
 static uint32_t __g_param_list[WNI_CFG_MAX_PARAM_NUM +
 			     WNI_CFG_GET_PER_STA_STAT_RSP_NUM];
 			     WNI_CFG_GET_PER_STA_STAT_RSP_NUM];
 
 
-static void notify(tpAniSirGlobal, uint16_t, uint32_t);
+static void notify(struct mac_context *, uint16_t, uint32_t);
 
 
 typedef enum {
 typedef enum {
 	eRF_BAND_UNKNOWN = 0,
 	eRF_BAND_UNKNOWN = 0,
@@ -52,7 +52,7 @@ extern cfgstatic_string cfg_static_string[CFG_MAX_STATIC_STRING];
 extern cgstatic cfg_static[CFG_PARAM_MAX_NUM];
 extern cgstatic cfg_static[CFG_PARAM_MAX_NUM];
 
 
 /* --------------------------------------------------------------------- */
 /* --------------------------------------------------------------------- */
-uint32_t cfg_need_restart(tpAniSirGlobal mac, uint16_t cfgId)
+uint32_t cfg_need_restart(struct mac_context *mac, uint16_t cfgId)
 {
 {
 	if (!mac->cfg.gCfgEntry) {
 	if (!mac->cfg.gCfgEntry) {
 		pe_err("gCfgEntry is NULL");
 		pe_err("gCfgEntry is NULL");
@@ -61,7 +61,7 @@ uint32_t cfg_need_restart(tpAniSirGlobal mac, uint16_t cfgId)
 	return !!(mac->cfg.gCfgEntry[cfgId].control & CFG_CTL_RESTART);
 	return !!(mac->cfg.gCfgEntry[cfgId].control & CFG_CTL_RESTART);
 }
 }
 
 
-static void cfg_get_strindex(tpAniSirGlobal mac, uint16_t cfgId)
+static void cfg_get_strindex(struct mac_context *mac, uint16_t cfgId)
 {
 {
 	uint16_t i = 0;
 	uint16_t i = 0;
 
 
@@ -77,7 +77,7 @@ static void cfg_get_strindex(tpAniSirGlobal mac, uint16_t cfgId)
 	cfg_static[cfgId].pStrData = &cfg_static_string[i];
 	cfg_static[cfgId].pStrData = &cfg_static_string[i];
 }
 }
 /* --------------------------------------------------------------------- */
 /* --------------------------------------------------------------------- */
-uint32_t cfg_need_reload(tpAniSirGlobal mac, uint16_t cfgId)
+uint32_t cfg_need_reload(struct mac_context *mac, uint16_t cfgId)
 {
 {
 	if (!mac->cfg.gCfgEntry) {
 	if (!mac->cfg.gCfgEntry) {
 		pe_err("gCfgEntry is NULL");
 		pe_err("gCfgEntry is NULL");
@@ -87,7 +87,7 @@ uint32_t cfg_need_reload(tpAniSirGlobal mac, uint16_t cfgId)
 }
 }
 
 
 /* --------------------------------------------------------------------- */
 /* --------------------------------------------------------------------- */
-QDF_STATUS cfg_init(tpAniSirGlobal mac)
+QDF_STATUS cfg_init(struct mac_context *mac)
 {
 {
 	uint16_t i = 0;
 	uint16_t i = 0;
 	uint16_t combined_buff_size = 0;
 	uint16_t combined_buff_size = 0;
@@ -152,7 +152,7 @@ QDF_STATUS cfg_init(tpAniSirGlobal mac)
 }
 }
 
 
 /* ---------------------------------------------------------------------- */
 /* ---------------------------------------------------------------------- */
-void cfg_de_init(tpAniSirGlobal mac)
+void cfg_de_init(struct mac_context *mac)
 {
 {
 	qdf_mem_free(mac->cfg.gCfgSBuf);
 	qdf_mem_free(mac->cfg.gCfgSBuf);
 	mac->cfg.gCfgIBufMin = NULL;
 	mac->cfg.gCfgIBufMin = NULL;
@@ -182,7 +182,7 @@ void cfg_de_init(tpAniSirGlobal mac)
  * @return QDF_STATUS_SUCCESS:  request completed successfully
  * @return QDF_STATUS_SUCCESS:  request completed successfully
  * @return QDF_STATUS_E_INVAL:  invalid CFG parameter ID
  * @return QDF_STATUS_E_INVAL:  invalid CFG parameter ID
  */
  */
-QDF_STATUS cfg_check_valid(tpAniSirGlobal mac, uint16_t cfgId,
+QDF_STATUS cfg_check_valid(struct mac_context *mac, uint16_t cfgId,
 			   uint32_t *index)
 			   uint32_t *index)
 {
 {
 	uint32_t control;
 	uint32_t control;
@@ -242,7 +242,7 @@ QDF_STATUS cfg_check_valid(tpAniSirGlobal mac, uint16_t cfgId,
  * @return QDF_STATUS_E_INVAL:  invalid CFG parameter ID
  * @return QDF_STATUS_E_INVAL:  invalid CFG parameter ID
  */
  */
 
 
-QDF_STATUS cfg_set_int(tpAniSirGlobal mac, uint16_t cfgId, uint32_t value)
+QDF_STATUS cfg_set_int(struct mac_context *mac, uint16_t cfgId, uint32_t value)
 {
 {
 	uint32_t index;
 	uint32_t index;
 	uint32_t control;
 	uint32_t control;
@@ -297,7 +297,7 @@ QDF_STATUS cfg_set_int(tpAniSirGlobal mac, uint16_t cfgId, uint32_t value)
  * @return QDF_STATUS_E_INVAL:  invalid CFG parameter ID
  * @return QDF_STATUS_E_INVAL:  invalid CFG parameter ID
  */
  */
 
 
-QDF_STATUS wlan_cfg_get_int(tpAniSirGlobal mac, uint16_t cfgId,
+QDF_STATUS wlan_cfg_get_int(struct mac_context *mac, uint16_t cfgId,
 			    uint32_t *pValue)
 			    uint32_t *pValue)
 {
 {
 	uint32_t index;
 	uint32_t index;
@@ -343,7 +343,7 @@ QDF_STATUS wlan_cfg_get_int(tpAniSirGlobal mac, uint16_t cfgId,
  *
  *
  */
  */
 
 
-QDF_STATUS cfg_set_str(tpAniSirGlobal mac, uint16_t cfgId, uint8_t *pStr,
+QDF_STATUS cfg_set_str(struct mac_context *mac, uint16_t cfgId, uint8_t *pStr,
 		       uint32_t length)
 		       uint32_t length)
 {
 {
 	return cfg_set_str_notify(mac, cfgId, pStr, length, true);
 	return cfg_set_str_notify(mac, cfgId, pStr, length, true);
@@ -377,7 +377,7 @@ QDF_STATUS cfg_set_str(tpAniSirGlobal mac, uint16_t cfgId, uint8_t *pStr,
  *
  *
  */
  */
 
 
-QDF_STATUS cfg_set_str_notify(tpAniSirGlobal mac, uint16_t cfgId,
+QDF_STATUS cfg_set_str_notify(struct mac_context *mac, uint16_t cfgId,
 			      uint8_t *pStr, uint32_t length,
 			      uint8_t *pStr, uint32_t length,
 			      int notifyMod)
 			      int notifyMod)
 {
 {
@@ -445,7 +445,7 @@ QDF_STATUS cfg_set_str_notify(tpAniSirGlobal mac, uint16_t cfgId,
  *
  *
  */
  */
 
 
-QDF_STATUS wlan_cfg_get_str(tpAniSirGlobal mac, uint16_t cfgId,
+QDF_STATUS wlan_cfg_get_str(struct mac_context *mac, uint16_t cfgId,
 			    uint8_t *pBuf, uint32_t *pLength)
 			    uint8_t *pBuf, uint32_t *pLength)
 {
 {
 	uint8_t *pSrc, *pSrcEnd;
 	uint8_t *pSrc, *pSrcEnd;
@@ -496,7 +496,7 @@ QDF_STATUS wlan_cfg_get_str(tpAniSirGlobal mac, uint16_t cfgId,
  *
  *
  */
  */
 
 
-QDF_STATUS wlan_cfg_get_str_max_len(tpAniSirGlobal mac, uint16_t cfgId,
+QDF_STATUS wlan_cfg_get_str_max_len(struct mac_context *mac, uint16_t cfgId,
 				    uint32_t *pLength)
 				    uint32_t *pLength)
 {
 {
 	uint32_t index;
 	uint32_t index;
@@ -535,7 +535,7 @@ QDF_STATUS wlan_cfg_get_str_max_len(tpAniSirGlobal mac, uint16_t cfgId,
  *
  *
  */
  */
 
 
-QDF_STATUS wlan_cfg_get_str_len(tpAniSirGlobal mac, uint16_t cfgId,
+QDF_STATUS wlan_cfg_get_str_len(struct mac_context *mac, uint16_t cfgId,
 				uint32_t *pLength)
 				uint32_t *pLength)
 {
 {
 	uint32_t index;
 	uint32_t index;
@@ -560,7 +560,7 @@ QDF_STATUS wlan_cfg_get_str_len(tpAniSirGlobal mac, uint16_t cfgId,
  * Return:  int8_t - power
  * Return:  int8_t - power
  */
  */
 static int8_t
 static int8_t
-cfg_get_dot11d_transmit_power(tpAniSirGlobal pMac, uint8_t channel)
+cfg_get_dot11d_transmit_power(struct mac_context *pMac, uint8_t channel)
 {
 {
 	uint32_t cfg_length = 0;
 	uint32_t cfg_length = 0;
 	int8_t max_tx_pwr = 0;
 	int8_t max_tx_pwr = 0;
@@ -618,7 +618,7 @@ error:
    \param  channel
    \param  channel
    \param  rfBand
    \param  rfBand
    -----------------------------------------------------------------------*/
    -----------------------------------------------------------------------*/
-int8_t cfg_get_regulatory_max_transmit_power(tpAniSirGlobal mac,
+int8_t cfg_get_regulatory_max_transmit_power(struct mac_context *mac,
 					     uint8_t channel)
 					     uint8_t channel)
 {
 {
 	return cfg_get_dot11d_transmit_power(mac, channel);
 	return cfg_get_dot11d_transmit_power(mac, channel);
@@ -640,7 +640,7 @@ int8_t cfg_get_regulatory_max_transmit_power(tpAniSirGlobal mac,
  * @return None
  * @return None
  */
  */
 
 
-QDF_STATUS cfg_get_capability_info(tpAniSirGlobal mac, uint16_t *pCap,
+QDF_STATUS cfg_get_capability_info(struct mac_context *mac, uint16_t *pCap,
 				   struct pe_session *pe_session)
 				   struct pe_session *pe_session)
 {
 {
 	uint32_t val = 0;
 	uint32_t val = 0;
@@ -767,7 +767,7 @@ QDF_STATUS cfg_get_capability_info(tpAniSirGlobal mac, uint16_t *pCap,
  * @return None
  * @return None
  */
  */
 
 
-void cfg_set_capability_info(tpAniSirGlobal mac, uint16_t caps)
+void cfg_set_capability_info(struct mac_context *mac, uint16_t caps)
 {
 {
 }
 }
 
 
@@ -792,7 +792,7 @@ void cfg_set_capability_info(tpAniSirGlobal mac, uint16_t caps)
  *
  *
  */
  */
 
 
-void cfg_cleanup(tpAniSirGlobal mac)
+void cfg_cleanup(struct mac_context *mac)
 {
 {
 	/* Set status to not-ready */
 	/* Set status to not-ready */
 	mac->cfg.gCfgStatus = CFG_INCOMPLETE;
 	mac->cfg.gCfgStatus = CFG_INCOMPLETE;
@@ -819,7 +819,7 @@ void cfg_cleanup(tpAniSirGlobal mac)
  *
  *
  */
  */
 
 
-static void notify(tpAniSirGlobal mac, uint16_t cfgId, uint32_t ntfMask)
+static void notify(struct mac_context *mac, uint16_t cfgId, uint32_t ntfMask)
 {
 {
 
 
 	struct scheduler_msg mmhMsg = {0};
 	struct scheduler_msg mmhMsg = {0};

+ 2 - 2
core/mac/src/cfg/cfg_priv.h

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2015, 2018 The Linux Foundation. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * any purpose with or without fee is hereby granted, provided that the
@@ -75,7 +75,7 @@ typedef struct sCfgBinHdr {
 /* CFG function prototypes                                            */
 /* CFG function prototypes                                            */
 /*--------------------------------------------------------------------*/
 /*--------------------------------------------------------------------*/
 
 
-extern void cfg_send_host_msg(tpAniSirGlobal, uint16_t, uint32_t, uint32_t,
+extern void cfg_send_host_msg(struct mac_context *, uint16_t, uint32_t, uint32_t,
 			      uint32_t *, uint32_t, uint32_t *);
 			      uint32_t *, uint32_t, uint32_t *);
 
 
 #endif /* __CFGPRIV_H */
 #endif /* __CFGPRIV_H */

+ 9 - 9
core/mac/src/cfg/cfg_proc_msg.c

@@ -182,17 +182,17 @@ cfgstatic_string cfg_static_string[CFG_MAX_STATIC_STRING] = {
 /*--------------------------------------------------------------------*/
 /*--------------------------------------------------------------------*/
 /* Static function prototypes                                         */
 /* Static function prototypes                                         */
 /*--------------------------------------------------------------------*/
 /*--------------------------------------------------------------------*/
-static void proc_dnld_rsp(tpAniSirGlobal, uint16_t, uint32_t *);
-static void proc_get_req(tpAniSirGlobal, uint16_t, uint32_t *);
+static void proc_dnld_rsp(struct mac_context *, uint16_t, uint32_t *);
+static void proc_get_req(struct mac_context *, uint16_t, uint32_t *);
 
 
-static uint8_t check_param(tpAniSirGlobal, uint16_t, uint32_t, uint32_t,
+static uint8_t check_param(struct mac_context *, uint16_t, uint32_t, uint32_t,
 			   uint32_t *);
 			   uint32_t *);
 /*--------------------------------------------------------------------*/
 /*--------------------------------------------------------------------*/
 /* Module global variables                                            */
 /* Module global variables                                            */
 /*--------------------------------------------------------------------*/
 /*--------------------------------------------------------------------*/
 
 
 /* CFG function table */
 /* CFG function table */
-void (*g_cfg_func[])(tpAniSirGlobal, uint16_t, uint32_t *) = {
+void (*g_cfg_func[])(struct mac_context *, uint16_t, uint32_t *) = {
 	proc_dnld_rsp, proc_get_req
 	proc_dnld_rsp, proc_get_req
 };
 };
 
 
@@ -214,7 +214,7 @@ void (*g_cfg_func[])(tpAniSirGlobal, uint16_t, uint32_t *) = {
  * @return None.
  * @return None.
  *
  *
  */
  */
-void cfg_process_mb_msg(tpAniSirGlobal mac, tSirMbMsg *pMsg)
+void cfg_process_mb_msg(struct mac_context *mac, tSirMbMsg *pMsg)
 {
 {
 	uint16_t index;
 	uint16_t index;
 	uint16_t len;
 	uint16_t len;
@@ -256,7 +256,7 @@ void cfg_process_mb_msg(tpAniSirGlobal mac, tSirMbMsg *pMsg)
  * @return None
  * @return None
  *
  *
  */
  */
-static void proc_dnld_rsp(tpAniSirGlobal mac, uint16_t length, uint32_t *pParam)
+static void proc_dnld_rsp(struct mac_context *mac, uint16_t length, uint32_t *pParam)
 {
 {
 	int32_t i;
 	int32_t i;
 
 
@@ -468,7 +468,7 @@ end:
  * @return None
  * @return None
  *
  *
  */
  */
-static void proc_get_req(tpAniSirGlobal mac, uint16_t length, uint32_t *pParam)
+static void proc_get_req(struct mac_context *mac, uint16_t length, uint32_t *pParam)
 {
 {
 	uint16_t cfgId, i;
 	uint16_t cfgId, i;
 	uint32_t value, valueLen, result;
 	uint32_t value, valueLen, result;
@@ -573,7 +573,7 @@ static void proc_get_req(tpAniSirGlobal mac, uint16_t length, uint32_t *pParam)
  *
  *
  */
  */
 static uint8_t
 static uint8_t
-check_param(tpAniSirGlobal mac, uint16_t cfgId, uint32_t flag,
+check_param(struct mac_context *mac, uint16_t cfgId, uint32_t flag,
 	    uint32_t failedResult, uint32_t *pResult)
 	    uint32_t failedResult, uint32_t *pResult)
 {
 {
 	/* Check if parameter ID is out of bound */
 	/* Check if parameter ID is out of bound */
@@ -620,7 +620,7 @@ check_param(tpAniSirGlobal mac, uint16_t cfgId, uint32_t flag,
  */
  */
 
 
 void
 void
-process_cfg_download_req(tpAniSirGlobal mac)
+process_cfg_download_req(struct mac_context *mac)
 {
 {
 	int32_t i;
 	int32_t i;
 	uint32_t    index;
 	uint32_t    index;

+ 1 - 1
core/mac/src/cfg/cfg_send_msg.c

@@ -60,7 +60,7 @@
  *
  *
  */
  */
 void
 void
-cfg_send_host_msg(tpAniSirGlobal mac, uint16_t msgType, uint32_t msgLen,
+cfg_send_host_msg(struct mac_context *mac, uint16_t msgType, uint32_t msgLen,
 		  uint32_t paramNum, uint32_t *pParamList, uint32_t dataLen,
 		  uint32_t paramNum, uint32_t *pParamList, uint32_t dataLen,
 		  uint32_t *pData)
 		  uint32_t *pData)
 {
 {

+ 10 - 10
core/mac/src/dph/dph_hash_table.c

@@ -53,7 +53,7 @@
  * @return None
  * @return None
  */
  */
 
 
-void dph_hash_table_class_init(tpAniSirGlobal mac,
+void dph_hash_table_class_init(struct mac_context *mac,
 			       dphHashTableClass *pDphHashTable)
 			       dphHashTableClass *pDphHashTable)
 {
 {
 	uint16_t i;
 	uint16_t i;
@@ -87,7 +87,7 @@ void dph_hash_table_class_init(tpAniSirGlobal mac,
  * @return None
  * @return None
  */
  */
 
 
-static uint16_t hash_function(tpAniSirGlobal mac, uint8_t staAddr[],
+static uint16_t hash_function(struct mac_context *mac, uint8_t staAddr[],
 			      uint16_t numSta)
 			      uint16_t numSta)
 {
 {
 	int i;
 	int i;
@@ -118,7 +118,7 @@ static uint16_t hash_function(tpAniSirGlobal mac, uint8_t staAddr[],
  *         NULL if lookup was a failure
  *         NULL if lookup was a failure
  */
  */
 
 
-tpDphHashNode dph_lookup_hash_entry(tpAniSirGlobal mac, uint8_t staAddr[],
+tpDphHashNode dph_lookup_hash_entry(struct mac_context *mac, uint8_t staAddr[],
 				    uint16_t *pAssocId,
 				    uint16_t *pAssocId,
 				    dphHashTableClass *pDphHashTable)
 				    dphHashTableClass *pDphHashTable)
 {
 {
@@ -157,7 +157,7 @@ tpDphHashNode dph_lookup_hash_entry(tpAniSirGlobal mac, uint8_t staAddr[],
  *         NULL if lookup was a failure
  *         NULL if lookup was a failure
  */
  */
 
 
-tpDphHashNode dph_get_hash_entry(tpAniSirGlobal mac, uint16_t peerIdx,
+tpDphHashNode dph_get_hash_entry(struct mac_context *mac, uint16_t peerIdx,
 				 dphHashTableClass *pDphHashTable)
 				 dphHashTableClass *pDphHashTable)
 {
 {
 	if (peerIdx < pDphHashTable->size) {
 	if (peerIdx < pDphHashTable->size) {
@@ -170,7 +170,7 @@ tpDphHashNode dph_get_hash_entry(tpAniSirGlobal mac, uint16_t peerIdx,
 
 
 }
 }
 
 
-static inline tpDphHashNode get_node(tpAniSirGlobal mac, uint8_t assocId,
+static inline tpDphHashNode get_node(struct mac_context *mac, uint8_t assocId,
 				     dphHashTableClass *pDphHashTable)
 				     dphHashTableClass *pDphHashTable)
 {
 {
 	return &pDphHashTable->pDphNodeArray[assocId];
 	return &pDphHashTable->pDphNodeArray[assocId];
@@ -194,7 +194,7 @@ static inline tpDphHashNode get_node(tpAniSirGlobal mac, uint8_t assocId,
  * @param *assocId pointer to associd to be returned by this function.
  * @param *assocId pointer to associd to be returned by this function.
  * @return pointer to the dph node.
  * @return pointer to the dph node.
  */
  */
-tpDphHashNode dph_lookup_assoc_id(tpAniSirGlobal mac, uint16_t staIdx,
+tpDphHashNode dph_lookup_assoc_id(struct mac_context *mac, uint16_t staIdx,
 				  uint16_t *assocId,
 				  uint16_t *assocId,
 				  dphHashTableClass *pDphHashTable)
 				  dphHashTableClass *pDphHashTable)
 {
 {
@@ -218,7 +218,7 @@ tpDphHashNode dph_lookup_assoc_id(tpAniSirGlobal mac, uint16_t staIdx,
    \fn dph_init_sta_state
    \fn dph_init_sta_state
    \brief Initialize STA state. this function saves the staId from the current entry in the DPH table with given assocId
    \brief Initialize STA state. this function saves the staId from the current entry in the DPH table with given assocId
  \ if validStaIdx flag is set. Otherwise it sets the staId to invalid.
  \ if validStaIdx flag is set. Otherwise it sets the staId to invalid.
-   \param  tpAniSirGlobal    mac
+   \param  struct mac_context *   mac
    \param  tSirMacAddr staAddr
    \param  tSirMacAddr staAddr
    \param  uint16_t assocId
    \param  uint16_t assocId
    \param  uint8_t validStaIdx -   true ==> the staId in the DPH entry with given assocId is valid and restore it back.
    \param  uint8_t validStaIdx -   true ==> the staId in the DPH entry with given assocId is valid and restore it back.
@@ -226,7 +226,7 @@ tpDphHashNode dph_lookup_assoc_id(tpAniSirGlobal mac, uint16_t staIdx,
    \return tpDphHashNode - DPH hash node if found.
    \return tpDphHashNode - DPH hash node if found.
    -------------------------------------------------------------*/
    -------------------------------------------------------------*/
 
 
-tpDphHashNode dph_init_sta_state(tpAniSirGlobal mac, tSirMacAddr staAddr,
+tpDphHashNode dph_init_sta_state(struct mac_context *mac, tSirMacAddr staAddr,
 				 uint16_t assocId, uint8_t validStaIdx,
 				 uint16_t assocId, uint8_t validStaIdx,
 				 dphHashTableClass *pDphHashTable)
 				 dphHashTableClass *pDphHashTable)
 {
 {
@@ -293,7 +293,7 @@ tpDphHashNode dph_init_sta_state(tpAniSirGlobal mac, tSirMacAddr staAddr,
  * @return Pointer to STA hash entry
  * @return Pointer to STA hash entry
  */
  */
 
 
-tpDphHashNode dph_add_hash_entry(tpAniSirGlobal mac, tSirMacAddr staAddr,
+tpDphHashNode dph_add_hash_entry(struct mac_context *mac, tSirMacAddr staAddr,
 				 uint16_t assocId,
 				 uint16_t assocId,
 				 dphHashTableClass *pDphHashTable)
 				 dphHashTableClass *pDphHashTable)
 {
 {
@@ -366,7 +366,7 @@ tpDphHashNode dph_add_hash_entry(tpAniSirGlobal mac, tSirMacAddr staAddr,
  *         QDF_STATUS_E_FAILURE otherwise
  *         QDF_STATUS_E_FAILURE otherwise
  */
  */
 
 
-QDF_STATUS dph_delete_hash_entry(tpAniSirGlobal mac, tSirMacAddr staAddr,
+QDF_STATUS dph_delete_hash_entry(struct mac_context *mac, tSirMacAddr staAddr,
 				 uint16_t assocId,
 				 uint16_t assocId,
 				 dphHashTableClass *pDphHashTable)
 				 dphHashTableClass *pDphHashTable)
 {
 {

+ 7 - 7
core/mac/src/dph/dph_hash_table.h

@@ -56,32 +56,32 @@ typedef struct {
 /* The hash table object */
 /* The hash table object */
 extern dphHashTableClass dphHashTable;
 extern dphHashTableClass dphHashTable;
 
 
-tpDphHashNode dph_lookup_hash_entry(tpAniSirGlobal mac, uint8_t staAddr[],
+tpDphHashNode dph_lookup_hash_entry(struct mac_context *mac, uint8_t staAddr[],
 				    uint16_t *pStaId,
 				    uint16_t *pStaId,
 				    dphHashTableClass *pDphHashTable);
 				    dphHashTableClass *pDphHashTable);
-tpDphHashNode dph_lookup_assoc_id(tpAniSirGlobal mac, uint16_t staIdx,
+tpDphHashNode dph_lookup_assoc_id(struct mac_context *mac, uint16_t staIdx,
 				  uint16_t *assocId,
 				  uint16_t *assocId,
 				  dphHashTableClass *pDphHashTable);
 				  dphHashTableClass *pDphHashTable);
 
 
 /* Get a pointer to the hash node */
 /* Get a pointer to the hash node */
-extern tpDphHashNode dph_get_hash_entry(tpAniSirGlobal mac, uint16_t staId,
+extern tpDphHashNode dph_get_hash_entry(struct mac_context *mac, uint16_t staId,
 					dphHashTableClass *pDphHashTable);
 					dphHashTableClass *pDphHashTable);
 
 
 /* Add an entry to the hash table */
 /* Add an entry to the hash table */
-extern tpDphHashNode dph_add_hash_entry(tpAniSirGlobal mac,
+extern tpDphHashNode dph_add_hash_entry(struct mac_context *mac,
 					tSirMacAddr staAddr,
 					tSirMacAddr staAddr,
 					uint16_t staId,
 					uint16_t staId,
 					dphHashTableClass *pDphHashTable);
 					dphHashTableClass *pDphHashTable);
 
 
 /* Delete an entry from the hash table */
 /* Delete an entry from the hash table */
-QDF_STATUS dph_delete_hash_entry(tpAniSirGlobal mac,
+QDF_STATUS dph_delete_hash_entry(struct mac_context *mac,
 				 tSirMacAddr staAddr, uint16_t staId,
 				 tSirMacAddr staAddr, uint16_t staId,
 				 dphHashTableClass *pDphHashTable);
 				 dphHashTableClass *pDphHashTable);
 
 
-void dph_hash_table_class_init(tpAniSirGlobal mac,
+void dph_hash_table_class_init(struct mac_context *mac,
 			       dphHashTableClass *pDphHashTable);
 			       dphHashTableClass *pDphHashTable);
 /* Initialize STA state */
 /* Initialize STA state */
-extern tpDphHashNode dph_init_sta_state(tpAniSirGlobal mac,
+extern tpDphHashNode dph_init_sta_state(struct mac_context *mac,
 					tSirMacAddr staAddr,
 					tSirMacAddr staAddr,
 					uint16_t staId, uint8_t validStaIdx,
 					uint16_t staId, uint8_t validStaIdx,
 					dphHashTableClass *pDphHashTable);
 					dphHashTableClass *pDphHashTable);

+ 16 - 16
core/mac/src/include/cfg_api.h

@@ -58,52 +58,52 @@ typedef struct {
 /* CFG function prototypes                                             */
 /* CFG function prototypes                                             */
 /*---------------------------------------------------------------------*/
 /*---------------------------------------------------------------------*/
 
 
-uint32_t cfg_need_restart(tpAniSirGlobal mac, uint16_t cfgId);
-uint32_t cfg_need_reload(tpAniSirGlobal mac, uint16_t cfgId);
+uint32_t cfg_need_restart(struct mac_context *mac, uint16_t cfgId);
+uint32_t cfg_need_reload(struct mac_context *mac, uint16_t cfgId);
 
 
 /* / Process host message */
 /* / Process host message */
-void cfg_process_mb_msg(tpAniSirGlobal, tSirMbMsg *);
+void cfg_process_mb_msg(struct mac_context *, tSirMbMsg *);
 
 
 /* / Set integer parameter value */
 /* / Set integer parameter value */
-QDF_STATUS cfg_set_int(tpAniSirGlobal, uint16_t, uint32_t);
+QDF_STATUS cfg_set_int(struct mac_context *, uint16_t, uint32_t);
 
 
 /* / Check if the parameter is valid */
 /* / Check if the parameter is valid */
-QDF_STATUS cfg_check_valid(tpAniSirGlobal, uint16_t, uint32_t *);
+QDF_STATUS cfg_check_valid(struct mac_context *, uint16_t, uint32_t *);
 
 
 /* / Get integer parameter value */
 /* / Get integer parameter value */
-QDF_STATUS wlan_cfg_get_int(tpAniSirGlobal, uint16_t, uint32_t *);
+QDF_STATUS wlan_cfg_get_int(struct mac_context *, uint16_t, uint32_t *);
 
 
 /* / Set string parameter value */
 /* / Set string parameter value */
-QDF_STATUS cfg_set_str(tpAniSirGlobal, uint16_t, uint8_t *, uint32_t);
+QDF_STATUS cfg_set_str(struct mac_context *, uint16_t, uint8_t *, uint32_t);
 
 
-QDF_STATUS cfg_set_str_notify(tpAniSirGlobal, uint16_t, uint8_t *, uint32_t,
+QDF_STATUS cfg_set_str_notify(struct mac_context *, uint16_t, uint8_t *, uint32_t,
 			      int);
 			      int);
 
 
 /* Cfg Download function for Prima or Integrated solutions. */
 /* Cfg Download function for Prima or Integrated solutions. */
-void process_cfg_download_req(tpAniSirGlobal);
+void process_cfg_download_req(struct mac_context *);
 
 
 /* / Get string parameter value */
 /* / Get string parameter value */
-QDF_STATUS wlan_cfg_get_str(tpAniSirGlobal, uint16_t, uint8_t *, uint32_t *);
+QDF_STATUS wlan_cfg_get_str(struct mac_context *, uint16_t, uint8_t *, uint32_t *);
 
 
 /* / Get string parameter maximum length */
 /* / Get string parameter maximum length */
-QDF_STATUS wlan_cfg_get_str_max_len(tpAniSirGlobal, uint16_t, uint32_t *);
+QDF_STATUS wlan_cfg_get_str_max_len(struct mac_context *, uint16_t, uint32_t *);
 
 
 /* / Get string parameter maximum length */
 /* / Get string parameter maximum length */
-QDF_STATUS wlan_cfg_get_str_len(tpAniSirGlobal, uint16_t, uint32_t *);
+QDF_STATUS wlan_cfg_get_str_len(struct mac_context *, uint16_t, uint32_t *);
 
 
 /* / Get the regulatory tx power on given channel */
 /* / Get the regulatory tx power on given channel */
-int8_t cfg_get_regulatory_max_transmit_power(tpAniSirGlobal mac,
+int8_t cfg_get_regulatory_max_transmit_power(struct mac_context *mac,
 					     uint8_t channel);
 					     uint8_t channel);
 
 
 /* / Get capability info */
 /* / Get capability info */
-QDF_STATUS cfg_get_capability_info(tpAniSirGlobal mac, uint16_t *pCap,
+QDF_STATUS cfg_get_capability_info(struct mac_context *mac, uint16_t *pCap,
 				   struct pe_session *pe_session);
 				   struct pe_session *pe_session);
 
 
 /* / Set capability info */
 /* / Set capability info */
-void cfg_set_capability_info(tpAniSirGlobal, uint16_t);
+void cfg_set_capability_info(struct mac_context *, uint16_t);
 
 
 /* / Cleanup CFG module */
 /* / Cleanup CFG module */
-void cfg_cleanup(tpAniSirGlobal mac);
+void cfg_cleanup(struct mac_context *mac);
 
 
 const char *cfg_get_string(uint16_t cfg_id);
 const char *cfg_get_string(uint16_t cfg_id);
 
 

+ 2 - 2
core/mac/src/include/utils_api.h

@@ -38,8 +38,8 @@ typedef enum eBssSystemRole {
 	eSYSTEM_MULTI_BSS_ROLE = eSYSTEM_LAST_ROLE
 	eSYSTEM_MULTI_BSS_ROLE = eSYSTEM_LAST_ROLE
 } tBssSystemRole;
 } tBssSystemRole;
 
 
-QDF_STATUS cfg_init(tpAniSirGlobal);
-void cfg_de_init(tpAniSirGlobal);
+QDF_STATUS cfg_init(struct mac_context *);
+void cfg_de_init(struct mac_context *);
 
 
 /**
 /**
  * sir_swap_u16()
  * sir_swap_u16()

+ 1 - 1
core/mac/src/sys/common/src/wlan_qct_sys.c

@@ -212,7 +212,7 @@ QDF_STATUS sys_mc_process_handler(struct scheduler_msg *msg)
  *
  *
  * Return: none
  * Return: none
  */
  */
-void sys_process_mmh_msg(tpAniSirGlobal mac, struct scheduler_msg *pMsg)
+void sys_process_mmh_msg(struct mac_context *mac, struct scheduler_msg *pMsg)
 {
 {
 	QDF_MODULE_ID targetMQ = QDF_MODULE_ID_SYS;
 	QDF_MODULE_ID targetMQ = QDF_MODULE_ID_SYS;
 
 

+ 1 - 1
core/mac/src/sys/legacy/src/system/inc/sys_entry_func.h

@@ -30,7 +30,7 @@
 
 
 #include "ani_global.h"
 #include "ani_global.h"
 
 
-extern QDF_STATUS sys_init_globals(tpAniSirGlobal);
+extern QDF_STATUS sys_init_globals(struct mac_context *);
 extern void sysBbtEntry(uint32_t dummy);
 extern void sysBbtEntry(uint32_t dummy);
 extern void sysSchEntry(uint32_t dummy);
 extern void sysSchEntry(uint32_t dummy);
 extern void sysPmmEntry(uint32_t dummy);
 extern void sysPmmEntry(uint32_t dummy);

+ 6 - 6
core/mac/src/sys/legacy/src/system/src/mac_init_api.c

@@ -43,7 +43,7 @@
 #ifdef WLAN_ALLOCATE_GLOBAL_BUFFERS_DYNAMICALLY
 #ifdef WLAN_ALLOCATE_GLOBAL_BUFFERS_DYNAMICALLY
 static struct mac_context *global_mac_context;
 static struct mac_context *global_mac_context;
 
 
-static inline tpAniSirGlobal mac_allocate_context_buffer(void)
+static inline struct mac_context *mac_allocate_context_buffer(void)
 {
 {
 	global_mac_context = qdf_mem_malloc(sizeof(*global_mac_context));
 	global_mac_context = qdf_mem_malloc(sizeof(*global_mac_context));
 
 
@@ -58,7 +58,7 @@ static inline void mac_free_context_buffer(void)
 #else /* WLAN_ALLOCATE_GLOBAL_BUFFERS_DYNAMICALLY */
 #else /* WLAN_ALLOCATE_GLOBAL_BUFFERS_DYNAMICALLY */
 static struct mac_context global_mac_context;
 static struct mac_context global_mac_context;
 
 
-static inline tpAniSirGlobal mac_allocate_context_buffer(void)
+static inline struct mac_context *mac_allocate_context_buffer(void)
 {
 {
 	return &global_mac_context;
 	return &global_mac_context;
 }
 }
@@ -72,7 +72,7 @@ QDF_STATUS mac_start(mac_handle_t mac_handle,
 		     struct mac_start_params *params)
 		     struct mac_start_params *params)
 {
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tpAniSirGlobal mac = MAC_CONTEXT(mac_handle);
+	struct mac_context *mac = MAC_CONTEXT(mac_handle);
 
 
 	if (!mac || !params) {
 	if (!mac || !params) {
 		QDF_ASSERT(0);
 		QDF_ASSERT(0);
@@ -90,7 +90,7 @@ QDF_STATUS mac_start(mac_handle_t mac_handle,
 
 
 QDF_STATUS mac_stop(mac_handle_t mac_handle)
 QDF_STATUS mac_stop(mac_handle_t mac_handle)
 {
 {
-	tpAniSirGlobal mac = MAC_CONTEXT(mac_handle);
+	struct mac_context *mac = MAC_CONTEXT(mac_handle);
 
 
 	pe_stop(mac);
 	pe_stop(mac);
 	cfg_cleanup(mac);
 	cfg_cleanup(mac);
@@ -101,7 +101,7 @@ QDF_STATUS mac_stop(mac_handle_t mac_handle)
 QDF_STATUS mac_open(struct wlan_objmgr_psoc *psoc, mac_handle_t *mac_handle,
 QDF_STATUS mac_open(struct wlan_objmgr_psoc *psoc, mac_handle_t *mac_handle,
 		    hdd_handle_t hdd_handle, struct cds_config_info *cds_cfg)
 		    hdd_handle_t hdd_handle, struct cds_config_info *cds_cfg)
 {
 {
-	tpAniSirGlobal mac;
+	struct mac_context *mac;
 	QDF_STATUS status;
 	QDF_STATUS status;
 	struct wlan_mlme_psoc_obj *mlme_obj;
 	struct wlan_mlme_psoc_obj *mlme_obj;
 
 
@@ -177,7 +177,7 @@ free_mac_context:
 QDF_STATUS mac_close(mac_handle_t mac_handle)
 QDF_STATUS mac_close(mac_handle_t mac_handle)
 {
 {
 
 
-	tpAniSirGlobal mac = MAC_CONTEXT(mac_handle);
+	struct mac_context *mac = MAC_CONTEXT(mac_handle);
 
 
 	if (!mac)
 	if (!mac)
 		return QDF_STATUS_E_FAILURE;
 		return QDF_STATUS_E_FAILURE;

+ 2 - 2
core/mac/src/sys/legacy/src/system/src/sys_entry_func.c

@@ -58,11 +58,11 @@
  *
  *
  * NOTE:
  * NOTE:
  *
  *
- * @param tpAniSirGlobal Sirius software parameter struct pointer
+ * @param struct mac_context *Sirius software parameter struct pointer
  * @return None
  * @return None
  */
  */
 
 
-QDF_STATUS sys_init_globals(tpAniSirGlobal mac)
+QDF_STATUS sys_init_globals(struct mac_context *mac)
 {
 {
 
 
 	qdf_mem_set((uint8_t *) &mac->sys, sizeof(mac->sys), 0);
 	qdf_mem_set((uint8_t *) &mac->sys, sizeof(mac->sys), 0);

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

@@ -784,7 +784,7 @@ uint8_t *mac_trace_get_info_log_string(uint16_t info_log)
  *
  *
  * Return: None
  * Return: None
  **/
  **/
-void mac_trace(tpAniSirGlobal mac_ctx, uint8_t code,
+void mac_trace(struct mac_context *mac_ctx, uint8_t code,
 		uint16_t session, uint32_t data)
 		uint16_t session, uint32_t data)
 {
 {
 	/*
 	/*
@@ -803,7 +803,7 @@ void mac_trace(tpAniSirGlobal mac_ctx, uint8_t code,
  *
  *
  * Return: None
  * Return: None
  **/
  **/
-void mac_trace_new(tpAniSirGlobal mac_ctx, uint8_t module, uint8_t code,
+void mac_trace_new(struct mac_context *mac_ctx, uint8_t module, uint8_t code,
 		   uint16_t session, uint32_t data)
 		   uint16_t session, uint32_t data)
 {
 {
 	qdf_trace(module, code, session, data);
 	qdf_trace(module, code, session, data);