From fe8dc69c7a4a1a43bcc32aaa0e4376fc116f4a07 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Thu, 22 Nov 2018 08:45:13 -0800 Subject: [PATCH] qcacld-3.0: Rename pMac in WMA 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: wma_api.h wma_if.h wma_internal.h wma_types.h wlan_qct_wma_legacy.c wma_data.c wma_dev_if.c wma_main.c wma_scan_roam.c wma_utils.c Change-Id: I6967ecb60bbd97d1b66ecd273a4490be65fe02f4 CRs-Fixed: 2356095 --- core/wma/inc/wma_api.h | 2 +- core/wma/inc/wma_if.h | 6 +- core/wma/inc/wma_internal.h | 2 +- core/wma/inc/wma_types.h | 6 +- core/wma/src/wlan_qct_wma_legacy.c | 20 ++--- core/wma/src/wma_data.c | 34 ++++---- core/wma/src/wma_dev_if.c | 6 +- core/wma/src/wma_main.c | 18 ++-- core/wma/src/wma_scan_roam.c | 136 ++++++++++++++--------------- core/wma/src/wma_utils.c | 4 +- 10 files changed, 117 insertions(+), 117 deletions(-) diff --git a/core/wma/inc/wma_api.h b/core/wma/inc/wma_api.h index c5c710d72dc2..dbc1564bfc90 100644 --- a/core/wma/inc/wma_api.h +++ b/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 pMac, struct scheduler_msg *pMsg); +QDF_STATUS wma_post_ctrl_msg(tpAniSirGlobal 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); diff --git a/core/wma/inc/wma_if.h b/core/wma/inc/wma_if.h index dd02a703abe9..c792f647e051 100644 --- a/core/wma/inc/wma_if.h +++ b/core/wma/inc/wma_if.h @@ -934,7 +934,7 @@ typedef struct { uint16_t reduced_beacon_interval; } tSwitchChannelParams, *tpSwitchChannelParams; -typedef void (*tpSetLinkStateCallback)(tpAniSirGlobal pMac, void *msgParam, +typedef void (*tpSetLinkStateCallback)(tpAniSirGlobal mac, void *msgParam, bool status); /** @@ -1029,7 +1029,7 @@ typedef struct { } tAggrAddTsParams, *tpAggrAddTsParams; -typedef QDF_STATUS (*tHalMsgCallback)(tpAniSirGlobal pMac, uint32_t mesgId, +typedef QDF_STATUS (*tHalMsgCallback)(tpAniSirGlobal mac, uint32_t mesgId, void *mesgParam); /** @@ -1386,7 +1386,7 @@ typedef struct tHalHiddenSsidVdevRestart { } tHalHiddenSsidVdevRestart, *tpHalHiddenSsidVdevRestart; -extern void sys_process_mmh_msg(tpAniSirGlobal pMac, +extern void sys_process_mmh_msg(tpAniSirGlobal mac, struct scheduler_msg *pMsg); /** diff --git a/core/wma/inc/wma_internal.h b/core/wma/inc/wma_internal.h index 98346ee717f6..d1d5553c0abb 100644 --- a/core/wma/inc/wma_internal.h +++ b/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 pMac, + tpAniSirGlobal mac, tSirRoamOffloadScanReq *roam_req, wmi_start_scan_cmd_fixed_param * scan_params); diff --git a/core/wma/inc/wma_types.h b/core/wma/inc/wma_types.h index 5e3360fd92d3..566e7cb5cf26 100644 --- a/core/wma/inc/wma_types.h +++ b/core/wma/inc/wma_types.h @@ -580,7 +580,7 @@ typedef struct sDisableUapsdParams { /** * wma_tx_dwnld_comp_callback - callback function for TX dwnld complete - * @context: global pMac pointer + * @context: global mac pointer * @buf: buffer * @bFreeData: to free/not free the buffer * @@ -593,7 +593,7 @@ typedef QDF_STATUS (*wma_tx_dwnld_comp_callback)(void *context, qdf_nbuf_t buf, /** * wma_tx_ota_comp_callback - callback function for TX complete - * @context: global pMac pointer + * @context: global mac pointer * @buf: buffer * @status: tx completion status * @params: tx completion params @@ -671,7 +671,7 @@ enum rateid { RATEID_DEFAULT }; -QDF_STATUS wma_post_ctrl_msg(tpAniSirGlobal pMac, struct scheduler_msg *pMsg); +QDF_STATUS wma_post_ctrl_msg(tpAniSirGlobal mac, struct scheduler_msg *pMsg); QDF_STATUS u_mac_post_ctrl_msg(void *pSirGlobal, tSirMbMsg *pMb); diff --git a/core/wma/src/wlan_qct_wma_legacy.c b/core/wma/src/wlan_qct_wma_legacy.c index dd3316a19423..d05d72e62c96 100644 --- a/core/wma/src/wlan_qct_wma_legacy.c +++ b/core/wma/src/wlan_qct_wma_legacy.c @@ -39,13 +39,13 @@ /** * wma_post_ctrl_msg() - Posts WMA messages to MC thread - * @pMac: MAC parameters structure + * @mac: MAC parameters structure * @pMsg: pointer with message * * Return: Success or Failure */ -QDF_STATUS wma_post_ctrl_msg(tpAniSirGlobal pMac, struct scheduler_msg *pMsg) +QDF_STATUS wma_post_ctrl_msg(tpAniSirGlobal mac, struct scheduler_msg *pMsg) { if (QDF_STATUS_SUCCESS != scheduler_post_message(QDF_MODULE_ID_WMA, @@ -58,13 +58,13 @@ QDF_STATUS wma_post_ctrl_msg(tpAniSirGlobal pMac, struct scheduler_msg *pMsg) /** * wma_post_cfg_msg() - Posts MNT messages to gSirMntMsgQ - * @pMac: MAC parameters structure + * @mac: MAC parameters structure * @pMsg: A pointer to the msg * * Return: Success or Failure */ -static QDF_STATUS wma_post_cfg_msg(tpAniSirGlobal pMac, +static QDF_STATUS wma_post_cfg_msg(tpAniSirGlobal mac, struct scheduler_msg *pMsg) { QDF_STATUS rc = QDF_STATUS_SUCCESS; @@ -75,7 +75,7 @@ static QDF_STATUS wma_post_cfg_msg(tpAniSirGlobal pMac, * queues we will call the handler routines directly */ - cfg_process_mb_msg(pMac, (tSirMbMsg *) pMsg->bodyptr); + cfg_process_mb_msg(mac, (tSirMbMsg *) pMsg->bodyptr); rc = QDF_STATUS_SUCCESS; } while (0); @@ -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 pMac = (tpAniSirGlobal) pSirGlobal; + tpAniSirGlobal mac = (tpAniSirGlobal) pSirGlobal; msg.type = pMb->type; msg.bodyval = 0; @@ -111,19 +111,19 @@ QDF_STATUS u_mac_post_ctrl_msg(void *pSirGlobal, tSirMbMsg *pMb) switch (msg.type & HAL_MMH_MB_MSG_TYPE_MASK) { case WMA_MSG_TYPES_BEGIN: /* Posts a message to the HAL MsgQ */ - status = wma_post_ctrl_msg(pMac, &msg); + status = wma_post_ctrl_msg(mac, &msg); break; case SIR_LIM_MSG_TYPES_BEGIN: /* Posts a message to the LIM MsgQ */ - status = lim_post_msg_api(pMac, &msg); + status = lim_post_msg_api(mac, &msg); break; case SIR_CFG_MSG_TYPES_BEGIN: /* Posts a message to the CFG MsgQ */ - status = wma_post_cfg_msg(pMac, &msg); + status = wma_post_cfg_msg(mac, &msg); break; case SIR_PMM_MSG_TYPES_BEGIN: /* Posts a message to the LIM MsgQ */ - status = sme_post_pe_message(pMac, &msg); + status = sme_post_pe_message(mac, &msg); break; default: diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c index 8b10d976d1fd..9559dbd57939 100644 --- a/core/wma/src/wma_data.c +++ b/core/wma/src/wma_data.c @@ -1066,7 +1066,7 @@ QDF_STATUS wma_set_mcc_channel_time_latency(tp_wma_handle wma, uint32_t mcc_channel, uint32_t mcc_channel_time_latency) { uint32_t cfg_val = 0; - struct mac_context *pMac = NULL; + struct mac_context *mac = NULL; uint32_t channel1 = mcc_channel; uint32_t chan1_freq = cds_chan_to_freq(channel1); @@ -1075,21 +1075,21 @@ QDF_STATUS wma_set_mcc_channel_time_latency(tp_wma_handle wma, QDF_ASSERT(0); return QDF_STATUS_E_FAILURE; } - pMac = cds_get_context(QDF_MODULE_ID_PE); - if (!pMac) { - WMA_LOGE("%s:NULL pMac ptr. Exiting", __func__); + mac = cds_get_context(QDF_MODULE_ID_PE); + if (!mac) { + WMA_LOGE("%s:NULL mac ptr. Exiting", __func__); QDF_ASSERT(0); return QDF_STATUS_E_FAILURE; } /* First step is to confirm if MCC is active */ - if (!lim_is_in_mcc(pMac)) { + if (!lim_is_in_mcc(mac)) { WMA_LOGE("%s: MCC is not active. Exiting", __func__); QDF_ASSERT(0); return QDF_STATUS_E_FAILURE; } /* Confirm MCC adaptive scheduler feature is disabled */ - if (wlan_cfg_get_int(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, + if (wlan_cfg_get_int(mac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, &cfg_val) == QDF_STATUS_SUCCESS) { if (cfg_val == WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMAX) { WMA_LOGD("%s: Can't set channel latency while MCC ADAPTIVE SCHED is enabled. Exit", @@ -1129,7 +1129,7 @@ QDF_STATUS wma_set_mcc_channel_time_quota(tp_wma_handle wma, uint32_t adapter_2_chan_number) { uint32_t cfg_val = 0; - struct mac_context *pMac = NULL; + struct mac_context *mac = NULL; uint32_t chan1_freq = cds_chan_to_freq(adapter_1_chan_number); uint32_t chan2_freq = cds_chan_to_freq(adapter_2_chan_number); @@ -1138,22 +1138,22 @@ QDF_STATUS wma_set_mcc_channel_time_quota(tp_wma_handle wma, QDF_ASSERT(0); return QDF_STATUS_E_FAILURE; } - pMac = cds_get_context(QDF_MODULE_ID_PE); - if (!pMac) { - WMA_LOGE("%s:NULL pMac ptr. Exiting", __func__); + mac = cds_get_context(QDF_MODULE_ID_PE); + if (!mac) { + WMA_LOGE("%s:NULL mac ptr. Exiting", __func__); QDF_ASSERT(0); return QDF_STATUS_E_FAILURE; } /* First step is to confirm if MCC is active */ - if (!lim_is_in_mcc(pMac)) { + if (!lim_is_in_mcc(mac)) { WMA_LOGD("%s: MCC is not active. Exiting", __func__); QDF_ASSERT(0); return QDF_STATUS_E_FAILURE; } /* Confirm MCC adaptive scheduler feature is disabled */ - if (wlan_cfg_get_int(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, + if (wlan_cfg_get_int(mac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, &cfg_val) == QDF_STATUS_SUCCESS) { if (cfg_val == WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMAX) { WMA_LOGD("%s: Can't set channel quota while MCC_ADAPTIVE_SCHED is enabled. Exit", @@ -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 pMac; + tpAniSirGlobal mac; tpSirMacMgmtHdr mHdr; struct wmi_mgmt_params mgmt_param = {0}; struct cdp_cfg *ctrl_pdev; @@ -2435,9 +2435,9 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen, return QDF_STATUS_E_FAILURE; } - pMac = cds_get_context(QDF_MODULE_ID_PE); - if (!pMac) { - WMA_LOGE("pMac Handle is NULL"); + mac = cds_get_context(QDF_MODULE_ID_PE); + if (!mac) { + WMA_LOGE("mac Handle is NULL"); cds_packet_free((void *)tx_frame); return QDF_STATUS_E_FAILURE; } @@ -2742,7 +2742,7 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen, } else { chanfreq = 0; } - if (pMac->mlme_cfg->gen.debug_packet_log & 0x1) { + if (mac->mlme_cfg->gen.debug_packet_log & 0x1) { if ((pFc->type == SIR_MAC_MGMT_FRAME) && (pFc->subType != SIR_MAC_MGMT_PROBE_REQ) && (pFc->subType != SIR_MAC_MGMT_PROBE_RSP)) { diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 560d4a12744f..1898aa6d3f4b 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -4412,12 +4412,12 @@ 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 pMac = cds_get_context(QDF_MODULE_ID_PE); + tpAniSirGlobal 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); - if (NULL == pMac) { + if (NULL == mac) { WMA_LOGE("%s: Unable to get PE context", __func__); goto send_fail_resp; } @@ -4603,7 +4603,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss) wmi_unified_send_txbf(wma, &add_bss->staContext); - pps_val = ((pMac->mlme_cfg->sta.enable_5g_ebt << 31) & + pps_val = ((mac->mlme_cfg->sta.enable_5g_ebt << 31) & 0xffff0000) | (PKT_PWR_SAVE_5G_EBT & 0xffff); status = wma_vdev_set_param(wma->wmi_handle, vdev_id, WMI_VDEV_PARAM_PACKET_POWERSAVE, diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 336f25726086..49319972ab47 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -962,7 +962,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 pMac = cds_get_context(QDF_MODULE_ID_PE); + tpAniSirGlobal 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); @@ -972,8 +972,8 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma, WMA_LOGD("wmihandle %pK", wma->wmi_handle); qdf_mem_zero(&aggr, sizeof(aggr)); - if (NULL == pMac) { - WMA_LOGE("%s: Failed to get pMac", __func__); + if (NULL == mac) { + WMA_LOGE("%s: Failed to get mac", __func__); return; } @@ -1535,11 +1535,11 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma, break; case WMI_PDEV_PARAM_TXPOWER_LIMIT2G: wma->pdevconfig.txpow2g = privcmd->param_value; - if ((pMac->mlme_cfg->gen.band_capability == + if ((mac->mlme_cfg->gen.band_capability == BAND_ALL) || - (pMac->mlme_cfg->gen.band_capability == + (mac->mlme_cfg->gen.band_capability == BAND_2G)) { - if (cfg_set_int(pMac, + if (cfg_set_int(mac, WNI_CFG_CURRENT_TX_POWER_LEVEL, privcmd->param_value) != QDF_STATUS_SUCCESS) @@ -1551,11 +1551,11 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma, break; case WMI_PDEV_PARAM_TXPOWER_LIMIT5G: wma->pdevconfig.txpow5g = privcmd->param_value; - if ((pMac->mlme_cfg->gen.band_capability == + if ((mac->mlme_cfg->gen.band_capability == BAND_ALL) || - (pMac->mlme_cfg->gen.band_capability == + (mac->mlme_cfg->gen.band_capability == BAND_5G)) { - if (cfg_set_int(pMac, + if (cfg_set_int(mac, WNI_CFG_CURRENT_TX_POWER_LEVEL, privcmd->param_value) != QDF_STATUS_SUCCESS) diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index eaa15fd0c18a..921f41ec7eeb 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -934,7 +934,7 @@ void wma_process_set_pdev_vht_ie_req(tp_wma_handle wma, /** * wma_roam_scan_scan_params() - fill roam scan params * @wma_handle: wma handle - * @pMac: Mac ptr + * @mac: Mac ptr * @scan_params: scan parameters * @roam_req: NULL if this routine is called before connect * It will be non-NULL if called after assoc. @@ -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 pMac, + tpAniSirGlobal mac, tSirRoamOffloadScanReq *roam_req, wmi_start_scan_cmd_fixed_param * scan_params) @@ -952,8 +952,8 @@ void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle, uint8_t channels_per_burst = 0; uint32_t val = 0; - if (NULL == pMac) { - WMA_LOGE("%s: pMac is NULL", __func__); + if (NULL == mac) { + WMA_LOGE("%s: mac is NULL", __func__); return; } @@ -989,7 +989,7 @@ void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle, */ if (wlan_cfg_get_int - (pMac, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME, + (mac, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME, &val) != QDF_STATUS_SUCCESS) { /* * Could not get max channel value from CFG. Log error. @@ -1409,12 +1409,12 @@ 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 pMac = cds_get_context(QDF_MODULE_ID_PE); + tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE); uint32_t mode = 0; struct wma_txrx_node *intr = NULL; - if (NULL == pMac) { - WMA_LOGE("%s: pMac is NULL", __func__); + if (NULL == mac) { + WMA_LOGE("%s: mac is NULL", __func__); qdf_mem_free(roam_req); return QDF_STATUS_E_FAILURE; } @@ -1510,7 +1510,7 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle, break; - wma_roam_scan_fill_scan_params(wma_handle, pMac, roam_req, + wma_roam_scan_fill_scan_params(wma_handle, mac, roam_req, &scan_params); qdf_status = wma_roam_scan_offload_mode(wma_handle, &scan_params, @@ -1607,7 +1607,7 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle, if (wma_handle->roam_offload_enabled) { uint32_t mode; - wma_roam_scan_fill_scan_params(wma_handle, pMac, + wma_roam_scan_fill_scan_params(wma_handle, mac, NULL, &scan_params); if (roam_req->reason == REASON_ROAM_STOP_ALL || @@ -1615,7 +1615,7 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle, roam_req->reason == REASON_ROAM_SYNCH_FAILED) { mode = WMI_ROAM_SCAN_MODE_NONE; } else { - if (csr_roamIsRoamOffloadEnabled(pMac)) + if (csr_roamIsRoamOffloadEnabled(mac)) mode = WMI_ROAM_SCAN_MODE_NONE | WMI_ROAM_SCAN_MODE_ROAMOFFLOAD; else @@ -1710,7 +1710,7 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle, wma_handle->suitable_ap_hb_failure = false; if (roam_req->RoamScanOffloadEnabled) { - wma_roam_scan_fill_scan_params(wma_handle, pMac, + wma_roam_scan_fill_scan_params(wma_handle, mac, roam_req, &scan_params); qdf_status = wma_roam_scan_offload_mode( @@ -1795,7 +1795,7 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle, if (!roam_req->RoamScanOffloadEnabled) break; - wma_roam_scan_fill_scan_params(wma_handle, pMac, roam_req, + wma_roam_scan_fill_scan_params(wma_handle, mac, roam_req, &scan_params); qdf_status = wma_roam_scan_offload_mode(wma_handle, &scan_params, @@ -2648,7 +2648,7 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle, tSirRoamOffloadScanReq *roam_req) { qdf_size_t val_len; - struct mac_context *pMac = NULL; + struct mac_context *mac = NULL; tSirMacCapabilityInfo selfCaps; uint32_t val = 0; uint32_t nCfgValue; @@ -2660,9 +2660,9 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle, /* Roaming is done only for INFRA STA type. * So, ess will be one and ibss will be Zero */ - pMac = cds_get_context(QDF_MODULE_ID_PE); - if (!pMac) { - WMA_LOGE("%s:NULL pMac ptr. Exiting", __func__); + mac = cds_get_context(QDF_MODULE_ID_PE); + if (!mac) { + WMA_LOGE("%s:NULL mac ptr. Exiting", __func__); QDF_ASSERT(0); return QDF_STATUS_E_FAILURE; } @@ -2670,19 +2670,19 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle, selfCaps.ess = 1; selfCaps.ibss = 0; - val = pMac->mlme_cfg->wep_params.is_privacy_enabled; + val = mac->mlme_cfg->wep_params.is_privacy_enabled; if (val) selfCaps.privacy = 1; - if (pMac->mlme_cfg->ht_caps.short_preamble) + if (mac->mlme_cfg->ht_caps.short_preamble) selfCaps.shortPreamble = 1; selfCaps.pbcc = 0; selfCaps.channelAgility = 0; - if (pMac->mlme_cfg->feature_flags.enable_short_slot_time_11g) + if (mac->mlme_cfg->feature_flags.enable_short_slot_time_11g) selfCaps.shortSlotTime = 1; - if (wlan_cfg_get_int(pMac, WNI_CFG_11H_ENABLED, &val) != + if (wlan_cfg_get_int(mac, WNI_CFG_11H_ENABLED, &val) != QDF_STATUS_SUCCESS) { QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, "Failed to get WNI_CFG_11H_ENABLED"); @@ -2691,10 +2691,10 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle, if (val) selfCaps.spectrumMgt = 1; - if (pMac->mlme_cfg->wmm_params.qos_enabled) + if (mac->mlme_cfg->wmm_params.qos_enabled) selfCaps.qos = 1; - if (wlan_cfg_get_int(pMac, WNI_CFG_APSD_ENABLED, &val) != + if (wlan_cfg_get_int(mac, WNI_CFG_APSD_ENABLED, &val) != QDF_STATUS_SUCCESS) { QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, "Failed to get WNI_CFG_APSD_ENABLED"); @@ -2703,9 +2703,9 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle, if (val) selfCaps.apsd = 1; - selfCaps.rrm = pMac->rrm.rrmSmeContext.rrmConfig.rrm_enabled; + selfCaps.rrm = mac->rrm.rrmSmeContext.rrmConfig.rrm_enabled; - val = pMac->mlme_cfg->feature_flags.enable_block_ack; + val = mac->mlme_cfg->feature_flags.enable_block_ack; selfCaps.delayedBA = (uint16_t) ((val >> WNI_CFG_BLOCK_ACK_ENABLED_DELAYED) & 1); selfCaps.immediateBA = @@ -2726,24 +2726,24 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle, roam_offload_params->capability |= ((*pCfgValue16) & 0xFFFF); roam_offload_params->ht_caps_info = - *(uint32_t *)&pMac->mlme_cfg->ht_caps.ht_cap_info; + *(uint32_t *)&mac->mlme_cfg->ht_caps.ht_cap_info; roam_offload_params->ampdu_param = - *(uint32_t *)&pMac->mlme_cfg->ht_caps.ampdu_params; + *(uint32_t *)&mac->mlme_cfg->ht_caps.ampdu_params; roam_offload_params->ht_ext_cap = - *(uint32_t *)&pMac->mlme_cfg->ht_caps.ext_cap_info; + *(uint32_t *)&mac->mlme_cfg->ht_caps.ext_cap_info; val_len = ROAM_OFFLOAD_NUM_MCS_SET; if (wlan_mlme_get_cfg_str((uint8_t *)roam_offload_params->mcsset, - &pMac->mlme_cfg->rates.supported_mcs_set, + &mac->mlme_cfg->rates.supported_mcs_set, &val_len) != QDF_STATUS_SUCCESS) { QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, "Failed to get CFG_SUPPORTED_MCS_SET"); return QDF_STATUS_E_FAILURE; } - if (wlan_cfg_get_int(pMac, WNI_CFG_TX_BF_CAP, &nCfgValue) != + if (wlan_cfg_get_int(mac, WNI_CFG_TX_BF_CAP, &nCfgValue) != QDF_STATUS_SUCCESS) { QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, "Failed to get WNI_CFG_TX_BF_CAP"); @@ -2752,7 +2752,7 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle, /* tSirMacTxBFCapabilityInfo */ nCfgValue8 = (uint8_t) nCfgValue; roam_offload_params->ht_txbf = nCfgValue8 & 0xFF; - if (wlan_cfg_get_int(pMac, WNI_CFG_AS_CAP, &nCfgValue) != + if (wlan_cfg_get_int(mac, WNI_CFG_AS_CAP, &nCfgValue) != QDF_STATUS_SUCCESS) { QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, "Failed to get WNI_CFG_AS_CAP"); @@ -2763,7 +2763,7 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle, roam_offload_params->asel_cap = nCfgValue8 & 0xFF; /* QOS Info */ - nCfgValue8 = pMac->mlme_cfg->wmm_params.max_sp_length; + nCfgValue8 = mac->mlme_cfg->wmm_params.max_sp_length; macQosInfoSta.maxSpLen = nCfgValue8; macQosInfoSta.moreDataAck = 0; macQosInfoSta.qack = 0; @@ -3403,13 +3403,13 @@ 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 pMac = cds_get_context(QDF_MODULE_ID_PE); + tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE); - if (!pMac) { - WMA_LOGE("%s: Invalid pMac", __func__); + if (!mac) { + WMA_LOGE("%s: Invalid mac", __func__); return -EINVAL; } - if (!pMac->sme.ext_scan_ind_cb) { + if (!mac->sme.ext_scan_ind_cb) { WMA_LOGE("%s: Callback not registered", __func__); return -EINVAL; } @@ -3474,7 +3474,7 @@ int wma_extscan_start_stop_event_handler(void *handle, qdf_mem_free(extscan_ind); return -EINVAL; } - pMac->sme.ext_scan_ind_cb(pMac->hdd_handle, event_type, extscan_ind); + mac->sme.ext_scan_ind_cb(mac->hdd_handle, event_type, extscan_ind); WMA_LOGD("%s: sending event to umac for requestid %u with status %d", __func__, extscan_ind->request_id, extscan_ind->status); qdf_mem_free(extscan_ind); @@ -3501,13 +3501,13 @@ int wma_extscan_operations_event_handler(void *handle, wmi_extscan_operation_event_fixed_param *oprn_event; tSirExtScanOnScanEventIndParams *oprn_ind; uint32_t cnt; - tpAniSirGlobal pMac = cds_get_context(QDF_MODULE_ID_PE); + tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE); - if (!pMac) { - WMA_LOGE("%s: Invalid pMac", __func__); + if (!mac) { + WMA_LOGE("%s: Invalid mac", __func__); return -EINVAL; } - if (!pMac->sme.ext_scan_ind_cb) { + if (!mac->sme.ext_scan_ind_cb) { WMA_LOGE("%s: Callback not registered", __func__); return -EINVAL; } @@ -3588,7 +3588,7 @@ int wma_extscan_operations_event_handler(void *handle, qdf_mem_free(oprn_ind); return -EINVAL; } - pMac->sme.ext_scan_ind_cb(pMac->hdd_handle, + mac->sme.ext_scan_ind_cb(mac->hdd_handle, eSIR_EXTSCAN_SCAN_PROGRESS_EVENT_IND, oprn_ind); WMA_LOGI("%s: sending scan progress event to hdd", __func__); exit_handler: @@ -3614,13 +3614,13 @@ 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 pMac = cds_get_context(QDF_MODULE_ID_PE); + tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE); - if (!pMac) { - WMA_LOGE("%s: Invalid pMac", __func__); + if (!mac) { + WMA_LOGE("%s: Invalid mac", __func__); return -EINVAL; } - if (!pMac->sme.ext_scan_ind_cb) { + if (!mac->sme.ext_scan_ind_cb) { WMA_LOGE("%s: Callback not registered", __func__); return -EINVAL; } @@ -3637,7 +3637,7 @@ int wma_extscan_table_usage_event_handler(void *handle, tbl_usg_ind->requestId = event->request_id; tbl_usg_ind->numResultsAvailable = event->entries_in_use; - pMac->sme.ext_scan_ind_cb(pMac->hdd_handle, + mac->sme.ext_scan_ind_cb(mac->hdd_handle, eSIR_EXTSCAN_SCAN_RES_AVAILABLE_IND, tbl_usg_ind); WMA_LOGI("%s: sending scan_res available event to hdd", __func__); @@ -3666,13 +3666,13 @@ 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 pMac = cds_get_context(QDF_MODULE_ID_PE); + tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE); - if (!pMac) { - WMA_LOGE("%s: Invalid pMac", __func__); + if (!mac) { + WMA_LOGE("%s: Invalid mac", __func__); return -EINVAL; } - if (!pMac->sme.ext_scan_ind_cb) { + if (!mac->sme.ext_scan_ind_cb) { WMA_LOGE("%s: Callback not registered", __func__); return -EINVAL; } @@ -3742,7 +3742,7 @@ int wma_extscan_capabilities_event_handler(void *handle, __func__, dest_capab->max_number_of_white_listed_ssid, dest_capab->max_number_of_black_listed_bssid); - pMac->sme.ext_scan_ind_cb(pMac->hdd_handle, + mac->sme.ext_scan_ind_cb(mac->hdd_handle, eSIR_EXTSCAN_GET_CAPABILITIES_IND, dest_capab); qdf_mem_free(dest_capab); return 0; @@ -3771,13 +3771,13 @@ int wma_extscan_hotlist_match_event_handler(void *handle, uint32_t numap; int j, ap_found = 0; uint32_t buf_len; - tpAniSirGlobal pMac = cds_get_context(QDF_MODULE_ID_PE); + tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE); - if (!pMac) { - WMA_LOGE("%s: Invalid pMac", __func__); + if (!mac) { + WMA_LOGE("%s: Invalid mac", __func__); return -EINVAL; } - if (!pMac->sme.ext_scan_ind_cb) { + if (!mac->sme.ext_scan_ind_cb) { WMA_LOGE("%s: Callback not registered", __func__); return -EINVAL; } @@ -3861,7 +3861,7 @@ int wma_extscan_hotlist_match_event_handler(void *handle, src_hotlist++; } dest_hotlist->ap_found = ap_found; - pMac->sme.ext_scan_ind_cb(pMac->hdd_handle, + mac->sme.ext_scan_ind_cb(mac->hdd_handle, eSIR_EXTSCAN_HOTLIST_MATCH_IND, dest_hotlist); WMA_LOGI("%s: sending hotlist match event to hdd", __func__); qdf_mem_free(dest_hotlist); @@ -4069,15 +4069,15 @@ 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 pMac = cds_get_context(QDF_MODULE_ID_PE); + tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE); uint32_t total_len; bool excess_data = false; - if (!pMac) { - WMA_LOGE("%s: Invalid pMac", __func__); + if (!mac) { + WMA_LOGE("%s: Invalid mac", __func__); return -EINVAL; } - if (!pMac->sme.ext_scan_ind_cb) { + if (!mac->sme.ext_scan_ind_cb) { WMA_LOGE("%s: Callback not registered", __func__); return -EINVAL; } @@ -4167,7 +4167,7 @@ int wma_extscan_cached_results_event_handler(void *handle, status = wma_group_num_bss_to_scan_id(cmd_param_info, dest_cachelist); if (!status) - pMac->sme.ext_scan_ind_cb(pMac->hdd_handle, + mac->sme.ext_scan_ind_cb(mac->hdd_handle, eSIR_EXTSCAN_CACHED_RESULTS_IND, dest_cachelist); else @@ -4188,7 +4188,7 @@ noresults: empty_cachelist.more_data = 0; empty_cachelist.num_scan_ids = 0; - pMac->sme.ext_scan_ind_cb(pMac->hdd_handle, + mac->sme.ext_scan_ind_cb(mac->hdd_handle, eSIR_EXTSCAN_CACHED_RESULTS_IND, &empty_cachelist); return 0; @@ -4221,15 +4221,15 @@ int wma_extscan_change_results_event_handler(void *handle, int count = 0; int moredata; uint32_t rssi_num = 0; - tpAniSirGlobal pMac = cds_get_context(QDF_MODULE_ID_PE); + tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE); uint32_t buf_len; bool excess_data = false; - if (!pMac) { - WMA_LOGE("%s: Invalid pMac", __func__); + if (!mac) { + WMA_LOGE("%s: Invalid mac", __func__); return -EINVAL; } - if (!pMac->sme.ext_scan_ind_cb) { + if (!mac->sme.ext_scan_ind_cb) { WMA_LOGE("%s: Callback not registered", __func__); return -EINVAL; } @@ -4329,7 +4329,7 @@ int wma_extscan_change_results_event_handler(void *handle, dest_chglist->moreData = moredata; dest_chglist->numResults = numap; - pMac->sme.ext_scan_ind_cb(pMac->hdd_handle, + mac->sme.ext_scan_ind_cb(mac->hdd_handle, eSIR_EXTSCAN_SIGNIFICANT_WIFI_CHANGE_RESULTS_IND, dest_chglist); WMA_LOGI("%s: sending change monitor results", __func__); diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c index 871c4ac4fee9..12962deb154b 100644 --- a/core/wma/src/wma_utils.c +++ b/core/wma/src/wma_utils.c @@ -1455,7 +1455,7 @@ static int wma_unified_radio_tx_power_level_stats_event_handler(void *handle, tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE); if (!mac) { - WMA_LOGD("%s: NULL pMac ptr. Exiting", __func__); + WMA_LOGD("%s: NULL mac ptr. Exiting", __func__); return -EINVAL; } @@ -3445,7 +3445,7 @@ QDF_STATUS wma_send_link_speed(uint32_t link_speed) mac_ctx = cds_get_context(QDF_MODULE_ID_PE); if (!mac_ctx) { - WMA_LOGD("%s: NULL pMac ptr. Exiting", __func__); + WMA_LOGD("%s: NULL mac ptr. Exiting", __func__); return QDF_STATUS_E_INVAL; }