qcacld-3.0: Rename pMac in misc SME files
Per the Linux coding style "mixed-case names are frowned upon" and
"so-called Hungarian notation [...] is brain damaged." One identifier
used extensively throughout the driver that violates both of these
tenants is "pMac." In order to be compliant with the Linux coding
style there is a campaign to rename all instances of this identifier.
For this change rename all instances of "pMac" to "mac" in:
sme_api.h
sme_ft_api.c
sme_ft_api.h
sme_inside.h
sme_internal.h
sme_qos_internal.h
sme_trace.c
sme_trace.h
Change-Id: I24ae034a06051d2e61d6f02283b3d2ecbe376bf9
CRs-Fixed: 2355452
diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h
index 928c3ca..76ef26e 100644
--- a/core/sme/inc/sme_api.h
+++ b/core/sme/inc/sme_api.h
@@ -453,7 +453,7 @@
* Return: QDF_STATUS_SUCCESS - SME successfully processed the message.
* Other status means SME failed to process the message to HAL.
*/
-QDF_STATUS sme_process_msg(tpAniSirGlobal pMac, struct scheduler_msg *pMsg);
+QDF_STATUS sme_process_msg(tpAniSirGlobal mac, struct scheduler_msg *pMsg);
QDF_STATUS sme_mc_process_handler(struct scheduler_msg *msg);
QDF_STATUS sme_scan_get_result(mac_handle_t mac_handle, uint8_t sessionId,
diff --git a/core/sme/inc/sme_ft_api.h b/core/sme/inc/sme_ft_api.h
index c6f63e6..6e15bdc 100644
--- a/core/sme/inc/sme_ft_api.h
+++ b/core/sme/inc/sme_ft_api.h
@@ -40,7 +40,7 @@
/* FT neighbor roam callback user context */
typedef struct sFTRoamCallbackUsrCtx {
- tpAniSirGlobal pMac;
+ tpAniSirGlobal mac;
uint8_t sessionId;
} tFTRoamCallbackUsrCtx, *tpFTRoamCallbackUsrCtx;
diff --git a/core/sme/inc/sme_inside.h b/core/sme/inc/sme_inside.h
index f4e842f..9a958a4 100644
--- a/core/sme/inc/sme_inside.h
+++ b/core/sme/inc/sme_inside.h
@@ -196,12 +196,12 @@
QDF_STATUS csr_set_serialization_params_to_cmd(tpAniSirGlobal mac_ctx,
tSmeCmd *sme_cmd, struct wlan_serialization_command *cmd,
uint8_t high_priority);
-tSmeCmd *sme_get_command_buffer(tpAniSirGlobal pMac);
-void sme_release_command(tpAniSirGlobal pMac, tSmeCmd *pCmd);
-bool qos_process_command(tpAniSirGlobal pMac, tSmeCmd *pCommand);
-void qos_release_command(tpAniSirGlobal pMac, tSmeCmd *pCommand);
-QDF_STATUS csr_process_scan_command(tpAniSirGlobal pMac, tSmeCmd *pCommand);
-QDF_STATUS csr_roam_process_command(tpAniSirGlobal pMac, tSmeCmd *pCommand);
+tSmeCmd *sme_get_command_buffer(tpAniSirGlobal mac);
+void sme_release_command(tpAniSirGlobal mac, tSmeCmd *pCmd);
+bool qos_process_command(tpAniSirGlobal mac, tSmeCmd *pCommand);
+void qos_release_command(tpAniSirGlobal mac, tSmeCmd *pCommand);
+QDF_STATUS csr_process_scan_command(tpAniSirGlobal mac, tSmeCmd *pCommand);
+QDF_STATUS csr_roam_process_command(tpAniSirGlobal mac, tSmeCmd *pCommand);
/**
* csr_roam_wm_status_change_complete() - Remove WM status change command
@@ -216,7 +216,7 @@
*/
void csr_roam_wm_status_change_complete(tpAniSirGlobal mac_ctx,
uint8_t session_id);
-void csr_roam_process_wm_status_change_command(tpAniSirGlobal pMac,
+void csr_roam_process_wm_status_change_command(tpAniSirGlobal mac,
tSmeCmd *pCommand);
/**
* csr_process_del_sta_session_command() - Post WMA_DEL_STA_SELF_REQ to wma
@@ -230,35 +230,35 @@
*/
QDF_STATUS csr_process_del_sta_session_command(tpAniSirGlobal mac_ctx,
tSmeCmd *sme_command);
-void csr_reinit_roam_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand);
-void csr_reinit_wm_status_change_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand);
+void csr_reinit_roam_cmd(tpAniSirGlobal mac, tSmeCmd *pCommand);
+void csr_reinit_wm_status_change_cmd(tpAniSirGlobal mac, tSmeCmd *pCommand);
QDF_STATUS csr_roam_send_set_key_cmd(tpAniSirGlobal mac_ctx,
uint32_t session_id, struct setkey_cmd *set_key_cmd);
-QDF_STATUS csr_is_valid_channel(tpAniSirGlobal pMac, uint8_t chnNum);
+QDF_STATUS csr_is_valid_channel(tpAniSirGlobal mac, uint8_t chnNum);
QDF_STATUS sme_acquire_global_lock(tSmeStruct *psSme);
QDF_STATUS sme_release_global_lock(tSmeStruct *psSme);
-QDF_STATUS csr_process_add_sta_session_rsp(tpAniSirGlobal pMac, uint8_t *pMsg);
-QDF_STATUS csr_process_del_sta_session_rsp(tpAniSirGlobal pMac, uint8_t *pMsg);
+QDF_STATUS csr_process_add_sta_session_rsp(tpAniSirGlobal mac, uint8_t *pMsg);
+QDF_STATUS csr_process_del_sta_session_rsp(tpAniSirGlobal mac, uint8_t *pMsg);
-bool csr_roamGetConcurrencyConnectStatusForBmps(tpAniSirGlobal pMac);
+bool csr_roamGetConcurrencyConnectStatusForBmps(tpAniSirGlobal mac);
-QDF_STATUS csr_flush_cfg_bg_scan_roam_channel_list(tpAniSirGlobal pMac,
+QDF_STATUS csr_flush_cfg_bg_scan_roam_channel_list(tpAniSirGlobal mac,
uint8_t sessionId);
-QDF_STATUS csr_create_bg_scan_roam_channel_list(tpAniSirGlobal pMac,
+QDF_STATUS csr_create_bg_scan_roam_channel_list(tpAniSirGlobal mac,
uint8_t sessionId, const uint8_t *pChannelList,
const uint8_t numChannels);
#ifdef FEATURE_WLAN_ESE
-QDF_STATUS csr_create_roam_scan_channel_list(tpAniSirGlobal pMac,
+QDF_STATUS csr_create_roam_scan_channel_list(tpAniSirGlobal mac,
uint8_t sessionId,
uint8_t *pChannelList,
uint8_t numChannels,
const enum band_info eBand);
#endif
-QDF_STATUS p2p_process_remain_on_channel_cmd(tpAniSirGlobal pMac,
+QDF_STATUS p2p_process_remain_on_channel_cmd(tpAniSirGlobal mac,
tSmeCmd *p2pRemainonChn);
ePhyChanBondState csr_convert_cb_ini_value_to_phy_cb_state(uint32_t cbIniValue);
void csr_process_set_dual_mac_config(tpAniSirGlobal mac, tSmeCmd *command);
diff --git a/core/sme/inc/sme_internal.h b/core/sme/inc/sme_internal.h
index 9855191..e0c35db 100644
--- a/core/sme/inc/sme_internal.h
+++ b/core/sme/inc/sme_internal.h
@@ -67,8 +67,8 @@
SME_STATE_READY,
} eSmeState;
-#define SME_IS_START(pMac) (SME_STATE_STOP != (pMac)->sme.state)
-#define SME_IS_READY(pMac) (SME_STATE_READY == (pMac)->sme.state)
+#define SME_IS_START(mac) (SME_STATE_STOP != (mac)->sme.state)
+#define SME_IS_READY(mac) (SME_STATE_READY == (mac)->sme.state)
/* HDD Callback function */
typedef void (*pIbssPeerInfoCb)(void *pUserData,
diff --git a/core/sme/inc/sme_qos_internal.h b/core/sme/inc/sme_qos_internal.h
index 4592abf..c378722 100644
--- a/core/sme/inc/sme_qos_internal.h
+++ b/core/sme/inc/sme_qos_internal.h
@@ -103,23 +103,23 @@
/*--------------------------------------------------------------------------
External APIs for CSR - Internal to SME
------------------------------------------------------------------------*/
-QDF_STATUS sme_qos_open(tpAniSirGlobal pMac);
-QDF_STATUS sme_qos_close(tpAniSirGlobal pMac);
-QDF_STATUS sme_qos_msg_processor(tpAniSirGlobal pMac, uint16_t msg_type,
+QDF_STATUS sme_qos_open(tpAniSirGlobal mac);
+QDF_STATUS sme_qos_close(tpAniSirGlobal mac);
+QDF_STATUS sme_qos_msg_processor(tpAniSirGlobal mac, uint16_t msg_type,
void *pMsgBuf);
/*--------------------------------------------------------------------------
Internal APIs for CSR
------------------------------------------------------------------------*/
-QDF_STATUS sme_qos_validate_params(tpAniSirGlobal pMac,
+QDF_STATUS sme_qos_validate_params(tpAniSirGlobal mac,
tSirBssDescription *pBssDesc);
-QDF_STATUS sme_qos_csr_event_ind(tpAniSirGlobal pMac,
+QDF_STATUS sme_qos_csr_event_ind(tpAniSirGlobal mac,
uint8_t sessionId,
sme_qos_csr_event_indType ind, void *pEvent_info);
-uint8_t sme_qos_get_acm_mask(tpAniSirGlobal pMac,
+uint8_t sme_qos_get_acm_mask(tpAniSirGlobal mac,
tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes);
#ifdef FEATURE_WLAN_ESE
-uint8_t sme_qos_ese_retrieve_tspec_info(tpAniSirGlobal pMac, uint8_t sessionId,
+uint8_t sme_qos_ese_retrieve_tspec_info(tpAniSirGlobal mac, uint8_t sessionId,
tTspecInfo * pTspecInfo);
#endif
diff --git a/core/sme/inc/sme_trace.h b/core/sme/inc/sme_trace.h
index 241282d..7d3138c 100644
--- a/core/sme/inc/sme_trace.h
+++ b/core/sme/inc/sme_trace.h
@@ -141,5 +141,5 @@
TRACE_CODE_SME_RX_WMA_MSG,
};
-void sme_trace_init(tpAniSirGlobal pMac);
+void sme_trace_init(tpAniSirGlobal mac);
#endif /* __SME_TRACE_H__ */
diff --git a/core/sme/src/common/sme_ft_api.c b/core/sme/src/common/sme_ft_api.c
index 98e9c0e..9a8881a 100644
--- a/core/sme/src/common/sme_ft_api.c
+++ b/core/sme/src/common/sme_ft_api.c
@@ -25,9 +25,9 @@
/* Initialize the FT context. */
void sme_ft_open(mac_handle_t mac_handle, uint32_t sessionId)
{
- tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
+ tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
QDF_STATUS status = QDF_STATUS_SUCCESS;
- struct csr_roam_session *pSession = CSR_GET_SESSION(pMac, sessionId);
+ struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
if (NULL != pSession) {
/* Clean up the context */
@@ -38,7 +38,7 @@
if (!pSession->ftSmeContext.pUsrCtx)
return;
- pSession->ftSmeContext.pUsrCtx->pMac = pMac;
+ pSession->ftSmeContext.pUsrCtx->mac = mac;
pSession->ftSmeContext.pUsrCtx->sessionId = sessionId;
status =
@@ -60,13 +60,13 @@
/* Cleanup the SME FT Global context. */
void sme_ft_close(mac_handle_t mac_handle, uint32_t sessionId)
{
- tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
+ tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
struct csr_roam_session *pSession = NULL;
/* Clear the FT Context */
sme_ft_reset(mac_handle, sessionId);
- pSession = CSR_GET_SESSION(pMac, sessionId);
+ pSession = CSR_GET_SESSION(mac, sessionId);
if (NULL != pSession) {
/* check if the timer is running */
if (QDF_TIMER_STATE_RUNNING ==
@@ -89,8 +89,8 @@
void sme_set_ft_pre_auth_state(mac_handle_t mac_handle, uint32_t sessionId,
bool state)
{
- tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
- struct csr_roam_session *pSession = CSR_GET_SESSION(pMac, sessionId);
+ tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
+ struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
if (pSession)
pSession->ftSmeContext.setFTPreAuthState = state;
@@ -98,8 +98,8 @@
bool sme_get_ft_pre_auth_state(mac_handle_t mac_handle, uint32_t sessionId)
{
- tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
- struct csr_roam_session *pSession = CSR_GET_SESSION(pMac, sessionId);
+ tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
+ struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
if (pSession)
return pSession->ftSmeContext.setFTPreAuthState;
@@ -284,8 +284,8 @@
bool sme_get_ftptk_state(mac_handle_t mac_handle, uint32_t sessionId)
{
- tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
- struct csr_roam_session *pSession = CSR_GET_SESSION(pMac, sessionId);
+ tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
+ struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
if (!pSession) {
sme_err("pSession is NULL");
@@ -297,8 +297,8 @@
void sme_set_ftptk_state(mac_handle_t mac_handle, uint32_t sessionId,
bool state)
{
- tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
- struct csr_roam_session *pSession = CSR_GET_SESSION(pMac, sessionId);
+ tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
+ struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
if (!pSession) {
sme_err("pSession is NULL");
@@ -310,8 +310,8 @@
QDF_STATUS sme_ft_update_key(mac_handle_t mac_handle, uint32_t sessionId,
tCsrRoamSetKey *pFTKeyInfo)
{
- tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
- struct csr_roam_session *pSession = CSR_GET_SESSION(pMac, sessionId);
+ tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
+ struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
QDF_STATUS status = QDF_STATUS_E_FAILURE;
if (!pSession) {
@@ -324,7 +324,7 @@
return QDF_STATUS_E_FAILURE;
}
- status = sme_acquire_global_lock(&pMac->sme);
+ status = sme_acquire_global_lock(&mac->sme);
if (!(QDF_IS_STATUS_SUCCESS(status)))
return QDF_STATUS_E_FAILURE;
@@ -335,7 +335,7 @@
switch (pSession->ftSmeContext.FTState) {
case eFT_SET_KEY_WAIT:
if (sme_get_ft_pre_auth_state(mac_handle, sessionId) == true) {
- status = sme_ft_send_update_key_ind(pMac, sessionId,
+ status = sme_ft_send_update_key_ind(mac, sessionId,
pFTKeyInfo);
if (status != 0) {
sme_err("Key set failure: %d", status);
@@ -359,7 +359,7 @@
status = QDF_STATUS_E_FAILURE;
break;
}
- sme_release_global_lock(&pMac->sme);
+ sme_release_global_lock(&mac->sme);
return status;
}
@@ -373,8 +373,8 @@
uint8_t *ft_ies, uint32_t ft_ies_ip_len,
uint16_t *ft_ies_length)
{
- tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
- struct csr_roam_session *pSession = CSR_GET_SESSION(pMac, sessionId);
+ tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
+ struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
QDF_STATUS status = QDF_STATUS_E_FAILURE;
if (!pSession) {
@@ -384,7 +384,7 @@
*ft_ies_length = 0;
- status = sme_acquire_global_lock(&pMac->sme);
+ status = sme_acquire_global_lock(&mac->sme);
if (!(QDF_IS_STATUS_SUCCESS(status)))
return;
@@ -392,7 +392,7 @@
if ((QDF_MAC_ADDR_SIZE +
pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies_length) >
ft_ies_ip_len) {
- sme_release_global_lock(&pMac->sme);
+ sme_release_global_lock(&mac->sme);
return;
}
/* hdd needs to pack the bssid also along with the */
@@ -411,7 +411,7 @@
pSession->ftSmeContext.FTState = eFT_REASSOC_REQ_WAIT;
sme_debug("Filled auth resp: %d", *ft_ies_length);
- sme_release_global_lock(&pMac->sme);
+ sme_release_global_lock(&mac->sme);
}
/*
@@ -423,8 +423,8 @@
uint8_t *ric_ies,
uint32_t ric_ies_ip_len, uint32_t *ric_ies_length)
{
- tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
- struct csr_roam_session *pSession = CSR_GET_SESSION(pMac, sessionId);
+ tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
+ struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
QDF_STATUS status = QDF_STATUS_E_FAILURE;
if (!pSession) {
@@ -434,14 +434,14 @@
*ric_ies_length = 0;
- status = sme_acquire_global_lock(&pMac->sme);
+ status = sme_acquire_global_lock(&mac->sme);
if (!(QDF_IS_STATUS_SUCCESS(status)))
return;
/* All or nothing */
if (pSession->ftSmeContext.psavedFTPreAuthRsp->ric_ies_length >
ric_ies_ip_len) {
- sme_release_global_lock(&pMac->sme);
+ sme_release_global_lock(&mac->sme);
return;
}
@@ -454,7 +454,7 @@
sme_debug("Filled ric ies: %d", *ric_ies_length);
- sme_release_global_lock(&pMac->sme);
+ sme_release_global_lock(&mac->sme);
}
/*
@@ -468,23 +468,23 @@
tFTRoamCallbackUsrCtx *pUsrCtx = (tFTRoamCallbackUsrCtx *) context;
if (pUsrCtx)
- csr_neighbor_roam_request_handoff(pUsrCtx->pMac,
+ csr_neighbor_roam_request_handoff(pUsrCtx->mac,
pUsrCtx->sessionId);
}
/* Reset the FT context. */
void sme_ft_reset(mac_handle_t mac_handle, uint32_t sessionId)
{
- tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
+ tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
struct csr_roam_session *pSession = NULL;
- if (pMac == NULL) {
+ if (mac == NULL) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
- FL("pMac is NULL"));
+ FL("mac is NULL"));
return;
}
- pSession = CSR_GET_SESSION(pMac, sessionId);
+ pSession = CSR_GET_SESSION(mac, sessionId);
if (NULL != pSession) {
if (pSession->ftSmeContext.auth_ft_ies != NULL) {
qdf_mem_free(pSession->ftSmeContext.auth_ft_ies);
diff --git a/core/sme/src/common/sme_trace.c b/core/sme/src/common/sme_trace.c
index b5200a6..f69ab78 100644
--- a/core/sme/src/common/sme_trace.c
+++ b/core/sme/src/common/sme_trace.c
@@ -27,7 +27,7 @@
#include "sme_trace.h"
#include "sme_internal.h"
#ifndef SME_TRACE_RECORD
-void sme_trace_init(tpAniSirGlobal pMac)
+void sme_trace_init(tpAniSirGlobal mac)
{
}
@@ -209,7 +209,7 @@
}
}
-void sme_trace_init(tpAniSirGlobal pMac)
+void sme_trace_init(tpAniSirGlobal mac)
{
qdf_trace_register(QDF_MODULE_ID_SME, &sme_trace_dump);
}