diff options
| author | Srinivas Girigowda <sgirigow@codeaurora.org> | 2017-03-16 21:22:19 -0700 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-03-21 09:40:57 -0700 |
| commit | 992c16831391d68bdbc1e869627c76742cef9883 (patch) | |
| tree | 75616e26ceefbacc5f1a896242545b793b12afaa | |
| parent | 6b27f26f510f357f6ac150705234ca6efa5ad75d (diff) | |
qcacld-3.0: Replace sms_log() with sme_* log levels in sme_api.c
Replace sms_log() with sme_* appropriate log levels in sme_api.c.
Change-Id: Ie389981031bbb55076d6c10f9764514b18f83a8c
CRs-Fixed: 2020798
| -rw-r--r-- | core/sme/src/common/sme_api.c | 906 |
1 files changed, 331 insertions, 575 deletions
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index c227cb1fefe3..b544a7afcf85 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -145,10 +145,9 @@ static QDF_STATUS sme_process_set_hw_mode_resp(tpAniSirGlobal mac, uint8_t *msg) enum sir_conn_update_reason reason; tSmeCmd *saved_cmd; - sms_log(mac, LOGD, FL("%s"), __func__); param = (struct sir_set_hw_mode_resp *)msg; if (!param) { - sms_log(mac, LOGE, FL("HW mode resp param is NULL")); + sme_err("HW mode resp param is NULL"); /* Not returning. Need to check if active command list * needs to be freed */ @@ -157,36 +156,35 @@ static QDF_STATUS sme_process_set_hw_mode_resp(tpAniSirGlobal mac, uint8_t *msg) entry = csr_ll_peek_head(&mac->sme.smeCmdActiveList, LL_ACCESS_LOCK); if (!entry) { - sms_log(mac, LOGE, FL("No cmd found in active list")); + sme_err("No cmd found in active list"); return QDF_STATUS_E_FAILURE; } command = GET_BASE_ADDR(entry, tSmeCmd, Link); if (!command) { - sms_log(mac, LOGE, FL("Base address is NULL")); + sme_err("Base address is NULL"); return QDF_STATUS_E_FAILURE; } if (e_sme_command_set_hw_mode != command->command) { - sms_log(mac, LOGE, FL("Command mismatch!")); + sme_err("Command mismatch!"); return QDF_STATUS_E_FAILURE; } callback = command->u.set_hw_mode_cmd.set_hw_mode_cb; reason = command->u.set_hw_mode_cmd.reason; - sms_log(mac, LOGD, FL("reason:%d session:%d"), + sme_debug("reason: %d session: %d", command->u.set_hw_mode_cmd.reason, command->u.set_hw_mode_cmd.session_id); if (!callback) { - sms_log(mac, LOGE, FL("Callback does not exist")); + sme_err("Callback does not exist"); goto end; } if (!param) { - sms_log(mac, LOGE, - FL("Callback failed since HW mode params is NULL")); + sme_err("Callback failed since HW mode params is NULL"); goto end; } @@ -209,18 +207,13 @@ static QDF_STATUS sme_process_set_hw_mode_resp(tpAniSirGlobal mac, uint8_t *msg) */ saved_cmd = (tSmeCmd *)mac->sme.saved_scan_cmd; if (!saved_cmd) { - sms_log(mac, LOGE, - FL("saved cmd is NULL, Check this")); + sme_err("saved cmd is NULL, Check this"); goto end; } if (param->status == SET_HW_MODE_STATUS_OK) { - sms_log(mac, LOGD, - FL("search for ssid success")); csr_scan_handle_search_for_ssid(mac, saved_cmd); } else { - sms_log(mac, LOGD, - FL("search for ssid failure")); csr_scan_handle_search_for_ssid_failure(mac, saved_cmd); } @@ -270,13 +263,12 @@ static QDF_STATUS sme_process_hw_mode_trans_ind(tpAniSirGlobal mac, param = (struct sir_hw_mode_trans_ind *)msg; if (!param) { - sms_log(mac, LOGE, FL("HW mode trans ind param is NULL")); + sme_err("HW mode trans ind param is NULL"); return QDF_STATUS_E_FAILURE; } callback = mac->sme.sme_hw_mode_trans_cb; if (callback) { - sms_log(mac, LOGE, FL("Calling registered callback...")); callback(param->old_hw_mode_index, param->new_hw_mode_index, param->num_vdev_mac_entries, @@ -394,8 +386,7 @@ static QDF_STATUS init_sme_cmd_list(tpAniSirGlobal pMac) end: if (!QDF_IS_STATUS_SUCCESS(status)) - sms_log(pMac, LOGE, "failed to initialize sme command list:%d\n", - status); + sme_err("Failed to initialize sme command list: %d", status); return status; } @@ -438,7 +429,7 @@ void purge_sme_session_cmd_list(tpAniSirGlobal pMac, uint32_t sessionId, qdf_mem_zero(&localList, sizeof(tDblLinkList)); if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) { - sms_log(pMac, LOGE, FL(" failed to open list")); + sme_err("Failed to open list"); return; } @@ -482,8 +473,7 @@ static QDF_STATUS free_sme_cmd_list(tpAniSirGlobal pMac) status = qdf_mutex_acquire(&pMac->sme.lkSmeGlobalLock); if (status != QDF_STATUS_SUCCESS) { - sms_log(pMac, LOGE, - FL("Failed to acquire the lock status = %d"), status); + sme_err("Failed to acquire the lock status: %d", status); goto done; } @@ -491,8 +481,7 @@ static QDF_STATUS free_sme_cmd_list(tpAniSirGlobal pMac) status = qdf_mutex_release(&pMac->sme.lkSmeGlobalLock); if (status != QDF_STATUS_SUCCESS) { - sms_log(pMac, LOGE, - FL("Failed to release the lock status = %d"), status); + sme_err("Failed to release the lock status: %d", status); } done: return status; @@ -503,34 +492,31 @@ static void dump_csr_command_info(tpAniSirGlobal mac_ctx, { switch (cmd->command) { case eSmeCommandScan: - sms_log(mac_ctx, LOGD, "scan command reason: %d session: %d", + sme_debug("scan command reason: %d session: %d", cmd->u.scanCmd.reason, cmd->sessionId); break; case eSmeCommandRoam: - sms_log(mac_ctx, LOGD, "roam command reason: %d session: %d", + sme_debug("roam command reason: %d session: %d", cmd->u.roamCmd.roamReason, cmd->sessionId); break; case eSmeCommandWmStatusChange: - sms_log(mac_ctx, LOGD, - "WMStatusChange command type: %d session: %d", + sme_debug("WMStatusChange command type: %d session: %d", cmd->u.wmStatusChangeCmd.Type, cmd->sessionId); break; case eSmeCommandSetKey: - sms_log(mac_ctx, LOGD, - "setKey command auth: %d enc: %d session: %d", + sme_debug("setKey command auth: %d enc: %d session: %d", cmd->u.setKeyCmd.authType, cmd->u.setKeyCmd.encType, cmd->sessionId); break; default: - sms_log(mac_ctx, LOGD, - "default: Unhandled command: %d session: %d", + sme_warn("Unhandled command: %d session: %d", cmd->command, cmd->sessionId); break; @@ -561,7 +547,7 @@ tSmeCmd *sme_get_command_buffer(tpAniSirGlobal pMac) if (pEntry) { pTempCmd = GET_BASE_ADDR(pEntry, tSmeCmd, Link); } - sms_log(pMac, LOGE, + sme_err( "Out of command buffer.... command (0x%X) stuck", (pTempCmd) ? pTempCmd->command : eSmeNoCommand); if (pTempCmd) { @@ -580,7 +566,7 @@ tSmeCmd *sme_get_command_buffer(tpAniSirGlobal pMac) pTempCmd = GET_BASE_ADDR(pEntry, tSmeCmd, Link); /* Print only 1st five commands from pending queue. */ if (idx <= 5) - sms_log(pMac, LOGE, + sme_err( "Out of command buffer.... SME pending command #%d (0x%X)", idx, pTempCmd->command); idx++; @@ -604,7 +590,7 @@ tSmeCmd *sme_get_command_buffer(tpAniSirGlobal pMac) pTempCmd = GET_BASE_ADDR(pEntry, tSmeCmd, Link); /* Print only 1st five commands from CSR pending queue */ if (idx <= 5) - sms_log(pMac, LOGE, + sme_err( "Out of command buffer.... " "CSR roamCmdPendingList command #%d (0x%X)", idx, pTempCmd->command); @@ -648,7 +634,7 @@ tSmeCmd *sme_get_command_buffer(tpAniSirGlobal pMac) void sme_push_command(tpAniSirGlobal pMac, tSmeCmd *pCmd, bool fHighPriority) { if (!SME_IS_START(pMac)) { - sms_log(pMac, LOGE, FL("Sme in stop state")); + sme_err("Sme in stop state"); QDF_ASSERT(0); return; } @@ -672,8 +658,7 @@ static void sme_abort_command(tpAniSirGlobal pMac, tSmeCmd *pCommand, bool fStopping) { if (eSmePmcCommandMask & pCommand->command) { - sms_log(pMac, LOGD, - "No need to process PMC commands"); + sme_debug("No need to process PMC commands"); return; } if (eSmeCsrCommandMask & pCommand->command) { @@ -714,15 +699,15 @@ tListElem *csr_get_cmd_to_process(tpAniSirGlobal pMac, tDblLinkList *pList, while (pCurEntry) { pCommand = GET_BASE_ADDR(pCurEntry, tSmeCmd, Link); if (pCommand->sessionId != sessionId) { - sms_log(pMac, LOGD, - "selected the command with different sessionId"); + sme_debug("selected the command with different sessionId"); return pCurEntry; } pCurEntry = csr_ll_next(pList, pCurEntry, fInterlocked); } - sms_log(pMac, LOGD, "No command pending with different sessionId"); + sme_debug("No command pending with different sessionId"); + return NULL; } @@ -750,8 +735,7 @@ static bool sme_process_scan_queue(tpAniSirGlobal pMac) if (!pEntry) goto end; - sms_log(pMac, LOGD, - FL("scan_count in active scanlist %d "), + sme_debug("scan_count in active scanlist: %d", pMac->sme.smeScanCmdActiveList.Count); pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link); @@ -775,8 +759,7 @@ static bool sme_process_scan_queue(tpAniSirGlobal pMac) */ if (CSR_IS_WAIT_FOR_KEY(pMac, pCommand->sessionId)) { if (!CSR_IS_SET_KEY_COMMAND(pCommand)) { - sms_log(pMac, LOGE, - FL("Can't process cmd(%d), waiting for key"), + sme_err("Can't process cmd: %d, waiting for key", pCommand->command); status = false; goto end; @@ -788,19 +771,17 @@ static bool sme_process_scan_queue(tpAniSirGlobal pMac) &pCommand->Link, LL_ACCESS_NOLOCK); switch (pCommand->command) { case eSmeCommandScan: - sms_log(pMac, LOGD, FL("Processing scan offload cmd.")); + sme_debug("Processing scan offload cmd"); qdf_mc_timer_start(&pCommand->u.scanCmd.csr_scan_timer, CSR_ACTIVE_SCAN_LIST_CMD_TIMEOUT); csr_process_scan_command(pMac, pCommand); break; case eSmeCommandRemainOnChannel: - sms_log(pMac, LOGD, - FL("Processing remain on channel offload cmd")); + sme_debug("Processing remain on channel offload cmd"); p2p_process_remain_on_channel_cmd(pMac, pCommand); break; default: - sms_log(pMac, LOGE, - FL("Wrong cmd enqueued to ScanCmdPendingList")); + sme_err("Wrong cmd enqueued to ScanCmdPendingList"); pEntry = csr_ll_remove_head( &pMac->sme.smeScanCmdActiveList, LL_ACCESS_NOLOCK); @@ -892,8 +873,7 @@ sme_process_cmd: if (CSR_IS_CLOSE_SESSION_COMMAND(pCommand)) { tSmeCmd *sme_cmd = NULL; - sms_log(pMac, LOGE, - FL("SessionId %d: close session command issued while waiting for key, issue disconnect first"), + sme_err("SessionId: %d close session command issued while waiting for key, issue disconnect first", pCommand->sessionId); status = csr_prepare_disconnect_command(pMac, pCommand->sessionId, &sme_cmd); @@ -910,8 +890,7 @@ sme_process_cmd: } csr_ll_unlock(&pMac->sme.smeCmdActiveList); - sms_log(pMac, LOGE, - FL("SessionId %d: Can't process cmd(%d), waiting for key"), + sme_err("SessionId: %d Can't process cmd: %d, waiting for key", pCommand->sessionId, pCommand->command); fContinue = false; goto process_scan_q; @@ -1059,8 +1038,7 @@ sme_process_cmd: default: /* something is wrong */ /* remove it from the active list */ - sms_log(pMac, LOGE, FL("unknown command %d"), - pCommand->command); + sme_err("Unknown command: %d", pCommand->command); pEntry = csr_ll_remove_head(&pMac->sme.smeCmdActiveList, LL_ACCESS_NOLOCK); csr_ll_unlock(&pMac->sme.smeCmdActiveList); @@ -1139,7 +1117,6 @@ static void sme_state_info_dump(char **buf_ptr, uint16_t *size) } mac = PMAC_STRUCT(hal); - sms_log(mac, LOGD, FL("size of buffer: %d"), *size); active_session_id = sme_get_sessionid_from_activelist(mac); if (active_session_id != CSR_SESSION_ID_INVALID) { @@ -1211,20 +1188,18 @@ QDF_STATUS sme_open(tHalHandle hHal) pMac->sme.currDeviceMode = QDF_STA_MODE; if (!QDF_IS_STATUS_SUCCESS(qdf_mutex_create( &pMac->sme.lkSmeGlobalLock))) { - sms_log(pMac, LOGE, FL("sme_open failed init lock")); + sme_err("sme_open failed init lock"); return QDF_STATUS_E_FAILURE; } status = csr_open(pMac); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, FL("csr_open failed, status=%d"), status); + sme_err("csr_open failed, status: %d", status); return status; } status = sme_ps_open(hHal); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL("sme_ps_open failed during initialization with status=%d"), - status); + sme_err("sme_ps_open failed with status: %d", status); return status; } #ifdef FEATURE_WLAN_TDLS @@ -1234,7 +1209,7 @@ QDF_STATUS sme_open(tHalHandle hHal) #ifndef WLAN_MDM_CODE_REDUCTION_OPT status = sme_qos_open(pMac); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, FL("Qos open, status=%d"), status); + sme_err("Qos open, status: %d", status); return status; } #endif @@ -1244,7 +1219,7 @@ QDF_STATUS sme_open(tHalHandle hHal) status = rrm_open(pMac); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, FL("rrm_open failed, status=%d"), status); + sme_err("rrm_open failed, status: %d", status); return status; } sme_p2p_open(pMac); @@ -1290,22 +1265,18 @@ QDF_STATUS sme_init_chan_list(tHalHandle hal, uint8_t *alpha2, QDF_STATUS sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams) { QDF_STATUS status = QDF_STATUS_E_FAILURE; - tpAniSirGlobal pMac = PMAC_STRUCT(hHal); MTRACE(qdf_trace(QDF_MODULE_ID_SME, TRACE_CODE_SME_RX_HDD_MSG_SET_11DINFO, NO_SESSION, 0)); if (NULL == pSmeConfigParams) { - sms_log(pMac, LOGE, - "Empty config param structure for SME, nothing to update"); + sme_err("SME config params empty"); return status; } status = csr_set_channels(hHal, &pSmeConfigParams->csrConfig); - if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - "csr_change_default_config_param failed with status=%d", - status); - } + if (!QDF_IS_STATUS_SUCCESS(status)) + sme_err("csr_set_channels failed with status: %d", status); + return status; } @@ -1322,7 +1293,6 @@ void sme_set_scan_disable(tHalHandle h_hal, int value) { tpAniSirGlobal mac_ctx = PMAC_STRUCT(h_hal); mac_ctx->lim.scan_disabled = value; - sms_log(mac_ctx, LOGD, FL("value=%d"), value); } /*-------------------------------------------------------------------------- @@ -1348,7 +1318,7 @@ QDF_STATUS sme_get_soft_ap_domain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp TRACE_CODE_SME_RX_HDD_MSG_GET_SOFTAP_DOMAIN, NO_SESSION, 0)); if (NULL == domainIdSoftAp) { - sms_log(pMac, LOGE, "Uninitialized domain Id"); + sme_err("Uninitialized domain Id"); return status; } @@ -1361,19 +1331,17 @@ QDF_STATUS sme_get_soft_ap_domain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp QDF_STATUS sme_set_reg_info(tHalHandle hHal, uint8_t *apCntryCode) { QDF_STATUS status = QDF_STATUS_E_FAILURE; - tpAniSirGlobal pMac = PMAC_STRUCT(hHal); MTRACE(qdf_trace(QDF_MODULE_ID_SME, TRACE_CODE_SME_RX_HDD_MSG_SET_REGINFO, NO_SESSION, 0)); if (NULL == apCntryCode) { - sms_log(pMac, LOGE, "Empty Country Code, nothing to update"); + sme_err("Empty Country Code, nothing to update"); return status; } status = csr_set_reg_info(hHal, apCntryCode); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, "csr_set_reg_info failed with status=%d", - status); + sme_err("csr_set_reg_info failed with status: %d", status); } return status; } @@ -1438,8 +1406,7 @@ QDF_STATUS sme_update_config(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams TRACE_CODE_SME_RX_HDD_MSG_UPDATE_CONFIG, NO_SESSION, 0)); if (NULL == pSmeConfigParams) { - sms_log(pMac, LOGE, - "Empty config param structure for SME, nothing to update"); + sme_err("SME config params empty"); return status; } @@ -1447,16 +1414,14 @@ QDF_STATUS sme_update_config(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams csr_change_default_config_param(pMac, &pSmeConfigParams->csrConfig); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - "csr_change_default_config_param failed with status=%d", + sme_err("csr_change_default_config_param failed status: %d", status); } status = rrm_change_default_config_param(hHal, &pSmeConfigParams->rrmConfig); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - "rrm_change_default_config_param failed with status=%d", + sme_err("rrm_change_default_config_param failed status: %d", status); } /* For SOC, CFG is set before start */ @@ -1691,22 +1656,19 @@ QDF_STATUS sme_hdd_ready_ind(tHalHandle hHal) if (eSIR_FAILURE != u_mac_post_ctrl_msg(hHal, (tSirMbMsg *) &Msg)) { status = QDF_STATUS_SUCCESS; } else { - sms_log(pMac, LOGE, - "u_mac_post_ctrl_msg failed to send eWNI_SME_SYS_READY_IND"); + sme_err("u_mac_post_ctrl_msg failed to send eWNI_SME_SYS_READY_IND"); break; } status = csr_ready(pMac); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - "csr_ready failed with status=%d", - status); + sme_err("csr_ready failed with status: %d", status); break; } if (QDF_STATUS_SUCCESS != rrm_ready(hHal)) { status = QDF_STATUS_E_FAILURE; - sms_log(pMac, LOGE, "rrm_ready failed"); + sme_err("rrm_ready failed"); break; } pMac->sme.state = SME_STATE_READY; @@ -1738,9 +1700,7 @@ QDF_STATUS sme_start(tHalHandle hHal) do { status = csr_start(pMac); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - "csr_start failed during smeStart with status=%d", - status); + sme_err("csr_start failed status: %d", status); break; } pMac->sme.state = SME_STATE_START; @@ -1774,8 +1734,7 @@ static QDF_STATUS sme_handle_scan_req(tpAniSirGlobal mac_ctx, scan_msg->scan_param, callback, scan_msg->ctx); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("scan request failed. session_id %d"), session_id); + sme_err("Scan request failed. session_id: %d", session_id); } csr_scan_free_request(mac_ctx, scan_msg->scan_param); qdf_mem_free(scan_msg->scan_param); @@ -1797,11 +1756,10 @@ static QDF_STATUS sme_handle_roc_req(tHalHandle hal, { struct ani_roc_req *roc_msg; QDF_STATUS status = QDF_STATUS_E_FAILURE; - tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); remainOnChanCallback callback; if (msg == NULL) { - sms_log(mac_ctx, LOGE, FL("ROC request is NULL")); + sme_err("ROC request is NULL"); return status; } @@ -1812,8 +1770,7 @@ static QDF_STATUS sme_handle_roc_req(tHalHandle hal, roc_msg->ctx, roc_msg->is_p2pprobe_allowed, roc_msg->scan_id); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("scan request failed. session_id %d scan_id %d"), + sme_err("Scan request failed. session_id: %d scan_id: %d", roc_msg->session_id, roc_msg->scan_id); } return status; @@ -1869,9 +1826,7 @@ QDF_STATUS dfs_msg_processor(tpAniSirGlobal pMac, uint16_t msgType, void *pMsgBu /* Radar found !! */ dfs_event = (tSirSmeDfsEventInd *) pMsgBuf; if (NULL == dfs_event) { - sms_log(pMac, LOGE, - "%s: pMsg is NULL for eWNI_SME_DFS_RADAR_FOUND message", - __func__); + sme_err("dfs_event is NULL"); return QDF_STATUS_E_FAILURE; } sessionId = dfs_event->sessionId; @@ -1898,9 +1853,7 @@ QDF_STATUS dfs_msg_processor(tpAniSirGlobal pMac, uint16_t msgType, void *pMsgBu csaIeTxCompleteRsp = (tSirSmeCSAIeTxCompleteRsp *) pMsgBuf; if (NULL == csaIeTxCompleteRsp) { - sms_log(pMac, LOGE, - "%s: pMsg is NULL for eWNI_SME_DFS_CSAIE_TX_COMPLETE_IND", - __func__); + sme_err("pMsg is NULL for eWNI_SME_DFS_CSAIE_TX_COMPLETE_IND"); return QDF_STATUS_E_FAILURE; } sessionId = csaIeTxCompleteRsp->sessionId; @@ -1913,8 +1866,7 @@ QDF_STATUS dfs_msg_processor(tpAniSirGlobal pMac, uint16_t msgType, void *pMsgBu } default: { - sms_log(pMac, LOGD, "%s: Invalid DFS message = 0x%x", - __func__, msgType); + sme_err("Invalid DFS message: 0x%x", msgType); status = QDF_STATUS_E_FAILURE; return status; } @@ -1947,20 +1899,17 @@ static QDF_STATUS sme_extended_change_channel_ind(tpAniSirGlobal mac_ctx, eRoamCmdStatus roam_status; eCsrRoamResult roam_result; - ext_chan_ind = msg_buf; if (NULL == ext_chan_ind) { - sms_log(mac_ctx, LOGE, - FL("pMsg is NULL for eWNI_SME_EXT_CHANGE_CHANNEL_IND")); + sme_err("ext_chan_ind is NULL"); return QDF_STATUS_E_FAILURE; } session_id = ext_chan_ind->session_id; roamInfo.target_channel = ext_chan_ind->new_channel; roam_status = eCSR_ROAM_EXT_CHG_CHNL_IND; roam_result = eCSR_ROAM_EXT_CHG_CHNL_UPDATE_IND; - sms_log(mac_ctx, LOGD, - FL("sapdfs: Received eWNI_SME_EXT_CHANGE_CHANNEL_IND for session id [%d]"), - session_id); + sme_debug("sapdfs: Received eWNI_SME_EXT_CHANGE_CHANNEL_IND for session id [%d]", + session_id); /* Indicate Ext Channel Change event to SAP */ csr_roam_call_callback(mac_ctx, session_id, &roamInfo, 0, @@ -2063,8 +2012,7 @@ QDF_STATUS sme_set_plm_request(tHalHandle hHal, tpSirPlmReq pPlmReq) return status; if (!pSession) { - sms_log(pMac, LOGE, FL("session %d not found"), - pPlmReq->sessionId); + sme_err("session %d not found", pPlmReq->sessionId); sme_release_global_lock(&pMac->sme); return QDF_STATUS_E_FAILURE; } @@ -2204,8 +2152,7 @@ QDF_STATUS sme_set_ese_beacon_request(tHalHandle hHal, const uint8_t sessionId, tpRrmSMEContext pSmeRrmContext = &pMac->rrm.rrmSmeContext; if (pSmeRrmContext->eseBcnReqInProgress == true) { - sms_log(pMac, LOGE, - "A Beacon Report Req is already in progress"); + sme_err("A Beacon Report Req is already in progress"); return QDF_STATUS_E_RESOURCES; } @@ -2216,14 +2163,13 @@ QDF_STATUS sme_set_ese_beacon_request(tHalHandle hHal, const uint8_t sessionId, /* Prepare the request to send to SME. */ pSmeBcnReportReq = qdf_mem_malloc(sizeof(tSirBeaconReportReqInd)); if (NULL == pSmeBcnReportReq) { - sms_log(pMac, LOGE, - "Memory Allocation Failure!!! ESE BcnReq Ind to SME"); + sme_err("Memory Allocation Failure!!! ESE BcnReq Ind to SME"); return QDF_STATUS_E_NOMEM; } pSmeRrmContext->eseBcnReqInProgress = true; - sms_log(pMac, LOGD, "Sending Beacon Report Req to SME"); + sme_debug("Sending Beacon Report Req to SME"); pSmeBcnReportReq->messageType = eWNI_SME_BEACON_REPORT_REQ_IND; pSmeBcnReportReq->length = sizeof(tSirBeaconReportReqInd); @@ -2406,7 +2352,7 @@ static QDF_STATUS sme_process_dual_mac_config_resp(tpAniSirGlobal mac, param = (struct sir_dual_mac_config_resp *)msg; if (!param) { - sms_log(mac, LOGE, FL("Dual mac config resp param is NULL")); + sme_err("Dual mac config resp param is NULL"); /* Not returning. Need to check if active command list * needs to be freed */ @@ -2415,35 +2361,33 @@ static QDF_STATUS sme_process_dual_mac_config_resp(tpAniSirGlobal mac, entry = csr_ll_peek_head(&mac->sme.smeCmdActiveList, LL_ACCESS_LOCK); if (!entry) { - sms_log(mac, LOGE, FL("No cmd found in active list")); + sme_err("No cmd found in active list"); return QDF_STATUS_E_FAILURE; } command = GET_BASE_ADDR(entry, tSmeCmd, Link); if (!command) { - sms_log(mac, LOGE, FL("Base address is NULL")); + sme_err("Base address is NULL"); return QDF_STATUS_E_FAILURE; } if (e_sme_command_set_dual_mac_config != command->command) { - sms_log(mac, LOGE, FL("Command mismatch!")); + sme_err("Command mismatch!"); return QDF_STATUS_E_FAILURE; } callback = command->u.set_dual_mac_cmd.set_dual_mac_cb; if (callback) { if (!param) { - sms_log(mac, LOGE, - FL("Callback failed-Dual mac config is NULL")); + sme_err("Callback failed-Dual mac config is NULL"); } else { - sms_log(mac, LOGD, - FL("Calling HDD callback for Dual mac config")); + sme_debug("Calling HDD callback for Dual mac config"); callback(param->status, command->u.set_dual_mac_cmd.scan_config, command->u.set_dual_mac_cmd.fw_mode_config); } } else { - sms_log(mac, LOGE, FL("Callback does not exist")); + sme_err("Callback does not exist"); } found = csr_ll_remove_entry(&mac->sme.smeCmdActiveList, entry, @@ -2476,7 +2420,7 @@ static QDF_STATUS sme_process_antenna_mode_resp(tpAniSirGlobal mac, param = (struct sir_antenna_mode_resp *)msg; if (!param) { - sms_log(mac, LOGE, FL("set antenna mode resp is NULL")); + sme_err("set antenna mode resp is NULL"); /* Not returning. Need to check if active command list * needs to be freed */ @@ -2485,18 +2429,18 @@ static QDF_STATUS sme_process_antenna_mode_resp(tpAniSirGlobal mac, entry = csr_ll_peek_head(&mac->sme.smeCmdActiveList, LL_ACCESS_LOCK); if (!entry) { - sms_log(mac, LOGE, FL("No cmd found in active list")); + sme_err("No cmd found in active list"); return QDF_STATUS_E_FAILURE; } command = GET_BASE_ADDR(entry, tSmeCmd, Link); if (!command) { - sms_log(mac, LOGE, FL("Base address is NULL")); + sme_err("Base address is NULL"); return QDF_STATUS_E_FAILURE; } if (e_sme_command_set_antenna_mode != command->command) { - sms_log(mac, LOGE, FL("Command mismatch!")); + sme_err("Command mismatch!"); return QDF_STATUS_E_FAILURE; } @@ -2504,15 +2448,12 @@ static QDF_STATUS sme_process_antenna_mode_resp(tpAniSirGlobal mac, command->u.set_antenna_mode_cmd.set_antenna_mode_resp; if (callback) { if (!param) { - sms_log(mac, LOGE, - FL("Set antenna mode call back is NULL")); + sme_err("Set antenna mode call back is NULL"); } else { - sms_log(mac, LOGD, - FL("HDD callback for set antenna mode")); callback(param->status); } } else { - sms_log(mac, LOGE, FL("Callback does not exist")); + sme_err("Callback does not exist"); } found = csr_ll_remove_entry(&mac->sme.smeCmdActiveList, entry, @@ -2549,19 +2490,18 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) tSmeCmd *sme_cmd = NULL; if (pMsg == NULL) { - sms_log(pMac, LOGE, "Empty message for SME"); + sme_err("Empty message for SME"); return status; } status = sme_acquire_global_lock(&pMac->sme); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGW, FL("Locking failed, bailing out")); + sme_warn("Locking failed, bailing out"); if (pMsg->bodyptr) qdf_mem_free(pMsg->bodyptr); return status; } if (!SME_IS_START(pMac)) { - sms_log(pMac, LOGW, FL("message type %d in stop state ignored"), - pMsg->type); + sme_warn("message type %d in stop state ignored", pMsg->type); if (pMsg->bodyptr) qdf_mem_free(pMsg->bodyptr); goto release_lock; @@ -2621,8 +2561,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) qdf_mem_free(pMsg->bodyptr); #endif } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; case eWNI_SME_NEIGHBOR_REPORT_IND: @@ -2632,8 +2571,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; case eWNI_SME_ADD_STA_SELF_RSP: @@ -2642,8 +2580,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; case eWNI_SME_DEL_STA_SELF_RSP: @@ -2652,8 +2589,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; case eWNI_SME_REMAIN_ON_CHN_RSP: @@ -2661,8 +2597,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) status = sme_remain_on_chn_rsp(pMac, pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; case eWNI_SME_REMAIN_ON_CHN_RDY_IND: @@ -2670,8 +2605,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) status = sme_remain_on_chn_ready(pMac, pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; #ifdef FEATURE_WLAN_SCAN_PNO @@ -2683,8 +2617,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; #endif /* FEATURE_WLAN_SCAN_PNO */ @@ -2694,8 +2627,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; case eWNI_SME_GENERIC_CHANGE_COUNTRY_CODE: @@ -2704,8 +2636,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) (void *)pMac, pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; case eWNI_SME_SCAN_CMD: @@ -2713,8 +2644,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) status = sme_handle_scan_req(pMac, pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; case eWNI_SME_ROC_CMD: @@ -2722,8 +2652,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) status = sme_handle_roc_req(hHal, pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; #ifdef FEATURE_WLAN_TDLS @@ -2746,8 +2675,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; #endif @@ -2757,8 +2685,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) sme_unprotected_mgmt_frm_ind(pMac, pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; #endif @@ -2768,8 +2695,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) sme_tsm_ie_ind(pMac, pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; #endif /* FEATURE_WLAN_ESE */ @@ -2786,8 +2712,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) sme_process_get_gtk_info_rsp(pMac, pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; #endif @@ -2807,8 +2732,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; case eWNI_SME_READY_TO_SUSPEND_IND: @@ -2816,8 +2740,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) sme_process_ready_to_suspend(pMac, pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; #ifdef WLAN_FEATURE_EXTWOW_SUPPORT @@ -2826,8 +2749,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) sme_process_ready_to_ext_wow(pMac, pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; #endif @@ -2867,8 +2789,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; #ifdef WLAN_FEATURE_STATS_EXT @@ -2877,8 +2798,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) status = sme_stats_ext_event(hHal, pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; #endif @@ -2956,8 +2876,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) eSIR_EXTSCAN_FULL_SCAN_RESULT_IND, pMsg->bodyptr); else - sms_log(pMac, LOGE, - FL("callback not registered to process %d"), + sme_err("callback not registered to process: %d", pMsg->type); qdf_mem_free(pMsg->bodyptr); @@ -2968,8 +2887,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) eSIR_EPNO_NETWORK_FOUND_IND, pMsg->bodyptr); else - sms_log(pMac, LOGE, - FL("callback not registered to process %d"), + sme_err("callback not registered to process: %d", pMsg->type); qdf_mem_free(pMsg->bodyptr); @@ -2984,8 +2902,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; case eWNI_SME_HW_MODE_TRANS_IND: @@ -2994,8 +2911,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; case eWNI_SME_NSS_UPDATE_RSP: @@ -3004,8 +2920,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; case eWNI_SME_OCB_SET_CONFIG_RSP: @@ -3014,8 +2929,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMac->sme.ocb_set_config_context, pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL( - "Message error. The callback is NULL.")); + sme_err("No callback for Msg type: %d", pMsg->type); } pMac->sme.ocb_set_config_callback = NULL; pMac->sme.ocb_set_config_context = NULL; @@ -3027,8 +2941,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMac->sme.ocb_get_tsf_timer_context, pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL( - "Message error. The callback is NULL.")); + sme_err("No callback for Msg type: %d", pMsg->type); } pMac->sme.ocb_get_tsf_timer_callback = NULL; pMac->sme.ocb_get_tsf_timer_context = NULL; @@ -3040,8 +2953,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMac->sme.dcc_get_stats_context, pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL( - "Message error. The callback is NULL.")); + sme_err("No callback for Msg type: %d", pMsg->type); } pMac->sme.dcc_get_stats_callback = NULL; pMac->sme.dcc_get_stats_context = NULL; @@ -3053,8 +2965,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMac->sme.dcc_update_ndl_context, pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL( - "Message error. The callback is NULL.")); + sme_err("No callback for Msg type: %d", pMsg->type); } pMac->sme.dcc_update_ndl_callback = NULL; pMac->sme.dcc_update_ndl_context = NULL; @@ -3066,8 +2977,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMac->sme.dcc_stats_event_context, pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL( - "Message error. The callback is NULL.")); + sme_err("No callback for Msg type: %d", pMsg->type); } qdf_mem_free(pMsg->bodyptr); break; @@ -3077,8 +2987,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } case eWNI_SME_SET_THERMAL_LEVEL_IND: if (pMac->sme.set_thermal_level_cb) @@ -3095,8 +3004,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } break; case eWNI_SME_NDP_CONFIRM_IND: @@ -3140,12 +3048,10 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) status = csr_msg_processor(hHal, pMsg->bodyptr); qdf_mem_free(pMsg->bodyptr); } else { - sms_log(pMac, LOGE, FL("Empty message for %d"), - pMsg->type); + sme_err("Empty message for: %d", pMsg->type); } } else { - sms_log(pMac, LOGW, FL("Unknown message type %d"), - pMsg->type); + sme_warn("Unknown message type: %d", pMsg->type); if (pMsg->bodyptr) qdf_mem_free(pMsg->bodyptr); } @@ -3173,7 +3079,7 @@ QDF_STATUS sme_process_nss_update_resp(tpAniSirGlobal mac, uint8_t *msg) param = (struct sir_beacon_tx_complete_rsp *)msg; if (!param) { - sms_log(mac, LOGE, FL("nss update resp param is NULL")); + sme_err("nss update resp param is NULL"); /* Not returning. Need to check if active command list * needs to be freed */ @@ -3182,29 +3088,26 @@ QDF_STATUS sme_process_nss_update_resp(tpAniSirGlobal mac, uint8_t *msg) entry = csr_ll_peek_head(&mac->sme.smeCmdActiveList, LL_ACCESS_LOCK); if (!entry) { - sms_log(mac, LOGE, FL("No cmd found in active list")); + sme_err("No cmd found in active list"); return QDF_STATUS_E_FAILURE; } command = GET_BASE_ADDR(entry, tSmeCmd, Link); if (!command) { - sms_log(mac, LOGE, FL("Base address is NULL")); + sme_err("Base address is NULL"); return QDF_STATUS_E_FAILURE; } if (e_sme_command_nss_update != command->command) { - sms_log(mac, LOGE, FL("Command mismatch!")); + sme_err("Command mismatch!"); return QDF_STATUS_E_FAILURE; } callback = command->u.nss_update_cmd.nss_update_cb; if (callback) { if (!param) { - sms_log(mac, LOGE, - FL("Callback failed since nss update params is NULL")); + sme_err("Callback failed since nss update params is NULL"); } else { - sms_log(mac, LOGE, - FL("Calling HDD callback for nss update response")); callback(command->u.nss_update_cmd.context, param->tx_status, param->session_id, @@ -3212,7 +3115,7 @@ QDF_STATUS sme_process_nss_update_resp(tpAniSirGlobal mac, uint8_t *msg) command->u.nss_update_cmd.reason); } } else { - sms_log(mac, LOGE, FL("Callback does not exisit")); + sme_err("Callback does not exisit"); } found = csr_ll_remove_entry(&mac->sme.smeCmdActiveList, entry, @@ -3265,8 +3168,7 @@ QDF_STATUS sme_stop(tHalHandle hHal, tHalStopType stopType) status = csr_stop(pMac, stopType); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - "csr_stop failed during smeStop with status=%d", status); + sme_err("csr_stop failed with status: %d", status); fail_status = status; } @@ -3312,33 +3214,25 @@ QDF_STATUS sme_close(tHalHandle hHal) /* Note: pSession will be invalid from here on, do not access */ status = csr_close(pMac); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - "csr_close failed during sme close with status=%d", - status); + sme_err("csr_close failed with status: %d", status); fail_status = status; } #ifndef WLAN_MDM_CODE_REDUCTION_OPT status = sme_qos_close(pMac); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - "Qos close failed during sme close with status=%d", - status); + sme_err("Qos close failed with status: %d", status); fail_status = status; } #endif status = sme_ps_close(hHal); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - "sme_ps_close failed during smeClose status=%d", - status); + sme_err("sme_ps_close failed status: %d", status); fail_status = status; } status = rrm_close(hHal); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - "RRM close failed during sme close with status=%d", - status); + sme_err("RRM close failed with status: %d", status); fail_status = status; } @@ -3414,19 +3308,18 @@ QDF_STATUS sme_scan_request(tHalHandle hal, uint8_t session_id, scan_req->scanType)); if (!CSR_IS_SESSION_VALID(mac_ctx, session_id)) { - sms_log(mac_ctx, LOGE, FL("Invalid session id:%d"), - session_id); + sme_err("Invalid session id: %d", session_id); return status; } if (!mac_ctx->scan.fScanEnable) { - sms_log(mac_ctx, LOGE, FL("fScanEnable false")); + sme_err("fScanEnable false"); return status; } scan_count = csr_ll_count(&mac_ctx->sme.smeScanCmdActiveList); if (scan_count >= mac_ctx->scan.max_scan_count) { - sms_log(mac_ctx, LOGE, FL("Max scan reached")); + sme_err("Max scan reached"); return QDF_STATUS_E_FAILURE; } wma_get_scan_id(&scan_req_id); @@ -3434,14 +3327,13 @@ QDF_STATUS sme_scan_request(tHalHandle hal, uint8_t session_id, status = sme_acquire_global_lock(&mac_ctx->sme); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, FL("Unable to acquire lock")); + sme_err("Unable to acquire lock"); return status; } - sms_log(mac_ctx, LOGD, FL(" called")); + scan_msg = qdf_mem_malloc(sizeof(struct ani_scan_req)); if (NULL == scan_msg) { - sms_log(mac_ctx, LOGE, - " scan_req: failed to allocate mem for msg"); + sme_err("Failed to allocate memory for scan_msg"); sme_release_global_lock(&mac_ctx->sme); return QDF_STATUS_E_NOMEM; } @@ -3452,8 +3344,7 @@ QDF_STATUS sme_scan_request(tHalHandle hal, uint8_t session_id, scan_msg->ctx = ctx; scan_msg->scan_param = qdf_mem_malloc(sizeof(tCsrScanRequest)); if (NULL == scan_msg->scan_param) { - sms_log(mac_ctx, LOGE, - "scan_req:failed to allocate mem for scanreq"); + sme_err("Failed to allocate memory for scan_param"); sme_release_global_lock(&mac_ctx->sme); qdf_mem_free(scan_msg); return QDF_STATUS_E_NOMEM; @@ -3465,8 +3356,7 @@ QDF_STATUS sme_scan_request(tHalHandle hal, uint8_t session_id, msg.bodyval = 0; if (QDF_STATUS_SUCCESS != cds_mq_post_message(CDS_MQ_ID_SME, &msg)) { - sms_log(mac_ctx, LOGE, - " sme_scan_req failed to post msg"); + sme_err("sme_scan_req failed to post msg"); csr_scan_free_request(mac_ctx, scan_msg->scan_param); qdf_mem_free(scan_msg->scan_param); qdf_mem_free(scan_msg); @@ -3494,13 +3384,11 @@ QDF_STATUS sme_scan_get_result(tHalHandle hHal, uint8_t sessionId, MTRACE(qdf_trace(QDF_MODULE_ID_SME, TRACE_CODE_SME_RX_HDD_MSG_SCAN_GET_RESULTS, sessionId, 0)); - sms_log(pMac, LOGD, FL("enter")); status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { status = csr_scan_get_result(hHal, pFilter, phResult); sme_release_global_lock(&pMac->sme); } - sms_log(pMac, LOGD, FL("exit status %d"), status); return status; } @@ -3984,7 +3872,6 @@ QDF_STATUS sme_roam_connect(tHalHandle hHal, uint8_t sessionId, MTRACE(qdf_trace(QDF_MODULE_ID_SME, TRACE_CODE_SME_RX_HDD_MSG_CONNECT, sessionId, 0)); - sms_log(pMac, LOGD, FL("enter")); status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { if (CSR_IS_SESSION_VALID(pMac, sessionId)) { @@ -3992,13 +3879,12 @@ QDF_STATUS sme_roam_connect(tHalHandle hHal, uint8_t sessionId, csr_roam_connect(pMac, sessionId, pProfile, pRoamId); } else { - sms_log(pMac, LOGE, FL("invalid sessionID %d"), - sessionId); + sme_err("Invalid sessionID: %d", sessionId); status = QDF_STATUS_E_INVAL; } sme_release_global_lock(&pMac->sme); } else { - sms_log(pMac, LOGE, FL("sme_acquire_global_lock failed")); + sme_err("sme_acquire_global_lock failed"); } return status; @@ -4059,7 +3945,7 @@ QDF_STATUS sme_roam_reassoc(tHalHandle hHal, uint8_t sessionId, MTRACE(qdf_trace(QDF_MODULE_ID_SME, TRACE_CODE_SME_RX_HDD_ROAM_REASSOC, sessionId, 0)); - sms_log(pMac, LOGD, FL("enter")); + status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { if (CSR_IS_SESSION_VALID(pMac, sessionId)) { @@ -4127,7 +4013,7 @@ QDF_STATUS sme_roam_disconnect(tHalHandle hHal, uint8_t sessionId, MTRACE(qdf_trace(QDF_MODULE_ID_SME, TRACE_CODE_SME_RX_HDD_ROAM_DISCONNECT, sessionId, reason)); - sms_log(pMac, LOGD, FL("enter")); + status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { if (CSR_IS_SESSION_VALID(pMac, sessionId)) { @@ -4157,8 +4043,7 @@ void sme_dhcp_done_ind(tHalHandle hal, uint8_t session_id) session = CSR_GET_SESSION(mac_ctx, session_id); if (!session) { - sms_log(mac_ctx, LOGE, - FL("session %d not found"), session_id); + sme_err("Session: %d not found", session_id); return; } session->dhcp_done = true; @@ -4176,7 +4061,6 @@ QDF_STATUS sme_roam_stop_bss(tHalHandle hHal, uint8_t sessionId) QDF_STATUS status = QDF_STATUS_E_FAILURE; tpAniSirGlobal pMac = PMAC_STRUCT(hHal); - sms_log(pMac, LOGD, FL("enter")); status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { if (CSR_IS_SESSION_VALID(pMac, sessionId)) { @@ -4711,8 +4595,7 @@ QDF_STATUS sme_get_config_param(tHalHandle hHal, tSmeConfigParams *pParam) if (QDF_IS_STATUS_SUCCESS(status)) { status = csr_get_config_param(pMac, &pParam->csrConfig); if (status != QDF_STATUS_SUCCESS) { - sms_log(pMac, LOGE, "%s csr_get_config_param failed", - __func__); + sme_err("csr_get_config_param failed"); sme_release_global_lock(&pMac->sme); return status; } @@ -5061,8 +4944,7 @@ QDF_STATUS sme_wow_add_pattern(tHalHandle hal, 0)); ptrn = qdf_mem_malloc(sizeof(*ptrn)); if (NULL == ptrn) { - sms_log(pMac, LOGE, - FL("Fail to allocate memory for WoWLAN Add Bcast Pattern ")); + sme_err("Fail to allocate memory for WoWLAN Add Bcast Pattern"); return QDF_STATUS_E_NOMEM; } (void)qdf_mem_copy(ptrn, pattern, sizeof(*ptrn)); @@ -5072,11 +4954,10 @@ QDF_STATUS sme_wow_add_pattern(tHalHandle hal, msg_q.bodyptr = ptrn; msg_q.bodyval = 0; - sms_log(pMac, LOGD, FL("Sending WMA_WOWL_ADD_BCAST_PTRN to HAL")); + sme_debug("Sending WMA_WOWL_ADD_BCAST_PTRN to HAL"); ret_code = wma_post_ctrl_msg(pMac, &msg_q); if (eSIR_SUCCESS != ret_code) { - sms_log(pMac, LOGE, - FL("Posting WMA_WOWL_ADD_BCAST_PTRN failed, reason=%X"), + sme_err("Posting WMA_WOWL_ADD_BCAST_PTRN failed, reason: %X", ret_code); } return ret_code; @@ -5102,8 +4983,7 @@ QDF_STATUS sme_wow_delete_pattern(tHalHandle hal, 0)); delete_ptrn = qdf_mem_malloc(sizeof(*delete_ptrn)); if (NULL == delete_ptrn) { - sms_log(pMac, LOGE, - FL("Fail to allocate memory for WoWLAN Delete Bcast Pattern ")); + sme_err("Allocation failed for WoWLAN Delete Bcast Pattern"); return QDF_STATUS_E_NOMEM; } (void)qdf_mem_copy(delete_ptrn, pattern, sizeof(*delete_ptrn)); @@ -5112,12 +4992,11 @@ QDF_STATUS sme_wow_delete_pattern(tHalHandle hal, msg_q.bodyptr = delete_ptrn; msg_q.bodyval = 0; - sms_log(pMac, LOGD, FL("Sending WMA_WOWL_DEL_BCAST_PTRN")); + sme_debug("Sending WMA_WOWL_DEL_BCAST_PTRN"); ret_code = wma_post_ctrl_msg(pMac, &msg_q); if (eSIR_SUCCESS != ret_code) { - sms_log(pMac, LOGE, - FL("Posting WMA_WOWL_DEL_BCAST_PTRN failed, reason=%X"), + sme_err("Posting WMA_WOWL_DEL_BCAST_PTRN failed, reason: %X", ret_code); } return ret_code; @@ -5246,8 +5125,7 @@ QDF_STATUS sme_roam_set_key(tHalHandle hal, uint8_t session_id, MTRACE(qdf_trace(QDF_MODULE_ID_SME, TRACE_CODE_SME_RX_HDD_SET_KEY, session_id, 0)); if (set_key->keyLength > CSR_MAX_KEY_LEN) { - sms_log(mac_ctx, LOGE, FL("Invalid key length %d"), - set_key->keyLength); + sme_err("Invalid key length: %d", set_key->keyLength); return QDF_STATUS_E_FAILURE; } /*Once Setkey is done, we can go in BMPS */ @@ -5262,15 +5140,14 @@ QDF_STATUS sme_roam_set_key(tHalHandle hal, uint8_t session_id, if (ptr_roam_id) *ptr_roam_id = roam_id; - sms_log(mac_ctx, LOGD, FL("keyLength %d"), set_key->keyLength); + sme_debug("keyLength: %d", set_key->keyLength); for (i = 0; i < set_key->keyLength; i++) - sms_log(mac_ctx, LOGD, FL("%02x"), set_key->Key[i]); + sme_debug("%02x", set_key->Key[i]); - sms_log(mac_ctx, LOGD, "\n session_id=%d roam_id=%d", session_id, - roam_id); + sme_debug("Session_id: %d roam_id: %d", session_id, roam_id); session = CSR_GET_SESSION(mac_ctx, session_id); if (!session) { - sms_log(mac_ctx, LOGE, FL("session %d not found"), session_id); + sme_err("session %d not found", session_id); sme_release_global_lock(&mac_ctx->sme); return QDF_STATUS_E_FAILURE; } @@ -5309,13 +5186,11 @@ QDF_STATUS sme_roam_set_default_key_index(tHalHandle hal, uint8_t session_id, uint8_t default_idx) { cds_msg_t msg; - tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); struct wep_update_default_key_idx *update_key; update_key = qdf_mem_malloc(sizeof(*update_key)); if (!update_key) { - sms_log(mac_ctx, LOGE, - FL("Failed to allocate memory for update key")); + sme_err("Failed to allocate memory for update key"); return QDF_STATUS_E_NOMEM; } @@ -5328,8 +5203,7 @@ QDF_STATUS sme_roam_set_default_key_index(tHalHandle hal, uint8_t session_id, if (QDF_STATUS_SUCCESS != cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) { - sms_log(mac_ctx, LOGE, - FL("Failed to post WMA_UPDATE_WEP_DEFAULT_KEY to WMA")); + sme_err("Failed to post WMA_UPDATE_WEP_DEFAULT_KEY to WMA"); qdf_mem_free(update_key); return QDF_STATUS_E_FAILURE; } @@ -5594,14 +5468,11 @@ QDF_STATUS sme_change_country_code(tHalHandle hHal, 0)); status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGD, FL(" called")); - if ((pMac->roam.configParam.Is11dSupportEnabledOriginal == true) && (!pMac->roam.configParam. fSupplicantCountryCodeHasPriority)) { - sms_log(pMac, LOGW, - "Set Country Code Fail since the STA is associated and userspace does not have priority "); + sme_warn("Set Country Code Fail since the STA is associated and userspace does not have priority"); sme_release_global_lock(&pMac->sme); status = QDF_STATUS_E_FAILURE; @@ -5610,8 +5481,7 @@ QDF_STATUS sme_change_country_code(tHalHandle hHal, pMsg = qdf_mem_malloc(sizeof(tAniChangeCountryCodeReq)); if (NULL == pMsg) { - sms_log(pMac, LOGE, - " csrChangeCountryCode: failed to allocate mem for req"); + sme_err("csrChangeCountryCode: failed to allocate mem for req"); sme_release_global_lock(&pMac->sme); return QDF_STATUS_E_NOMEM; } @@ -5631,12 +5501,10 @@ QDF_STATUS sme_change_country_code(tHalHandle hHal, if (QDF_STATUS_SUCCESS != cds_mq_post_message(CDS_MQ_ID_SME, &msg)) { - sms_log(pMac, LOGE, - " sme_change_country_code failed to post msg to self "); + sme_err("sme_change_country_code failed to post msg to self"); qdf_mem_free((void *)pMsg); status = QDF_STATUS_E_FAILURE; } - sms_log(pMac, LOGD, FL(" returned")); sme_release_global_lock(&pMac->sme); } @@ -5677,12 +5545,10 @@ QDF_STATUS sme_generic_change_country_code(tHalHandle hHal, status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGD, FL(" called")); pMsg = qdf_mem_malloc(sizeof(tAniGenericChangeCountryCodeReq)); if (NULL == pMsg) { - sms_log(pMac, LOGE, - " sme_generic_change_country_code: failed to allocate mem for req"); + sme_err("sme_generic_change_country_code: failed to allocate mem for req"); sme_release_global_lock(&pMac->sme); return QDF_STATUS_E_NOMEM; } @@ -5699,12 +5565,10 @@ QDF_STATUS sme_generic_change_country_code(tHalHandle hHal, if (QDF_STATUS_SUCCESS != cds_mq_post_message(CDS_MQ_ID_SME, &msg)) { - sms_log(pMac, LOGE, - "sme_generic_change_country_code failed to post msg to self"); + sme_err("sme_generic_change_country_code failed to post msg to self"); qdf_mem_free(pMsg); status = QDF_STATUS_E_FAILURE; } - sms_log(pMac, LOGD, FL(" returned")); sme_release_global_lock(&pMac->sme); } @@ -5745,8 +5609,7 @@ QDF_STATUS sme_dhcp_start_ind(tHalHandle hHal, pSession = CSR_GET_SESSION(pMac, sessionId); if (!pSession) { - sms_log(pMac, LOGE, FL("session %d not found "), - sessionId); + sme_err("Session: %d not found", sessionId); sme_release_global_lock(&pMac->sme); return QDF_STATUS_E_FAILURE; } @@ -5817,8 +5680,7 @@ QDF_STATUS sme_dhcp_stop_ind(tHalHandle hHal, pSession = CSR_GET_SESSION(pMac, sessionId); if (!pSession) { - sms_log(pMac, LOGE, FL("session %d not found "), - sessionId); + sme_err("Session: %d not found", sessionId); sme_release_global_lock(&pMac->sme); return QDF_STATUS_E_FAILURE; } @@ -6141,27 +6003,26 @@ QDF_STATUS sme_scan_get_bkid_candidate_list(tHalHandle hHal, uint32_t sessionId, QDF_STATUS sme_oem_data_req(tHalHandle hal, struct oem_data_req *hdd_oem_req) { QDF_STATUS status = QDF_STATUS_SUCCESS; - tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); struct oem_data_req *oem_data_req; void *wma_handle; - sms_log(mac_ctx, LOGD, FL("enter")); + SME_ENTER(); wma_handle = cds_get_context(QDF_MODULE_ID_WMA); if (!wma_handle) { - sms_log(mac_ctx, LOGE, FL("wma_handle is NULL")); + sme_err("wma_handle is NULL"); return QDF_STATUS_E_FAILURE; } oem_data_req = qdf_mem_malloc(sizeof(*oem_data_req)); if (!oem_data_req) { - sms_log(mac_ctx, LOGE, FL("mem alloc failed")); + sme_err("mem alloc failed"); return QDF_STATUS_E_NOMEM; } oem_data_req->data_len = hdd_oem_req->data_len; oem_data_req->data = qdf_mem_malloc(oem_data_req->data_len); if (!oem_data_req->data) { - sms_log(mac_ctx, LOGE, FL("mem alloc failed")); + sme_err("mem alloc failed"); return QDF_STATUS_E_NOMEM; } @@ -6171,18 +6032,17 @@ QDF_STATUS sme_oem_data_req(tHalHandle hal, struct oem_data_req *hdd_oem_req) status = wma_start_oem_data_req(wma_handle, oem_data_req); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, FL("Post oem data request msg fail")); + sme_err("Post oem data request msg fail"); } else { - sms_log(mac_ctx, LOGD, - FL("OEM request(length: %d) sent to WMA"), - oem_data_req->data_len); + sme_debug("OEM request(length: %d) sent to WMA", + oem_data_req->data_len); } if (oem_data_req->data_len) qdf_mem_free(oem_data_req->data); qdf_mem_free(oem_data_req); - sms_log(mac_ctx, LOGD, FL("exit")); + SME_EXIT(); return status; } #endif /*FEATURE_OEM_DATA_SUPPORT */ @@ -6382,7 +6242,6 @@ QDF_STATUS sme_change_mcc_beacon_interval(tHalHandle hHal, uint8_t sessionId) QDF_STATUS status = QDF_STATUS_E_FAILURE; tpAniSirGlobal pMac = PMAC_STRUCT(hHal); - sms_log(pMac, LOGD, FL("Update Beacon PARAMS ")); status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { status = csr_send_chng_mcc_beacon_interval(pMac, sessionId); @@ -6441,7 +6300,7 @@ QDF_STATUS sme_enable_non_arp_broadcast_filter(tHalHandle hal, if (NULL == session) { sme_release_global_lock(&pMac->sme); - sms_log(pMac, LOGE, FL("Session not found ")); + sme_err("Session not found"); return QDF_STATUS_E_FAILURE; } @@ -6474,7 +6333,7 @@ QDF_STATUS sme_enable_non_arp_broadcast_filter(tHalHandle hal, sme_release_global_lock(&pMac->sme); } else { - sms_log(pMac, LOGE, FL("sme_acquire_global_lock failed")); + sme_err("sme_acquire_global_lock failed"); return QDF_STATUS_E_FAILURE; } @@ -6497,7 +6356,7 @@ QDF_STATUS sme_disable_nonarp_broadcast_filter(tHalHandle hal, if (NULL == session) { sme_release_global_lock(&pMac->sme); - sms_log(pMac, LOGE, FL("Session not found ")); + sme_err("Session not found"); return QDF_STATUS_E_FAILURE; } @@ -6530,7 +6389,7 @@ QDF_STATUS sme_disable_nonarp_broadcast_filter(tHalHandle hal, sme_release_global_lock(&pMac->sme); } else { - sms_log(pMac, LOGE, FL("sme_acquire_global_lock failed")); + sme_err("sme_acquire_global_lock failed"); return QDF_STATUS_E_FAILURE; } @@ -6819,15 +6678,14 @@ QDF_STATUS sme_register_p2p_ack_ind_callback(tHalHandle hal, tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); struct sir_sme_p2p_ack_ind_cb_req *msg; QDF_STATUS status = QDF_STATUS_SUCCESS; - sms_log(mac_ctx, LOGD, FL(": ENTER")); + status = sme_acquire_global_lock(&mac_ctx->sme); if (QDF_IS_STATUS_SUCCESS(status)) { msg = qdf_mem_malloc(sizeof(*msg)); if (NULL == msg) { - sms_log(mac_ctx, LOGE, - FL("Failed to allocate memory")); - sme_release_global_lock(&mac_ctx->sme); - return QDF_STATUS_E_NOMEM; + sme_err("Failed to allocate memory"); + sme_release_global_lock(&mac_ctx->sme); + return QDF_STATUS_E_NOMEM; } msg->message_type = eWNI_SME_REGISTER_P2P_ACK_CB; msg->length = sizeof(*msg); @@ -6859,14 +6717,11 @@ QDF_STATUS sme_register_mgmt_frame_ind_callback(tHalHandle hal, struct sir_sme_mgmt_frame_cb_req *msg; QDF_STATUS status = QDF_STATUS_SUCCESS; - sms_log(mac_ctx, LOGD, FL(": ENTER")); - if (QDF_STATUS_SUCCESS == sme_acquire_global_lock(&mac_ctx->sme)) { msg = qdf_mem_malloc(sizeof(*msg)); if (NULL == msg) { - sms_log(mac_ctx, LOGE, - FL("Not able to allocate memory for eWNI_SME_REGISTER_MGMT_FRAME_CB")); + sme_err("Not able to allocate memory"); sme_release_global_lock(&mac_ctx->sme); return QDF_STATUS_E_NOMEM; } @@ -6908,8 +6763,7 @@ QDF_STATUS sme_register_mgmt_frame(tHalHandle hHal, uint8_t sessionId, tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); if (!CSR_IS_SESSION_ANY(sessionId) && !pSession) { - sms_log(pMac, LOGE, FL(" session %d not found "), - sessionId); + sme_err("Session %d not found", sessionId); sme_release_global_lock(&pMac->sme); return QDF_STATUS_E_FAILURE; } @@ -6969,8 +6823,7 @@ QDF_STATUS sme_deregister_mgmt_frame(tHalHandle hHal, uint8_t sessionId, tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); if (!CSR_IS_SESSION_ANY(sessionId) && !pSession) { - sms_log(pMac, LOGE, FL(" session %d not found "), - sessionId); + sme_err("Session %d not found", sessionId); sme_release_global_lock(&pMac->sme); return QDF_STATUS_E_FAILURE; } @@ -7034,7 +6887,7 @@ QDF_STATUS sme_remain_on_channel(tHalHandle hHal, uint8_t session_id, scan_count = csr_ll_count(&mac_ctx->sme.smeScanCmdActiveList); if (scan_count >= mac_ctx->scan.max_scan_count) { - sms_log(mac_ctx, LOGE, FL("Max scan reached")); + sme_err("Max scan reached"); return QDF_STATUS_E_FAILURE; } @@ -7042,11 +6895,9 @@ QDF_STATUS sme_remain_on_channel(tHalHandle hHal, uint8_t session_id, *scan_id = san_req_id; status = sme_acquire_global_lock(&mac_ctx->sme); - sms_log(mac_ctx, LOGD, FL(" called")); roc_msg = qdf_mem_malloc(sizeof(struct ani_roc_req)); if (NULL == roc_msg) { - sms_log(mac_ctx, LOGE, - " scan_req: failed to allocate mem for msg"); + sme_err("scan_req: failed to allocate mem for msg"); sme_release_global_lock(&mac_ctx->sme); return QDF_STATUS_E_NOMEM; } @@ -7065,8 +6916,7 @@ QDF_STATUS sme_remain_on_channel(tHalHandle hHal, uint8_t session_id, msg.bodyval = 0; if (QDF_STATUS_SUCCESS != cds_mq_post_message(CDS_MQ_ID_SME, &msg)) { - sms_log(mac_ctx, LOGE, - " sme_scan_req failed to post msg"); + sme_err("sme_scan_req failed to post msg"); qdf_mem_free(roc_msg); status = QDF_STATUS_E_FAILURE; } @@ -7099,8 +6949,6 @@ QDF_STATUS sme_report_probe_req(tHalHandle hHal, uint8_t flag) } } while (0); - sms_log(pMac, LOGW, "exiting function %s", __func__); - return status; } @@ -7130,8 +6978,7 @@ QDF_STATUS sme_update_p2p_ie(tHalHandle hHal, void *p2pIe, uint32_t p2pIeLength) pMac->p2pContext.probeRspIe = qdf_mem_malloc(p2pIeLength); if (NULL == pMac->p2pContext.probeRspIe) { - sms_log(pMac, LOGE, "%s: Unable to allocate P2P IE", - __func__); + sme_err("Unable to allocate P2P IE"); pMac->p2pContext.probeRspIeLength = 0; status = QDF_STATUS_E_NOMEM; } else { @@ -7144,8 +6991,6 @@ QDF_STATUS sme_update_p2p_ie(tHalHandle hHal, void *p2pIe, uint32_t p2pIeLength) sme_release_global_lock(&pMac->sme); } - sms_log(pMac, LOGD, "exiting function %s", __func__); - return status; } #endif @@ -7633,7 +7478,7 @@ QDF_STATUS sme_preferred_network_found_ind(tHalHandle hHal, void *pMsg) uint8_t ssIdLength = 0; if (NULL == pMsg) { - sms_log(pMac, LOGE, "in %s msg ptr is NULL", __func__); + sme_err("msg ptr is NULL"); return QDF_STATUS_E_FAILURE; } @@ -7653,8 +7498,8 @@ QDF_STATUS sme_preferred_network_found_ind(tHalHandle hHal, void *pMsg) qdf_mem_copy(dumpSsId, pPrefNetworkFoundInd->ssId.ssId, ssIdLength); dumpSsId[ssIdLength] = 0; - sms_log(pMac, LOGD, "%s:SSID=%s frame length %d", - __func__, dumpSsId, pPrefNetworkFoundInd->frameLength); + sme_debug("SSID: %s frame length: %d", + dumpSsId, pPrefNetworkFoundInd->frameLength); /* Flush scan results, So as to avoid indication/updation of * stale entries, which may not have aged out during APPS collapse @@ -7668,12 +7513,10 @@ QDF_STATUS sme_preferred_network_found_ind(tHalHandle hHal, void *pMsg) status = csr_scan_save_preferred_network_found(pMac, pPrefNetworkFoundInd); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL(" fail to save preferred network")); + sme_err("fail to save preferred network"); } } else { - sms_log(pMac, LOGE, - FL(" not enough data length %d needed %zu"), + sme_err("not enough data length %d needed %zu", pPrefNetworkFoundInd->mesgLen, sizeof(tSirPrefNetworkFoundInd)); } @@ -7686,8 +7529,7 @@ QDF_STATUS sme_preferred_network_found_ind(tHalHandle hHal, void *pMsg) pPrefNetworkFoundInd); } } else { - sms_log(pMac, LOGE, "%s: callback failed - SSID is NULL", - __func__); + sme_err("callback failed - SSID is NULL"); status = QDF_STATUS_E_FAILURE; } @@ -7770,7 +7612,7 @@ QDF_STATUS sme_set_tsf_gpio(tHalHandle h_hal, uint32_t pinvalue) status = cds_mq_post_message(CDS_MQ_ID_WMA, &tsf_msg); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, "Unable to post WMA_TSF_GPIO_PIN"); + sme_err("Unable to post WMA_TSF_GPIO_PIN"); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&mac->sme); @@ -7855,8 +7697,8 @@ QDF_STATUS sme_handle_change_country_code(tpAniSirGlobal pMac, void *pMsgBuf) * callback is received for this default country, driver will * not disable the 11d taking it as valid country by user. */ - sms_log(pMac, LOGD, - FL("Set default country code (%c%c) as invalid country received"), + sme_debug( + "Set default country code (%c%c) as invalid country received", pMsg->countryCode[0], pMsg->countryCode[1]); qdf_mem_copy(pMac->scan.countryCode11d, pMsg->countryCode, @@ -7878,7 +7720,7 @@ QDF_STATUS sme_handle_change_country_code(tpAniSirGlobal pMac, void *pMsgBuf) /* Supplicant country code failed. So give 11D priority */ pMac->roam.configParam.Is11dSupportEnabled = pMac->roam.configParam.Is11dSupportEnabledOriginal; - sms_log(pMac, LOGE, "Set Country Code Fail %d", status); + sme_err("Set Country Code Fail %d", status); return status; } @@ -7893,28 +7735,26 @@ QDF_STATUS sme_handle_change_country_code(tpAniSirGlobal pMac, void *pMsgBuf) domainIdIoctl, SOURCE_QUERY); if (status != QDF_STATUS_SUCCESS) { - sms_log(pMac, LOGE, FL(" fail to get regId %d"), domainIdIoctl); + sme_err("Fail to get regId %d", domainIdIoctl); return status; } else if (REGDOMAIN_WORLD == domainIdIoctl) { /* Supplicant country code is invalid, so we are on world mode now. So give 11D chance to update */ pMac->roam.configParam.Is11dSupportEnabled = pMac->roam.configParam.Is11dSupportEnabledOriginal; - sms_log(pMac, LOGD, FL("Country Code unrecognized by driver")); + sme_warn("Country Code unrecognized by driver"); } status = wma_set_reg_domain(pMac, domainIdIoctl); if (status != QDF_STATUS_SUCCESS) { - sms_log(pMac, LOGE, FL(" fail to set regId %d"), domainIdIoctl); + sme_err("fail to set regId %d", domainIdIoctl); return status; } else { /* if 11d has priority, clear currentCountryBssid & countryCode11d to get */ /* set again if we find AP with 11d info during scan */ if (!pMac->roam.configParam.fSupplicantCountryCodeHasPriority) { - sms_log(pMac, LOGW, - FL - ("Clearing currentCountryBssid, countryCode11d")); + sme_warn("Clearing currentCountryBssid, countryCode11d"); qdf_mem_zero(&pMac->scan.currentCountryBssid, sizeof(struct qdf_mac_addr)); qdf_mem_zero(pMac->scan.countryCode11d, @@ -7953,8 +7793,6 @@ sme_handle_generic_change_country_code(tpAniSirGlobal mac_ctx, mac_ctx->roam.configParam.fSupplicantCountryCodeHasPriority; tAniGenericChangeCountryCodeReq *msg = pMsgBuf; - sms_log(mac_ctx, LOGD, FL(" called")); - if (SOURCE_11D != mac_ctx->reg_hint_src) { if (SOURCE_DRIVER != mac_ctx->reg_hint_src) { if (user_ctry_priority) @@ -7964,8 +7802,7 @@ sme_handle_generic_change_country_code(tpAniSirGlobal mac_ctx, if (mac_ctx->roam.configParam.Is11dSupportEnabled && mac_ctx->scan.countryCode11d[0] != 0) { - sms_log(mac_ctx, LOGW, - FL("restore 11d")); + sme_debug("restore 11d"); status = csr_get_regulatory_domain_for_country( mac_ctx, @@ -7995,7 +7832,7 @@ sme_handle_generic_change_country_code(tpAniSirGlobal mac_ctx, status = csr_get_channel_and_power_list(mac_ctx); if (status != QDF_STATUS_SUCCESS) { - sms_log(mac_ctx, LOGE, FL("fail to get Channels")); + sme_err("fail to get Channels"); return status; } @@ -8013,7 +7850,6 @@ sme_handle_generic_change_country_code(tpAniSirGlobal mac_ctx, sme_disconnect_connected_sessions(mac_ctx); - sms_log(mac_ctx, LOGD, FL(" returned")); return QDF_STATUS_SUCCESS; } @@ -8052,13 +7888,11 @@ void sme_disconnect_connected_sessions(tpAniSirGlobal mac_ctx) /* Session is connected.Check the channel */ curr_ch = csr_get_infra_operation_channel(mac_ctx, session_id); - sms_log(mac_ctx, LOGW, - FL("Current Operating channel : %d, session :%d"), - curr_ch, session_id); + sme_debug("Current Operating channel : %d, session :%d", + curr_ch, session_id); found = sme_search_in_base_ch_lst(mac_ctx, curr_ch); if (!found) { - sms_log(mac_ctx, LOGW, FL("Disconnect Session :%d"), - session_id); + sme_debug("Disconnect Session: %d", session_id); csr_roam_disconnect(mac_ctx, session_id, eCSR_DISCONNECT_REASON_UNSPECIFIED); } @@ -8553,8 +8387,7 @@ QDF_STATUS sme_update_session_param(tHalHandle hal, uint8_t session_id, tCsrRoamSession *session = CSR_GET_SESSION(mac_ctx, session_id); if (!session) { - sms_log(mac_ctx, LOGE, FL("session %d not found"), - session_id); + sme_err("Session: %d not found", session_id); sme_release_global_lock(&mac_ctx->sme); return status; } @@ -8831,12 +8664,12 @@ QDF_STATUS sme_ext_change_channel(tHalHandle h_hal, uint32_t channel, tpAniSirGlobal mac_ctx = PMAC_STRUCT(h_hal); uint8_t channel_state; - sms_log(mac_ctx, LOGE, FL(" Set Channel %d "), channel); + sme_err("Set Channel: %d", channel); channel_state = cds_get_channel_state(channel); if (CHANNEL_STATE_DISABLE == channel_state) { - sms_log(mac_ctx, LOGE, FL(" Invalid channel %d "), channel); + sme_err("Invalid channel: %d", channel); return QDF_STATUS_E_INVAL; } @@ -9139,7 +8972,7 @@ QDF_STATUS sme_config_fast_roaming(tHalHandle hal, uint8_t session_id, session->pCurRoamProfile->do_not_roam = !is_fast_roam_enabled; if (!mac_ctx->roam.configParam.isFastRoamIniFeatureEnabled) { - sms_log(mac_ctx, LOGE, FL("Fast roam is disabled through ini")); + sme_debug("Fast roam is disabled through ini"); if (!is_fast_roam_enabled) return QDF_STATUS_SUCCESS; return QDF_STATUS_E_FAILURE; @@ -9148,8 +8981,7 @@ QDF_STATUS sme_config_fast_roaming(tHalHandle hal, uint8_t session_id, status = csr_neighbor_roam_update_fast_roaming_enabled(mac_ctx, session_id, is_fast_roam_enabled); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("csr_neighbor_roam_update_fast_roaming_enabled failed")); + sme_err("update fast roaming failed. status: %d", status); return QDF_STATUS_E_FAILURE; } @@ -11099,11 +10931,11 @@ sme_add_periodic_tx_ptrn(tHalHandle hal, struct sSirAddPeriodicTxPtrn *req_msg; cds_msg_t msg; - sms_log(mac, LOGD, FL("enter")); + SME_ENTER(); req_msg = qdf_mem_malloc(sizeof(*req_msg)); if (!req_msg) { - sms_log(mac, LOGE, FL("memory allocation failed")); + sme_err("memory allocation failed"); return QDF_STATUS_E_NOMEM; } @@ -11111,8 +10943,7 @@ sme_add_periodic_tx_ptrn(tHalHandle hal, status = sme_acquire_global_lock(&mac->sme); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("sme_acquire_global_lock failed!(status=%d)"), + sme_err("sme_acquire_global_lock failed!(status=%d)", status); qdf_mem_free(req_msg); return status; @@ -11125,8 +10956,7 @@ sme_add_periodic_tx_ptrn(tHalHandle hal, NO_SESSION, msg.type)); status = cds_mq_post_message(QDF_MODULE_ID_WMA, &msg); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("cds_mq_post_message failed!(err=%d)"), + sme_err("cds_mq_post_message failed!(err=%d)", status); qdf_mem_free(req_msg); } @@ -11150,11 +10980,11 @@ sme_del_periodic_tx_ptrn(tHalHandle hal, struct sSirDelPeriodicTxPtrn *req_msg; cds_msg_t msg; - sms_log(mac, LOGD, FL("enter")); + SME_ENTER(); req_msg = qdf_mem_malloc(sizeof(*req_msg)); if (!req_msg) { - sms_log(mac, LOGE, FL("memory allocation failed")); + sme_err("memory allocation failed"); return QDF_STATUS_E_NOMEM; } @@ -11162,8 +10992,7 @@ sme_del_periodic_tx_ptrn(tHalHandle hal, status = sme_acquire_global_lock(&mac->sme); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("sme_acquire_global_lock failed!(status=%d)"), + sme_err("sme_acquire_global_lock failed!(status=%d)", status); qdf_mem_free(req_msg); return status; @@ -11176,8 +11005,7 @@ sme_del_periodic_tx_ptrn(tHalHandle hal, NO_SESSION, msg.type)); status = cds_mq_post_message(QDF_MODULE_ID_WMA, &msg); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("cds_mq_post_message failed!(err=%d)"), + sme_err("cds_mq_post_message failed!(err=%d)", status); qdf_mem_free(req_msg); } @@ -11199,7 +11027,8 @@ QDF_STATUS sme_enable_rmc(tHalHandle hHal, uint32_t sessionId) cds_msg_t cds_message; QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; - sms_log(pMac, LOGD, FL("enable RMC")); + SME_ENTER(); + status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { cds_message.bodyptr = NULL; @@ -11230,7 +11059,8 @@ QDF_STATUS sme_disable_rmc(tHalHandle hHal, uint32_t sessionId) cds_msg_t cds_message; QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; - sms_log(pMac, LOGD, FL("disable RMC")); + SME_ENTER(); + status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { cds_message.bodyptr = NULL; @@ -11380,7 +11210,7 @@ void sme_get_command_q_status(tHalHandle hHal) if (pEntry) { pTempCmd = GET_BASE_ADDR(pEntry, tSmeCmd, Link); } - sms_log(pMac, LOGE, "Currently smeCmdActiveList has command (0x%X)", + sme_err("Currently smeCmdActiveList has command (0x%X)", (pTempCmd) ? pTempCmd->command : eSmeNoCommand); if (pTempCmd) { if (eSmeCsrCommandMask & pTempCmd->command) { @@ -11389,10 +11219,10 @@ void sme_get_command_q_status(tHalHandle hHal) } } /* if(pTempCmd) */ - sms_log(pMac, LOGE, "Currently smeCmdPendingList has %d commands", + sme_err("Currently smeCmdPendingList has %d commands", csr_ll_count(&pMac->sme.smeCmdPendingList)); - sms_log(pMac, LOGE, "Currently roamCmdPendingList has %d commands", + sme_err("Currently roamCmdPendingList has %d commands", csr_ll_count(&pMac->roam.roamCmdPendingList)); return; @@ -12077,9 +11907,8 @@ void active_list_cmd_timeout_handle(void *userData) */ if (0 == csr_ll_count(&mac_ctx->sme.smeCmdActiveList)) return; - sms_log(mac_ctx, LOGE, - FL("Active List command timeout Cmd List Count %d"), - csr_ll_count(&mac_ctx->sme.smeCmdActiveList)); + sme_err("Active List command timeout Cmd List Count: %d", + csr_ll_count(&mac_ctx->sme.smeCmdActiveList)); sme_get_command_q_status(hal); if (mac_ctx->roam.configParam.enable_fatal_event) @@ -12423,14 +12252,12 @@ QDF_STATUS sme_update_access_policy_vendor_ie(tHalHandle hal, struct sme_update_access_policy_vendor_ie *msg; uint16_t msg_len; QDF_STATUS status = QDF_STATUS_E_FAILURE; - tpAniSirGlobal mac = PMAC_STRUCT(hal); msg_len = sizeof(*msg); msg = qdf_mem_malloc(msg_len); if (!msg) { - sms_log(mac, LOGE, - "failed to allocate memory for sme_update_access_policy_vendor_ie"); + sme_err("failed to allocate memory for sme_update_access_policy_vendor_ie"); return QDF_STATUS_E_FAILURE; } @@ -12442,8 +12269,8 @@ QDF_STATUS sme_update_access_policy_vendor_ie(tHalHandle hal, msg->sme_session_id = session_id; msg->access_policy = access_policy; - sms_log(mac, LOGD, "sme_session_id %hu, access_policy %d", session_id, - access_policy); + sme_debug("sme_session_id: %hu, access_policy: %d", session_id, + access_policy); status = cds_send_mb_message_to_mac(msg); @@ -12464,7 +12291,6 @@ QDF_STATUS sme_update_access_policy_vendor_ie(tHalHandle hal, QDF_STATUS sme_update_short_retry_limit_threshold(tHalHandle hal_handle, struct sme_short_retry_limit *short_retry_limit_th) { - tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_handle); QDF_STATUS status = QDF_STATUS_SUCCESS; struct sme_short_retry_limit *srl; cds_msg_t msg; @@ -12475,7 +12301,7 @@ QDF_STATUS sme_update_short_retry_limit_threshold(tHalHandle hal_handle, "%s: fail to alloc short retry limit", __func__); return QDF_STATUS_E_FAILURE; } - sms_log(mac_ctx, LOGD, FL("session_id %d short retry limit count: %d"), + sme_debug("session_id %d short retry limit count: %d", short_retry_limit_th->session_id, short_retry_limit_th->short_retry_limit); @@ -12511,7 +12337,6 @@ QDF_STATUS sme_update_short_retry_limit_threshold(tHalHandle hal_handle, QDF_STATUS sme_update_long_retry_limit_threshold(tHalHandle hal_handle, struct sme_long_retry_limit *long_retry_limit_th) { - tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_handle); QDF_STATUS status = QDF_STATUS_SUCCESS; struct sme_long_retry_limit *lrl; cds_msg_t msg; @@ -12522,7 +12347,7 @@ QDF_STATUS sme_update_long_retry_limit_threshold(tHalHandle hal_handle, "%s: fail to alloc long retry limit", __func__); return QDF_STATUS_E_FAILURE; } - sms_log(mac_ctx, LOGD, FL("session_id %d long retry limit count: %d"), + sme_debug("session_id %d long retry limit count: %d", long_retry_limit_th->session_id, long_retry_limit_th->long_retry_limit); @@ -12911,8 +12736,7 @@ QDF_STATUS sme_process_channel_change_resp(tpAniSirGlobal pMac, qdf_mem_malloc(sizeof(tSirChanChangeResponse)); if (NULL == proam_info.channelChangeRespEvent) { status = QDF_STATUS_E_NOMEM; - sms_log(pMac, LOGE, - "Channel Change Event Allocation Failed: %d\n", status); + sme_err("Channel Change Event Allocation Failed: %d\n", status); return status; } if (msg_type == eWNI_SME_CHANNEL_CHANGE_RSP) { @@ -12943,7 +12767,7 @@ QDF_STATUS sme_process_channel_change_resp(tpAniSirGlobal pMac, } else { status = QDF_STATUS_E_FAILURE; - sms_log(pMac, LOGE, "Invalid Channel Change Resp Message: %d\n", + sme_err("Invalid Channel Change Resp Message: %d", status); } qdf_mem_free(proam_info.channelChangeRespEvent); @@ -13197,7 +13021,7 @@ QDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId, /* Prepare the request to send to SME. */ pSapDisableIntraFwd = qdf_mem_malloc(sizeof(tDisableIntraBssFwd)); if (NULL == pSapDisableIntraFwd) { - sms_log(pMac, LOGE, "Memory Allocation Failure!!! %s", __func__); + sme_err("Memory Allocation Failure!!!"); return QDF_STATUS_E_NOMEM; } @@ -13324,11 +13148,9 @@ QDF_STATUS sme_stats_ext_event(tHalHandle hHal, void *pMsg) QDF_STATUS status = QDF_STATUS_SUCCESS; if (NULL == pMsg) { - sms_log(pMac, LOGE, "in %s msg ptr is NULL", __func__); + sme_err("pMsg is NULL in sme_stats_ext_event"); status = QDF_STATUS_E_FAILURE; } else { - sms_log(pMac, LOGD, "SME: entering %s", __func__); - if (pMac->sme.StatsExtCallback) { pMac->sme.StatsExtCallback(pMac->hHdd, (tpStatsExtEvent) pMsg); @@ -13538,7 +13360,6 @@ QDF_STATUS sme_abort_roam_scan(tHalHandle hHal, uint8_t sessionId) QDF_STATUS status = QDF_STATUS_SUCCESS; tpAniSirGlobal pMac = PMAC_STRUCT(hHal); - sms_log(pMac, LOGW, "entering function %s", __func__); if (pMac->roam.configParam.isRoamOffloadScanEnabled) { /* acquire the lock for the sme object */ status = sme_acquire_global_lock(&pMac->sme); @@ -13573,36 +13394,31 @@ QDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, { QDF_STATUS status = QDF_STATUS_SUCCESS; uint8_t chanList[WNI_CFG_VALID_CHANNEL_LIST_LEN] = { 0 }; - tpAniSirGlobal pMac = PMAC_STRUCT(hHal); uint8_t numChannels = 0; uint8_t i = 0; uint32_t totValidChannels = WNI_CFG_VALID_CHANNEL_LIST_LEN; if (!aValidChannels || !pNumChannels) { - sms_log(pMac, QDF_TRACE_LEVEL_ERROR, - FL("Output channel list/NumChannels is NULL")); + sme_err("Output channel list/NumChannels is NULL"); return QDF_STATUS_E_INVAL; } if ((wifiBand < WIFI_BAND_UNSPECIFIED) || (wifiBand >= WIFI_BAND_MAX)) { - sms_log(pMac, QDF_TRACE_LEVEL_ERROR, - FL("Invalid wifiBand (%d)"), wifiBand); + sme_err("Invalid wifiBand: %d", wifiBand); return QDF_STATUS_E_INVAL; } status = sme_get_cfg_valid_channels(hHal, &chanList[0], &totValidChannels); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, QDF_TRACE_LEVEL_ERROR, - FL("Fail to get valid channel list (err=%d)"), status); + sme_err("Fail to get valid channel list (err=%d)", status); return status; } switch (wifiBand) { case WIFI_BAND_UNSPECIFIED: - sms_log(pMac, QDF_TRACE_LEVEL_DEBUG, - FL("Unspec Band, return all (%d) valid channels"), - totValidChannels); + sme_debug("Unspec Band, return all %d valid channels", + totValidChannels); numChannels = totValidChannels; for (i = 0; i < totValidChannels; i++) { aValidChannels[i] = cds_chan_to_freq(chanList[i]); @@ -13610,8 +13426,7 @@ QDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, break; case WIFI_BAND_BG: - sms_log(pMac, QDF_TRACE_LEVEL_DEBUG, - FL("WIFI_BAND_BG (2.4 GHz)")); + sme_debug("WIFI_BAND_BG (2.4 GHz)"); for (i = 0; i < totValidChannels; i++) { if (CDS_IS_CHANNEL_24GHZ(chanList[i])) { aValidChannels[numChannels++] = @@ -13621,8 +13436,7 @@ QDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, break; case WIFI_BAND_A: - sms_log(pMac, QDF_TRACE_LEVEL_DEBUG, - FL("WIFI_BAND_A (5 GHz without DFS)")); + sme_debug("WIFI_BAND_A (5 GHz without DFS)"); for (i = 0; i < totValidChannels; i++) { if (CDS_IS_CHANNEL_5GHZ(chanList[i]) && !CDS_IS_DFS_CH(chanList[i])) { @@ -13633,8 +13447,7 @@ QDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, break; case WIFI_BAND_ABG: - sms_log(pMac, QDF_TRACE_LEVEL_DEBUG, - FL("WIFI_BAND_ABG (2.4 GHz + 5 GHz; no DFS)")); + sme_debug("WIFI_BAND_ABG (2.4 GHz + 5 GHz; no DFS)"); for (i = 0; i < totValidChannels; i++) { if ((CDS_IS_CHANNEL_24GHZ(chanList[i]) || CDS_IS_CHANNEL_5GHZ(chanList[i])) && @@ -13646,8 +13459,7 @@ QDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, break; case WIFI_BAND_A_DFS_ONLY: - sms_log(pMac, QDF_TRACE_LEVEL_DEBUG, - FL("WIFI_BAND_A_DFS (5 GHz DFS only)")); + sme_debug("WIFI_BAND_A_DFS (5 GHz DFS only)"); for (i = 0; i < totValidChannels; i++) { if (CDS_IS_CHANNEL_5GHZ(chanList[i]) && CDS_IS_DFS_CH(chanList[i])) { @@ -13658,8 +13470,7 @@ QDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, break; case WIFI_BAND_A_WITH_DFS: - sms_log(pMac, QDF_TRACE_LEVEL_DEBUG, - FL("WIFI_BAND_A_WITH_DFS (5 GHz with DFS)")); + sme_debug("WIFI_BAND_A_WITH_DFS (5 GHz with DFS)"); for (i = 0; i < totValidChannels; i++) { if (CDS_IS_CHANNEL_5GHZ(chanList[i])) { aValidChannels[numChannels++] = @@ -13669,8 +13480,7 @@ QDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, break; case WIFI_BAND_ABG_WITH_DFS: - sms_log(pMac, QDF_TRACE_LEVEL_DEBUG, - FL("WIFI_BAND_ABG_WITH_DFS (2.4 GHz+5 GHz with DFS)")); + sme_debug("WIFI_BAND_ABG_WITH_DFS (2.4 GHz+5 GHz with DFS)"); for (i = 0; i < totValidChannels; i++) { if (CDS_IS_CHANNEL_24GHZ(chanList[i]) || CDS_IS_CHANNEL_5GHZ(chanList[i])) { @@ -13681,8 +13491,7 @@ QDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, break; default: - sms_log(pMac, QDF_TRACE_LEVEL_ERROR, - FL("Unknown wifiBand (%d))"), wifiBand); + sme_err("Unknown wifiBand: %d", wifiBand); return QDF_STATUS_E_INVAL; break; } @@ -13995,13 +13804,13 @@ QDF_STATUS sme_set_epno_list(tHalHandle hal, struct wifi_epno_params *req_msg; int len, i; - sms_log(mac, LOGD, FL("enter")); + SME_ENTER(); len = sizeof(*req_msg) + (input->num_networks * sizeof(struct wifi_epno_network)); req_msg = qdf_mem_malloc(len); if (!req_msg) { - sms_log(mac, LOGE, FL("qdf_mem_malloc failed")); + sme_err("qdf_mem_malloc failed"); return QDF_STATUS_E_NOMEM; } @@ -14034,8 +13843,7 @@ QDF_STATUS sme_set_epno_list(tHalHandle hal, status = sme_acquire_global_lock(&mac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("sme_acquire_global_lock failed!(status=%d)"), + sme_err("sme_acquire_global_lock failed!(status=%d)", status); qdf_mem_free(req_msg); return status; @@ -14046,8 +13854,7 @@ QDF_STATUS sme_set_epno_list(tHalHandle hal, cds_message.type = WMA_SET_EPNO_LIST_REQ; status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("cds_mq_post_message failed!(err=%d)"), + sme_err("cds_mq_post_message failed!(err=%d)", status); qdf_mem_free(req_msg); status = QDF_STATUS_E_FAILURE; @@ -14075,12 +13882,12 @@ QDF_STATUS sme_set_passpoint_list(tHalHandle hal, struct wifi_passpoint_req *req_msg; int len, i; - sms_log(mac, LOGD, FL("enter")); + SME_ENTER(); len = sizeof(*req_msg) + (input->num_networks * sizeof(struct wifi_passpoint_network)); req_msg = qdf_mem_malloc(len); if (!req_msg) { - sms_log(mac, LOGE, FL("qdf_mem_malloc failed")); + sme_err("qdf_mem_malloc failed"); return QDF_STATUS_E_NOMEM; } @@ -14103,8 +13910,7 @@ QDF_STATUS sme_set_passpoint_list(tHalHandle hal, status = sme_acquire_global_lock(&mac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("sme_acquire_global_lock failed!(status=%d)"), + sme_err("sme_acquire_global_lock failed!(status=%d)", status); qdf_mem_free(req_msg); return status; @@ -14115,8 +13921,7 @@ QDF_STATUS sme_set_passpoint_list(tHalHandle hal, cds_message.type = WMA_SET_PASSPOINT_LIST_REQ; status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("cds_mq_post_message failed!(err=%d)"), + sme_err("cds_mq_post_message failed!(err=%d)", status); qdf_mem_free(req_msg); status = QDF_STATUS_E_FAILURE; @@ -14140,10 +13945,10 @@ QDF_STATUS sme_reset_passpoint_list(tHalHandle hal, cds_msg_t cds_message; struct wifi_passpoint_req *req_msg; - sms_log(mac, LOGD, FL("enter")); + SME_ENTER(); req_msg = qdf_mem_malloc(sizeof(*req_msg)); if (!req_msg) { - sms_log(mac, LOGE, FL("qdf_mem_malloc failed")); + sme_err("qdf_mem_malloc failed"); return QDF_STATUS_E_NOMEM; } @@ -14152,8 +13957,7 @@ QDF_STATUS sme_reset_passpoint_list(tHalHandle hal, status = sme_acquire_global_lock(&mac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("sme_acquire_global_lock failed!(status=%d)"), + sme_err("sme_acquire_global_lock failed!(status=%d)", status); qdf_mem_free(req_msg); return status; @@ -14164,8 +13968,7 @@ QDF_STATUS sme_reset_passpoint_list(tHalHandle hal, cds_message.type = WMA_RESET_PASSPOINT_LIST_REQ; status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("cds_mq_post_message failed!(err=%d)"), + sme_err("cds_mq_post_message failed!(err=%d)", status); qdf_mem_free(req_msg); status = QDF_STATUS_E_FAILURE; @@ -14473,8 +14276,7 @@ QDF_STATUS sme_power_debug_stats_req(tHalHandle hal, void (*callback_fn) status = sme_acquire_global_lock(&mac_ctx->sme); if (QDF_IS_STATUS_SUCCESS(status)) { if (!callback_fn) { - sms_log(mac_ctx, LOGE, - FL("Indication callback did not registered")); + sme_err("Indication callback did not registered"); sme_release_global_lock(&mac_ctx->sme); return QDF_STATUS_E_FAILURE; } @@ -14485,8 +14287,7 @@ QDF_STATUS sme_power_debug_stats_req(tHalHandle hal, void (*callback_fn) msg.type = WMA_POWER_DEBUG_STATS_REQ; status = cds_mq_post_message(QDF_MODULE_ID_WMA, &msg); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("not able to post WDA_POWER_DEBUG_STATS_REQ")); + sme_err("not able to post WDA_POWER_DEBUG_STATS_REQ"); } sme_release_global_lock(&mac_ctx->sme); } @@ -15067,7 +14868,7 @@ QDF_STATUS sme_wifi_start_logger(tHalHandle hal, len = sizeof(*req_msg); req_msg = qdf_mem_malloc(len); if (!req_msg) { - sms_log(mac, LOGE, FL("qdf_mem_malloc failed")); + sme_err("qdf_mem_malloc failed"); return QDF_STATUS_E_NOMEM; } @@ -15081,9 +14882,7 @@ QDF_STATUS sme_wifi_start_logger(tHalHandle hal, status = sme_acquire_global_lock(&mac->sme); if (status != QDF_STATUS_SUCCESS) { - sms_log(mac, LOGE, - FL("sme_acquire_global_lock failed(status=%d)"), - status); + sme_err("sme_acquire_global_lock failed(status=%d)", status); qdf_mem_free(req_msg); return status; } @@ -15093,9 +14892,7 @@ QDF_STATUS sme_wifi_start_logger(tHalHandle hal, cds_message.type = SIR_HAL_START_STOP_LOGGING; status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("cds_mq_post_message failed!(err=%d)"), - status); + sme_err("cds_mq_post_message failed!(err=%d)", status); qdf_mem_free(req_msg); status = QDF_STATUS_E_FAILURE; } @@ -15125,7 +14922,8 @@ bool sme_neighbor_middle_of_roaming(tHalHandle hHal, uint8_t sessionId) if (CSR_IS_SESSION_VALID(mac_ctx, sessionId)) val = csr_neighbor_middle_of_roaming(mac_ctx, sessionId); else - sms_log(mac_ctx, LOGE, FL("Invalid Sesion = %d"), sessionId); + sme_err("Invalid Session: %d", sessionId); + return val; } @@ -15148,9 +14946,7 @@ QDF_STATUS sme_send_flush_logs_cmd_to_fw(tpAniSirGlobal mac) message.type = SIR_HAL_FLUSH_LOG_TO_FW; status = cds_mq_post_message(CDS_MQ_ID_WMA, &message); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("cds_mq_post_message failed!(err=%d)"), - status); + sme_err("cds_mq_post_message failed!(err=%d)", status); status = QDF_STATUS_E_FAILURE; } return status; @@ -15422,9 +15218,7 @@ QDF_STATUS sme_reset_rssi_threshold_breached_cb(tHalHandle hal) status = sme_acquire_global_lock(&mac->sme); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("sme_acquire_global_lock failed!(status=%d)"), - status); + sme_err("sme_acquire_global_lock failed!(status=%d)", status); return status; } @@ -15477,10 +15271,10 @@ QDF_STATUS sme_set_rssi_monitoring(tHalHandle hal, cds_msg_t cds_message; struct rssi_monitor_req *req_msg; - sms_log(mac, LOGD, FL("enter")); + SME_ENTER(); req_msg = qdf_mem_malloc(sizeof(*req_msg)); if (!req_msg) { - sms_log(mac, LOGE, FL("memory allocation failed")); + sme_err("memory allocation failed"); return QDF_STATUS_E_NOMEM; } @@ -15488,9 +15282,7 @@ QDF_STATUS sme_set_rssi_monitoring(tHalHandle hal, status = sme_acquire_global_lock(&mac->sme); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("sme_acquire_global_lock failed!(status=%d)"), - status); + sme_err("sme_acquire_global_lock failed!(status=%d)", status); qdf_mem_free(req_msg); return status; } @@ -15500,9 +15292,7 @@ QDF_STATUS sme_set_rssi_monitoring(tHalHandle hal, cds_message.type = WMA_SET_RSSI_MONITOR_REQ; status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("cds_mq_post_message failed!(err=%d)"), - status); + sme_err("cds_mq_post_message failed!(err=%d)", status); qdf_mem_free(req_msg); } sme_release_global_lock(&mac->sme); @@ -15608,7 +15398,7 @@ QDF_STATUS sme_pdev_set_pcl(tHalHandle hal, req_msg = qdf_mem_malloc(len); if (!req_msg) { - sms_log(mac, LOGE, FL("qdf_mem_malloc failed")); + sme_err("qdf_mem_malloc failed"); return QDF_STATUS_E_NOMEM; } @@ -15621,9 +15411,7 @@ QDF_STATUS sme_pdev_set_pcl(tHalHandle hal, status = sme_acquire_global_lock(&mac->sme); if (status != QDF_STATUS_SUCCESS) { - sms_log(mac, LOGE, - FL("sme_acquire_global_lock failed!(status=%d)"), - status); + sme_err("sme_acquire_global_lock failed!(status=%d)", status); qdf_mem_free(req_msg); return status; } @@ -15633,9 +15421,7 @@ QDF_STATUS sme_pdev_set_pcl(tHalHandle hal, cds_message.type = SIR_HAL_PDEV_SET_PCL_TO_FW; status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, - FL("cds_mq_post_message failed!(err=%d)"), - status); + sme_err("cds_mq_post_message failed!(err=%d)", status); qdf_mem_free(req_msg); status = QDF_STATUS_E_FAILURE; } @@ -15661,13 +15447,13 @@ QDF_STATUS sme_pdev_set_hw_mode(tHalHandle hal, status = sme_acquire_global_lock(&mac->sme); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, FL("Failed to acquire lock")); + sme_err("Failed to acquire lock"); return QDF_STATUS_E_RESOURCES; } cmd = sme_get_command_buffer(mac); if (!cmd) { - sms_log(mac, LOGE, FL("Get command buffer failed")); + sme_err("Get command buffer failed"); sme_release_global_lock(&mac->sme); return QDF_STATUS_E_NULL_VALUE; } @@ -15678,8 +15464,7 @@ QDF_STATUS sme_pdev_set_hw_mode(tHalHandle hal, cmd->u.set_hw_mode_cmd.reason = msg.reason; cmd->u.set_hw_mode_cmd.session_id = msg.session_id; - sms_log(mac, LOGD, - FL("Queuing set hw mode to CSR, session:%d reason:%d"), + sme_debug("Queuing set hw mode to CSR, session: %d reason: %d", cmd->u.set_hw_mode_cmd.session_id, cmd->u.set_hw_mode_cmd.reason); csr_queue_sme_command(mac, cmd, false); @@ -15704,7 +15489,6 @@ void sme_register_hw_mode_trans_cb(tHalHandle hal, tpAniSirGlobal mac = PMAC_STRUCT(hal); mac->sme.sme_hw_mode_trans_cb = callback; - sms_log(mac, LOGD, FL("HW mode transition callback registered")); } /** @@ -15732,7 +15516,7 @@ QDF_STATUS sme_nss_update_request(tHalHandle hHal, uint32_t vdev_id, if (QDF_IS_STATUS_SUCCESS(status)) { cmd = sme_get_command_buffer(mac); if (!cmd) { - sms_log(mac, LOGE, FL("Get command buffer failed")); + sme_err("Get command buffer failed"); sme_release_global_lock(&mac->sme); return QDF_STATUS_E_NULL_VALUE; } @@ -15746,7 +15530,7 @@ QDF_STATUS sme_nss_update_request(tHalHandle hHal, uint32_t vdev_id, cmd->u.nss_update_cmd.next_action = next_action; cmd->u.nss_update_cmd.reason = reason; - sms_log(mac, LOGD, FL("Queuing e_sme_command_nss_update to CSR")); + sme_debug("Queuing e_sme_command_nss_update to CSR"); csr_queue_sme_command(mac, cmd, false); sme_release_global_lock(&mac->sme); } @@ -15772,13 +15556,13 @@ QDF_STATUS sme_soc_set_dual_mac_config(tHalHandle hal, status = sme_acquire_global_lock(&mac->sme); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, FL("Failed to acquire lock")); + sme_err("Failed to acquire lock"); return QDF_STATUS_E_RESOURCES; } cmd = sme_get_command_buffer(mac); if (!cmd) { - sms_log(mac, LOGE, FL("Get command buffer failed")); + sme_err("Get command buffer failed"); sme_release_global_lock(&mac->sme); return QDF_STATUS_E_NULL_VALUE; } @@ -15788,8 +15572,7 @@ QDF_STATUS sme_soc_set_dual_mac_config(tHalHandle hal, cmd->u.set_dual_mac_cmd.fw_mode_config = msg.fw_mode_config; cmd->u.set_dual_mac_cmd.set_dual_mac_cb = msg.set_dual_mac_cb; - sms_log(mac, LOGD, - FL("Queuing e_sme_command_set_dual_mac_config to CSR: %x %x"), + sme_debug("set_dual_mac_config scan_config: %x fw_mode_config: %x", cmd->u.set_dual_mac_cmd.scan_config, cmd->u.set_dual_mac_cmd.fw_mode_config); csr_queue_sme_command(mac, cmd, false); @@ -15857,28 +15640,27 @@ QDF_STATUS sme_soc_set_antenna_mode(tHalHandle hal, tSmeCmd *cmd; if (NULL == msg) { - sms_log(mac, LOGE, FL("antenna mode mesg is NULL")); + sme_err("antenna mode mesg is NULL"); return QDF_STATUS_E_FAILURE; } status = sme_acquire_global_lock(&mac->sme); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, FL("Failed to acquire lock")); + sme_err("Failed to acquire lock"); return QDF_STATUS_E_RESOURCES; } cmd = sme_get_command_buffer(mac); if (!cmd) { sme_release_global_lock(&mac->sme); - sms_log(mac, LOGE, FL("Get command buffer failed")); + sme_err("Get command buffer failed"); return QDF_STATUS_E_NULL_VALUE; } cmd->command = e_sme_command_set_antenna_mode; cmd->u.set_antenna_mode_cmd = *msg; - sms_log(mac, LOGD, - FL("Queuing e_sme_command_set_antenna_mode to CSR: %d %d"), + sme_debug("Antenna mode rx_chains: %d tx_chains: %d", cmd->u.set_antenna_mode_cmd.num_rx_chains, cmd->u.set_antenna_mode_cmd.num_tx_chains); @@ -16084,7 +15866,6 @@ bool sme_is_session_id_valid(tHalHandle hal, uint32_t session_id) { tpAniSirGlobal mac = PMAC_STRUCT(hal); if (!mac) { - /* Using QDF_TRACE since mac is not available for sms_log */ QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: null mac pointer", __func__); return false; @@ -16093,8 +15874,7 @@ bool sme_is_session_id_valid(tHalHandle hal, uint32_t session_id) if (CSR_IS_SESSION_VALID(mac, session_id)) { return true; } else { - sms_log(mac, LOGE, - FL("invalid session id:%d"), session_id); + sme_err("Invalid session id: %d", session_id); return false; } } @@ -16247,8 +16027,7 @@ QDF_STATUS sme_update_mimo_power_save(tHalHandle hal, { tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); - sms_log(mac_ctx, LOGD, - "SMPS enable: %d mode: %d send action: %d", + sme_debug("SMPS enable: %d mode: %d send action: %d", is_ht_smps_enabled, ht_smps_mode, send_smps_action); mac_ctx->roam.configParam.enableHtSmps = @@ -16276,14 +16055,12 @@ bool sme_is_sta_smps_allowed(tHalHandle hal, uint8_t session_id) csr_session = CSR_GET_SESSION(mac_ctx, session_id); if (NULL == csr_session) { - sms_log(mac_ctx, LOGE, - FL("SME session not valid: %d"), session_id); + sme_err("SME session not valid: %d", session_id); return false; } if (!CSR_IS_SESSION_VALID(mac_ctx, session_id)) { - sms_log(mac_ctx, LOGE, - FL("CSR session not valid: %d"), session_id); + sme_err("CSR session not valid: %d", session_id); return false; } @@ -16308,9 +16085,7 @@ QDF_STATUS sme_add_beacon_filter(tHalHandle hal, struct beacon_filter_param *filter_param; if (!CSR_IS_SESSION_VALID(mac_ctx, session_id)) { - sms_log(mac_ctx, LOGE, - "CSR session not valid: %d", - session_id); + sme_err("CSR session not valid: %d", session_id); return QDF_STATUS_E_FAILURE; } @@ -16355,9 +16130,7 @@ QDF_STATUS sme_remove_beacon_filter(tHalHandle hal, uint32_t session_id) struct beacon_filter_param *filter_param; if (!CSR_IS_SESSION_VALID(mac_ctx, session_id)) { - sms_log(mac_ctx, LOGE, - "CSR session not valid: %d", - session_id); + sme_err("CSR session not valid: %d", session_id); return QDF_STATUS_E_FAILURE; } @@ -16462,7 +16235,7 @@ QDF_STATUS sme_get_bpf_offload_capabilities(tHalHandle hal) tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); cds_msg_t cds_msg; - sms_log(mac_ctx, LOGD, FL("enter")); + SME_ENTER(); status = sme_acquire_global_lock(&mac_ctx->sme); if (QDF_STATUS_SUCCESS == status) { @@ -16480,7 +16253,8 @@ QDF_STATUS sme_get_bpf_offload_capabilities(tHalHandle hal) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("sme_acquire_global_lock error")); } - sms_log(mac_ctx, LOGD, FL("exit")); + SME_EXIT(); + return status; } @@ -16702,12 +16476,12 @@ void sme_set_vdev_ies_per_band(uint8_t vdev_id, uint8_t is_hw_mode_dbs) p_mac = PMAC_STRUCT(hal); status = sme_acquire_global_lock(&p_mac->sme); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(p_mac, LOGE, FL("Failed to acquire lock")); + sme_err("Failed to acquire lock"); return; } p_msg = qdf_mem_malloc(sizeof(*p_msg)); if (NULL == p_msg) { - sms_log(p_mac, LOGE, FL("mem alloc failed for sme msg")); + sme_err("mem alloc failed for sme msg"); return; } @@ -16715,13 +16489,12 @@ void sme_set_vdev_ies_per_band(uint8_t vdev_id, uint8_t is_hw_mode_dbs) p_msg->is_hw_mode_dbs = is_hw_mode_dbs; p_msg->msg_type = eWNI_SME_SET_VDEV_IES_PER_BAND; p_msg->len = sizeof(*p_msg); - sms_log(p_mac, LOGD, - FL("sending eWNI_SME_SET_VDEV_IES_PER_BAND: vdev_id: %d "), - vdev_id); + sme_debug("Sending eWNI_SME_SET_VDEV_IES_PER_BAND vdev_id: %d", + vdev_id); status = cds_send_mb_message_to_mac(p_msg); if (QDF_STATUS_SUCCESS != status) - sms_log(p_mac, LOGE, - FL("Send eWNI_SME_SET_VDEV_IES_PER_BAND fail")); + sme_err("Send eWNI_SME_SET_VDEV_IES_PER_BAND fail"); + sme_release_global_lock(&p_mac->sme); } @@ -16734,12 +16507,10 @@ bool sme_check_enable_rx_ldpc_sta_ini_item(void) return false; mac_ctx = PMAC_STRUCT(hal); if (!mac_ctx->roam.configParam.rx_ldpc_support_for_2g) { - sms_log(mac_ctx, LOG1, - FL("2G STA Rx LDPC is disabled from ini")); + sme_debug("2G STA Rx LDPC is disabled from ini"); return false; } - sms_log(mac_ctx, LOG1, - FL("2G STA Rx LDPC is enabled from ini")); + sme_debug("2G STA Rx LDPC is enabled from ini"); return true; } @@ -16758,13 +16529,13 @@ QDF_STATUS sme_issue_same_ap_reassoc_cmd(uint8_t session_id) mac_ctx = PMAC_STRUCT(hal); status = sme_acquire_global_lock(&mac_ctx->sme); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, FL("Failed to acquire lock")); + sme_err("Failed to acquire lock"); return QDF_STATUS_E_RESOURCES; } cmd = csr_get_command_buffer(mac_ctx); if (!cmd) { - sms_log(mac_ctx, LOGE, FL("Get command buffer failed")); + sme_err("Get command buffer failed"); sme_release_global_lock(&mac_ctx->sme); return QDF_STATUS_E_NULL_VALUE; } @@ -16772,8 +16543,7 @@ QDF_STATUS sme_issue_same_ap_reassoc_cmd(uint8_t session_id) cmd->command = e_sme_command_issue_self_reassoc; cmd->sessionId = session_id; - sms_log(mac_ctx, LOG1, FL("Queuing self reassoc to CSR, session:%d"), - cmd->sessionId); + sme_debug("Queuing self reassoc to CSR, session: %d", cmd->sessionId); csr_queue_sme_command(mac_ctx, cmd, false); sme_release_global_lock(&mac_ctx->sme); @@ -16817,9 +16587,7 @@ void sme_set_pdev_ht_vht_ies(tHalHandle hal, bool enable2x2) if (QDF_STATUS_SUCCESS == status) { ht_vht_cfg = qdf_mem_malloc(sizeof(*ht_vht_cfg)); if (NULL == ht_vht_cfg) { - sms_log(mac_ctx, LOGE, - "%s: mem alloc failed for ht_vht_cfg", - __func__); + sme_err("mem alloc failed for ht_vht_cfg"); sme_release_global_lock(&mac_ctx->sme); return; } @@ -16835,14 +16603,12 @@ void sme_set_pdev_ht_vht_ies(tHalHandle hal, bool enable2x2) ht_vht_cfg->msg_type = eWNI_SME_PDEV_SET_HT_VHT_IE; ht_vht_cfg->len = sizeof(*ht_vht_cfg); - sms_log(mac_ctx, LOGD, - FL("SET_HT_VHT_IE with nss %d, dot11mode %d"), - ht_vht_cfg->nss, - ht_vht_cfg->dot11mode); + sme_debug("SET_HT_VHT_IE with nss: %d, dot11mode: %d", + ht_vht_cfg->nss, + ht_vht_cfg->dot11mode); status = cds_send_mb_message_to_mac(ht_vht_cfg); if (QDF_STATUS_SUCCESS != status) { - sms_log(mac_ctx, LOGE, FL( - "Send SME_PDEV_SET_HT_VHT_IE fail")); + sme_err("Send SME_PDEV_SET_HT_VHT_IE fail"); } sme_release_global_lock(&mac_ctx->sme); } @@ -16883,8 +16649,7 @@ void sme_update_vdev_type_nss(tHalHandle hal, uint8_t max_supp_nss, vdev_nss->tdls = QDF_MIN(max_supp_nss, CFG_TDLS_NSS(vdev_type_nss)); vdev_nss->ocb = QDF_MIN(max_supp_nss, CFG_OCB_NSS(vdev_type_nss)); - sms_log(mac_ctx, LOGD, - "band %d NSS:sta %d sap %d cli %d go %d dev %d ibss %d tdls %d ocb %d", + sme_debug("band %d NSS:sta %d sap %d cli %d go %d dev %d ibss %d tdls %d ocb %d", band, vdev_nss->sta, vdev_nss->sap, vdev_nss->p2p_cli, vdev_nss->p2p_go, vdev_nss->p2p_dev, vdev_nss->ibss, vdev_nss->tdls, vdev_nss->ocb); @@ -16930,9 +16695,7 @@ QDF_STATUS sme_process_mac_pwr_dbg_cmd(tHalHandle hal, uint32_t session_id, int i; if (!CSR_IS_SESSION_VALID(mac_ctx, session_id)) { - sms_log(mac_ctx, LOGE, - "CSR session not valid: %d", - session_id); + sme_err("CSR session not valid: %d", session_id); return QDF_STATUS_E_FAILURE; } @@ -17049,7 +16812,7 @@ QDF_STATUS sme_enable_disable_chanavoidind_event(tHalHandle hal, tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); cds_msg_t msg; - sms_log(mac_ctx, LOGD, FL("set_value: %d"), set_value); + sme_debug("set_value: %d", set_value); status = sme_acquire_global_lock(&mac_ctx->sme); if (QDF_STATUS_SUCCESS == status) { qdf_mem_zero(&msg, sizeof(cds_msg_t)); @@ -17093,7 +16856,7 @@ QDF_STATUS sme_set_default_scan_ie(tHalHandle hal, uint16_t session_id, } sme_release_global_lock(&mac_ctx->sme); } - sms_log(mac_ctx, LOGD, FL("Set default scan IE status %d"), status); + return status; } @@ -17280,7 +17043,6 @@ QDF_STATUS sme_set_cts2self_for_p2p_go(tHalHandle hal_handle) QDF_STATUS sme_update_tx_fail_cnt_threshold(tHalHandle hal_handle, uint8_t session_id, uint32_t tx_fail_count) { - tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_handle); QDF_STATUS status = QDF_STATUS_E_FAILURE; struct sme_tx_fail_cnt_threshold *tx_fail_cnt; cds_msg_t msg; @@ -17291,9 +17053,8 @@ QDF_STATUS sme_update_tx_fail_cnt_threshold(tHalHandle hal_handle, "%s: fail to alloc filter_param", __func__); return QDF_STATUS_E_FAILURE; } - sms_log(mac_ctx, LOGD, - FL("session_id %d tx_fail_count: %d"), - session_id, tx_fail_count); + sme_debug("session_id: %d tx_fail_count: %d", + session_id, tx_fail_count); tx_fail_cnt->session_id = session_id; tx_fail_cnt->tx_fail_cnt_threshold = tx_fail_count; @@ -17321,10 +17082,8 @@ QDF_STATUS sme_set_lost_link_info_cb(tHalHandle hal, if (QDF_IS_STATUS_SUCCESS(status)) { mac->sme.lost_link_info_cb = cb; sme_release_global_lock(&mac->sme); - sms_log(mac, LOGD, FL("set lost link info callback")); } else { - sms_log(mac, LOGE, - FL("sme_acquire_global_lock error status %d"), + sme_err("sme_acquire_global_lock error status: %d", status); } return status; @@ -17524,7 +17283,6 @@ QDF_STATUS sme_rso_cmd_status_cb(tHalHandle hal, tpAniSirGlobal mac = PMAC_STRUCT(hal); mac->sme.rso_cmd_status_cb = cb; - sms_log(mac, LOGD, FL("Registered RSO command status callback")); return status; } @@ -17588,14 +17346,14 @@ QDF_STATUS sme_get_beacon_frm(tHalHandle hal, tCsrRoamProfile *profile, scan_filter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); if (NULL == scan_filter) { - sms_log(mac_ctx, LOGE, FL("memory allocation failed")); + sme_err("memory allocation failed"); status = QDF_STATUS_E_NOMEM; goto free_scan_flter; } status = csr_roam_prepare_filter_from_profile(mac_ctx, profile, scan_filter); if (QDF_STATUS_SUCCESS != status) { - sms_log(mac_ctx, LOGE, FL("prepare_filter failed")); + sme_err("prepare_filter failed"); goto free_scan_flter; } @@ -17604,7 +17362,7 @@ QDF_STATUS sme_get_beacon_frm(tHalHandle hal, tCsrRoamProfile *profile, scan_filter->BSSIDs.bssid = qdf_mem_malloc(sizeof(struct qdf_mac_addr)); if (scan_filter->BSSIDs.bssid == NULL) { - sms_log(mac_ctx, LOGE, FL("malloc failed")); + sme_err("malloc failed"); status = QDF_STATUS_E_NOMEM; goto free_scan_flter; } @@ -17615,14 +17373,14 @@ QDF_STATUS sme_get_beacon_frm(tHalHandle hal, tCsrRoamProfile *profile, status = csr_scan_get_result(mac_ctx, scan_filter, &result_handle); if (QDF_STATUS_SUCCESS != status) { - sms_log(mac_ctx, LOGE, FL("parse_scan_result failed")); + sme_err("parse_scan_result failed"); goto free_scan_flter; } bss_list = (tScanResultList *)result_handle; bss_descp = csr_get_fst_bssdescr_ptr(bss_list); if (!bss_descp) { - sms_log(mac_ctx, LOGE, FL("unable to fetch bss descriptor")); + sme_err("unable to fetch bss descriptor"); status = QDF_STATUS_E_FAULT; goto free_scan_flter; } @@ -17633,14 +17391,13 @@ QDF_STATUS sme_get_beacon_frm(tHalHandle hal, tCsrRoamProfile *profile, */ ie_len = bss_descp->length - sizeof(tSirBssDescription) + sizeof(bss_descp->length) + sizeof(bss_descp->ieFields); - sms_log(mac_ctx, LOGD, FL("found bss_descriptor ie_len: %d"), - ie_len); + sme_debug("found bss_descriptor ie_len: %d", ie_len); /* include mac header and fixed params along with IEs in frame */ *frame_len = SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET + ie_len; *frame_buf = qdf_mem_malloc(*frame_len); if (NULL == *frame_buf) { - sms_log(mac_ctx, LOGE, FL("memory allocation failed")); + sme_err("memory allocation failed"); status = QDF_STATUS_E_NOMEM; goto free_scan_flter; } @@ -17677,7 +17434,7 @@ QDF_STATUS sme_set_nud_debug_stats(tHalHandle hal, arp_set_param = qdf_mem_malloc(sizeof(*arp_set_param)); if (arp_set_param == NULL) { - hdd_err("Memory allocation failure"); + sme_err("Memory allocation failure"); return QDF_STATUS_E_NOMEM; } @@ -17689,7 +17446,7 @@ QDF_STATUS sme_set_nud_debug_stats(tHalHandle hal, if (QDF_STATUS_SUCCESS != cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) { - hdd_err("Not able to post message to WDA"); + sme_err("Not able to post message to WDA"); qdf_mem_free(arp_set_param); return QDF_STATUS_E_FAILURE; } @@ -17713,7 +17470,7 @@ QDF_STATUS sme_get_nud_debug_stats(tHalHandle hal, arp_get_param = qdf_mem_malloc(sizeof(*arp_get_param)); if (arp_get_param == NULL) { - hdd_err("Memory allocation failure"); + sme_err("Memory allocation failure"); return QDF_STATUS_E_NOMEM; } @@ -17725,7 +17482,7 @@ QDF_STATUS sme_get_nud_debug_stats(tHalHandle hal, if (QDF_STATUS_SUCCESS != cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) { - hdd_err("Not able to post message to WDA"); + sme_err("Not able to post message to WDA"); qdf_mem_free(arp_get_param); return QDF_STATUS_E_FAILURE; } @@ -17743,10 +17500,9 @@ QDF_STATUS sme_set_bt_activity_info_cb(tHalHandle hal, if (QDF_IS_STATUS_SUCCESS(status)) { mac->sme.bt_activity_info_cb = cb; sme_release_global_lock(&mac->sme); - sms_log(mac, LOG1, FL("bt activity info callback set")); + sme_debug("bt activity info callback set"); } else { - sms_log(mac, LOGE, - FL("sme_acquire_global_lock failed %d"), status); + sme_debug("sme_acquire_global_lock failed %d", status); } return status; |
