diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h index d267aca8b03f..d2149c09d4f9 100644 --- a/core/mac/inc/ani_global.h +++ b/core/mac/inc/ani_global.h @@ -55,9 +55,9 @@ * * 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 */ -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; } -#define ANI_DRIVER_TYPE(mac) (((tpAniSirGlobal)(mac))->gDriverType) +#define ANI_DRIVER_TYPE(mac) (((struct mac_context *)(mac))->gDriverType) /* ------------------------------------------------------------------- */ /* Bss Qos Caps bit map definition */ @@ -245,7 +245,7 @@ enum wifi_logging_ring_id { /* ------------------------------------------------------------------- */ /* 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, struct pe_session *pe_session); @@ -724,9 +724,9 @@ typedef struct sAniSirLim { uint8_t gLimDfsChanSwTxCount; uint8_t gLimDfsTargetChanNum; QDF_STATUS(*sme_msg_callback) - (tpAniSirGlobal mac, struct scheduler_msg *msg); + (struct mac_context *mac, struct scheduler_msg *msg); 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 beacon_probe_rsp_cnt_per_scan; wlan_scan_requester req_id; diff --git a/core/mac/inc/mac_trace.h b/core/mac/inc/mac_trace.h index ab1a7c2bfbb7..16140d8a9cb0 100644 --- a/core/mac/inc/mac_trace.h +++ b/core/mac/inc/mac_trace.h @@ -39,9 +39,9 @@ #define eLOG_NODROP_MISSED_BEACON_SCENARIO 0 #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); -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); uint8_t *mac_trace_get_cfg_msg_string(uint16_t cfgMsg); uint8_t *mac_trace_get_lim_msg_string(uint16_t limMsg); diff --git a/core/mac/src/cfg/cfg_api.c b/core/mac/src/cfg/cfg_api.c index bfca77f0da24..31f2661b6581 100644 --- a/core/mac/src/cfg/cfg_api.c +++ b/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 + 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 { 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]; /* --------------------------------------------------------------------- */ -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) { 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); } -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; @@ -77,7 +77,7 @@ static void cfg_get_strindex(tpAniSirGlobal mac, uint16_t cfgId) 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) { 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 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); mac->cfg.gCfgIBufMin = NULL; @@ -182,7 +182,7 @@ void cfg_de_init(tpAniSirGlobal mac) * @return QDF_STATUS_SUCCESS: request completed successfully * @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 control; @@ -242,7 +242,7 @@ QDF_STATUS cfg_check_valid(tpAniSirGlobal mac, uint16_t cfgId, * @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 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 */ -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 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) { 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, 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 *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 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 index; @@ -560,7 +560,7 @@ QDF_STATUS wlan_cfg_get_str_len(tpAniSirGlobal mac, uint16_t cfgId, * Return: int8_t - power */ 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; int8_t max_tx_pwr = 0; @@ -618,7 +618,7 @@ error: \param channel \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) { return cfg_get_dot11d_transmit_power(mac, channel); @@ -640,7 +640,7 @@ int8_t cfg_get_regulatory_max_transmit_power(tpAniSirGlobal mac, * @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) { uint32_t val = 0; @@ -767,7 +767,7 @@ QDF_STATUS cfg_get_capability_info(tpAniSirGlobal mac, uint16_t *pCap, * @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 */ 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}; diff --git a/core/mac/src/cfg/cfg_priv.h b/core/mac/src/cfg/cfg_priv.h index 79fc0d7ce56e..5a41f950fbf9 100644 --- a/core/mac/src/cfg/cfg_priv.h +++ b/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 * any purpose with or without fee is hereby granted, provided that the @@ -75,7 +75,7 @@ typedef struct sCfgBinHdr { /* 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 *); #endif /* __CFGPRIV_H */ diff --git a/core/mac/src/cfg/cfg_proc_msg.c b/core/mac/src/cfg/cfg_proc_msg.c index 89cb275af717..c4690ee08a85 100644 --- a/core/mac/src/cfg/cfg_proc_msg.c +++ b/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 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 *); /*--------------------------------------------------------------------*/ /* Module global variables */ /*--------------------------------------------------------------------*/ /* 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 }; @@ -214,7 +214,7 @@ void (*g_cfg_func[])(tpAniSirGlobal, uint16_t, uint32_t *) = { * @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 len; @@ -256,7 +256,7 @@ void cfg_process_mb_msg(tpAniSirGlobal mac, tSirMbMsg *pMsg) * @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; @@ -468,7 +468,7 @@ end: * @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; 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 -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) { /* Check if parameter ID is out of bound */ @@ -620,7 +620,7 @@ check_param(tpAniSirGlobal mac, uint16_t cfgId, uint32_t flag, */ void -process_cfg_download_req(tpAniSirGlobal mac) +process_cfg_download_req(struct mac_context *mac) { int32_t i; uint32_t index; diff --git a/core/mac/src/cfg/cfg_send_msg.c b/core/mac/src/cfg/cfg_send_msg.c index 599fd6cc7f93..f0e2f49ade31 100644 --- a/core/mac/src/cfg/cfg_send_msg.c +++ b/core/mac/src/cfg/cfg_send_msg.c @@ -60,7 +60,7 @@ * */ 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 *pData) { diff --git a/core/mac/src/dph/dph_hash_table.c b/core/mac/src/dph/dph_hash_table.c index f5d4b4e1fe7e..744cfbfbefd9 100644 --- a/core/mac/src/dph/dph_hash_table.c +++ b/core/mac/src/dph/dph_hash_table.c @@ -53,7 +53,7 @@ * @return None */ -void dph_hash_table_class_init(tpAniSirGlobal mac, +void dph_hash_table_class_init(struct mac_context *mac, dphHashTableClass *pDphHashTable) { uint16_t i; @@ -87,7 +87,7 @@ void dph_hash_table_class_init(tpAniSirGlobal mac, * @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) { int i; @@ -118,7 +118,7 @@ static uint16_t hash_function(tpAniSirGlobal mac, uint8_t staAddr[], * 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, dphHashTableClass *pDphHashTable) { @@ -157,7 +157,7 @@ tpDphHashNode dph_lookup_hash_entry(tpAniSirGlobal mac, uint8_t staAddr[], * 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) { 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) { 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. * @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, dphHashTableClass *pDphHashTable) { @@ -218,7 +218,7 @@ tpDphHashNode dph_lookup_assoc_id(tpAniSirGlobal mac, uint16_t staIdx, \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 \ if validStaIdx flag is set. Otherwise it sets the staId to invalid. - \param tpAniSirGlobal mac + \param struct mac_context * mac \param tSirMacAddr staAddr \param uint16_t assocId \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. -------------------------------------------------------------*/ -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, dphHashTableClass *pDphHashTable) { @@ -293,7 +293,7 @@ tpDphHashNode dph_init_sta_state(tpAniSirGlobal mac, tSirMacAddr staAddr, * @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, dphHashTableClass *pDphHashTable) { @@ -366,7 +366,7 @@ tpDphHashNode dph_add_hash_entry(tpAniSirGlobal mac, tSirMacAddr staAddr, * 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, dphHashTableClass *pDphHashTable) { diff --git a/core/mac/src/dph/dph_hash_table.h b/core/mac/src/dph/dph_hash_table.h index dd48404180a5..51ad16203eea 100644 --- a/core/mac/src/dph/dph_hash_table.h +++ b/core/mac/src/dph/dph_hash_table.h @@ -56,32 +56,32 @@ typedef struct { /* The hash table object */ 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, 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, dphHashTableClass *pDphHashTable); /* 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); /* 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, uint16_t staId, dphHashTableClass *pDphHashTable); /* 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, dphHashTableClass *pDphHashTable); -void dph_hash_table_class_init(tpAniSirGlobal mac, +void dph_hash_table_class_init(struct mac_context *mac, dphHashTableClass *pDphHashTable); /* Initialize STA state */ -extern tpDphHashNode dph_init_sta_state(tpAniSirGlobal mac, +extern tpDphHashNode dph_init_sta_state(struct mac_context *mac, tSirMacAddr staAddr, uint16_t staId, uint8_t validStaIdx, dphHashTableClass *pDphHashTable); diff --git a/core/mac/src/include/cfg_api.h b/core/mac/src/include/cfg_api.h index de5be4d497f1..234df1aef8b9 100644 --- a/core/mac/src/include/cfg_api.h +++ b/core/mac/src/include/cfg_api.h @@ -58,52 +58,52 @@ typedef struct { /* 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 */ -void cfg_process_mb_msg(tpAniSirGlobal, tSirMbMsg *); +void cfg_process_mb_msg(struct mac_context *, tSirMbMsg *); /* / 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 */ -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 */ -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 */ -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); /* 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 */ -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 */ -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 */ -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 */ -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); /* / 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); /* / Set capability info */ -void cfg_set_capability_info(tpAniSirGlobal, uint16_t); +void cfg_set_capability_info(struct mac_context *, uint16_t); /* / Cleanup CFG module */ -void cfg_cleanup(tpAniSirGlobal mac); +void cfg_cleanup(struct mac_context *mac); const char *cfg_get_string(uint16_t cfg_id); diff --git a/core/mac/src/include/utils_api.h b/core/mac/src/include/utils_api.h index 82143cf9d3f0..1e1ba55a9397 100644 --- a/core/mac/src/include/utils_api.h +++ b/core/mac/src/include/utils_api.h @@ -38,8 +38,8 @@ typedef enum eBssSystemRole { eSYSTEM_MULTI_BSS_ROLE = eSYSTEM_LAST_ROLE } 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() diff --git a/core/mac/src/sys/common/src/wlan_qct_sys.c b/core/mac/src/sys/common/src/wlan_qct_sys.c index fdd5e5711b1b..ac97f9b59d7c 100644 --- a/core/mac/src/sys/common/src/wlan_qct_sys.c +++ b/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 */ -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; diff --git a/core/mac/src/sys/legacy/src/system/inc/sys_entry_func.h b/core/mac/src/sys/legacy/src/system/inc/sys_entry_func.h index 36613b31776b..143f67a39e80 100644 --- a/core/mac/src/sys/legacy/src/system/inc/sys_entry_func.h +++ b/core/mac/src/sys/legacy/src/system/inc/sys_entry_func.h @@ -30,7 +30,7 @@ #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 sysSchEntry(uint32_t dummy); extern void sysPmmEntry(uint32_t dummy); diff --git a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c index 3cc7e6bdd230..5600564146c0 100644 --- a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c +++ b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c @@ -43,7 +43,7 @@ #ifdef WLAN_ALLOCATE_GLOBAL_BUFFERS_DYNAMICALLY 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)); @@ -58,7 +58,7 @@ static inline void mac_free_context_buffer(void) #else /* WLAN_ALLOCATE_GLOBAL_BUFFERS_DYNAMICALLY */ 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; } @@ -72,7 +72,7 @@ QDF_STATUS mac_start(mac_handle_t mac_handle, struct mac_start_params *params) { QDF_STATUS status = QDF_STATUS_SUCCESS; - tpAniSirGlobal mac = MAC_CONTEXT(mac_handle); + struct mac_context *mac = MAC_CONTEXT(mac_handle); if (!mac || !params) { 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) { - tpAniSirGlobal mac = MAC_CONTEXT(mac_handle); + struct mac_context *mac = MAC_CONTEXT(mac_handle); pe_stop(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, hdd_handle_t hdd_handle, struct cds_config_info *cds_cfg) { - tpAniSirGlobal mac; + struct mac_context *mac; QDF_STATUS status; struct wlan_mlme_psoc_obj *mlme_obj; @@ -177,7 +177,7 @@ free_mac_context: 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) return QDF_STATUS_E_FAILURE; diff --git a/core/mac/src/sys/legacy/src/system/src/sys_entry_func.c b/core/mac/src/sys/legacy/src/system/src/sys_entry_func.c index 6bd8c62e9ffb..0a11e9ec4530 100644 --- a/core/mac/src/sys/legacy/src/system/src/sys_entry_func.c +++ b/core/mac/src/sys/legacy/src/system/src/sys_entry_func.c @@ -58,11 +58,11 @@ * * NOTE: * - * @param tpAniSirGlobal Sirius software parameter struct pointer + * @param struct mac_context *Sirius software parameter struct pointer * @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); diff --git a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c index 1448ae9cbd66..be0c5128f529 100644 --- a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c +++ b/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 **/ -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) { /* @@ -803,7 +803,7 @@ void mac_trace(tpAniSirGlobal mac_ctx, uint8_t code, * * 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) { qdf_trace(module, code, session, data);