From 81aef9019eccc90e0d845566a5e56ed8f405f175 Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Fri, 17 Mar 2017 09:34:19 -0700 Subject: [PATCH] qcacld-3.0: Replace sms_log() with sme_* log levels in csr_api_roam.c Replace sms_log() with sme_* appropriate log levels in csr_api_roam.c. Change-Id: I3de430a40c40b319848f7d7ef5285e65a378b877 CRs-Fixed: 2020798 --- core/sme/src/csr/csr_api_roam.c | 1679 ++++++++++++++----------------- 1 file changed, 763 insertions(+), 916 deletions(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 31f8a3308493..7a2efab7bc33 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -358,8 +358,7 @@ QDF_STATUS csr_init_chan_list(tpAniSirGlobal mac, uint8_t *alpha2) mac->scan.countryCodeDefault[1] = alpha2[1]; mac->scan.countryCodeDefault[2] = alpha2[2]; - sms_log(mac, LOGD, FL("init time country code %.2s"), - mac->scan.countryCodeDefault); + sme_debug("init time country code %.2s", mac->scan.countryCodeDefault); mac->scan.domainIdDefault = 0; mac->scan.domainIdCurrent = 0; @@ -380,24 +379,22 @@ QDF_STATUS csr_set_reg_info(tHalHandle hHal, uint8_t *apCntryCode) v_REGDOMAIN_t regId; uint8_t cntryCodeLength; if (NULL == apCntryCode) { - sms_log(pMac, LOGE, FL(" Invalid country Code Pointer")); + sme_err("Invalid country Code Pointer"); return QDF_STATUS_E_FAILURE; } - sms_log(pMac, LOGD, FL(" country Code %.2s"), apCntryCode); + sme_debug("country Code %.2s", apCntryCode); cntryCodeLength = WNI_CFG_COUNTRY_CODE_LEN; status = csr_get_regulatory_domain_for_country(pMac, apCntryCode, ®Id, SOURCE_USERSPACE); if (status != QDF_STATUS_SUCCESS) { - sms_log(pMac, LOGE, - FL(" fail to get regId for country Code %.2s"), + sme_err("fail to get regId for country Code %.2s", apCntryCode); return status; } status = wma_set_reg_domain(hHal, regId); if (status != QDF_STATUS_SUCCESS) { - sms_log(pMac, LOGE, - FL(" fail to get regId for country Code %.2s"), + sme_err("fail to get regId for country Code %.2s", apCntryCode); return status; } @@ -505,7 +502,7 @@ static void csr_roam_arrange_ch_list(tpAniSirGlobal mac_ctx, tmp_list = (tSirUpdateChanParam *) qdf_mem_malloc(sizeof(tSirUpdateChanParam) * num_channel); if (tmp_list == NULL) { - sms_log(mac_ctx, LOGE, FL("Memory allocation failed")); + sme_err("Memory allocation failed"); return; } @@ -720,7 +717,7 @@ QDF_STATUS csr_update_channel_list(tpAniSirGlobal pMac) qdf_device_t qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE); if (!qdf_ctx) { - cds_err("qdf_ctx is NULL"); + sme_err("qdf_ctx is NULL"); return QDF_STATUS_E_FAILURE; } @@ -931,8 +928,7 @@ QDF_STATUS csr_start(tpAniSirGlobal pMac) /* init the link quality indication also */ pMac->roam.vccLinkQuality = eCSR_ROAM_LINK_QUAL_MIN_IND; if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGW, - " csr_start: Couldn't Init HO control blk "); + sme_warn("csr_start: Couldn't Init HO control blk "); break; } #ifdef NAPIER_SCAN @@ -990,8 +986,7 @@ QDF_STATUS csr_ready(tpAniSirGlobal pMac) status = csr_apply_channel_and_power_list(pMac); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - "csr_apply_channel_and_power_list failed during csr_ready with status=%d", + sme_err("csr_apply_channel_and_power_list failed during csr_ready with status: %d", status); } return status; @@ -1079,7 +1074,7 @@ void csr_packetdump_timer_stop(void) mac = PMAC_STRUCT(hal); status = qdf_mc_timer_stop(&mac->roam.packetdump_timer); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, FL("cannot stop packetdump timer")); + sme_err("cannot stop packetdump timer"); } } @@ -1104,17 +1099,14 @@ QDF_STATUS csr_roam_open(tpAniSirGlobal pMac) csr_roam_wait_for_key_time_out_handler, &pMac->roam.WaitForKeyTimerInfo); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL - ("cannot allocate memory for WaitForKey time out timer")); + sme_err("cannot allocate memory for WaitForKey time out timer"); break; } status = qdf_mc_timer_init(&pMac->roam.packetdump_timer, QDF_TIMER_TYPE_SW, csr_packetdump_timer_handler, pMac); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL("cannot allocate memory for packetdump timer")); + sme_err("cannot allocate memory for packetdump timer"); break; } status = @@ -1122,9 +1114,7 @@ QDF_STATUS csr_roam_open(tpAniSirGlobal pMac) QDF_TIMER_TYPE_SW, csr_roam_tl_stats_timer_handler, pMac); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL - ("cannot allocate memory for summary Statistics timer")); + sme_err("cannot allocate memory for summary Statistics timer"); return QDF_STATUS_E_FAILURE; } } while (0); @@ -1179,11 +1169,11 @@ QDF_STATUS csr_roam_copy_connect_profile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *connected_prof; if (!pSession) { - sms_log(pMac, LOGE, FL(" session %d not found "), sessionId); + sme_err("session %d not found", sessionId); return QDF_STATUS_E_FAILURE; } if (!pProfile) { - sms_log(pMac, LOGE, FL("profile not found")); + sme_err("profile not found"); return QDF_STATUS_E_FAILURE; } @@ -1339,8 +1329,7 @@ void csr_release_roc_req_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd) callback(mac_ctx, sme_cmd->u.remainChlCmd.callbackCtx, 0, sme_cmd->u.remainChlCmd.scan_id); - sms_log(mac_ctx, LOGE, - FL("Remove RoC Request from Active Cmd List")); + sme_err("Remove RoC Request from Active Cmd List"); } } @@ -1364,13 +1353,11 @@ void csr_cancel_command(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd) * We need to inform the requester before dropping * the scan command */ - sms_log(mac_ctx, LOGW, - "%s: Drop scan reason %d callback %p", __func__, + sme_warn("Drop scan reason %d callback %p", sme_cmd->u.scanCmd.reason, sme_cmd->u.scanCmd.callback); if (NULL != sme_cmd->u.scanCmd.callback) { - sms_log(mac_ctx, LOGW, "%s callback scan requester", - __func__); + sme_warn("callback scan requester"); csr_scan_call_callback(mac_ctx, sme_cmd, eCSR_SCAN_ABORT); } @@ -1383,7 +1370,7 @@ void csr_cancel_command(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd) void csr_roam_substate_change(tpAniSirGlobal pMac, eCsrRoamSubState NewSubstate, uint32_t sessionId) { - sms_log(pMac, LOGD, FL("CSR RoamSubstate: [ %s <== %s ]"), + sme_debug("CSR RoamSubstate: [ %s <== %s ]", mac_trace_getcsr_roam_sub_state(NewSubstate), mac_trace_getcsr_roam_sub_state(pMac->roam.curSubState[sessionId])); if (pMac->roam.curSubState[sessionId] == NewSubstate) { @@ -1397,7 +1384,7 @@ eCsrRoamState csr_roam_state_change(tpAniSirGlobal pMac, { eCsrRoamState PreviousState; - sms_log(pMac, LOGD, FL("CSR RoamState[%hu]: [ %s <== %s ]"), sessionId, + sme_debug("CSR RoamState[%hu]: [ %s <== %s ]", sessionId, mac_trace_getcsr_roam_state(NewRoamState), mac_trace_getcsr_roam_state(pMac->roam.curState[sessionId])); PreviousState = pMac->roam.curState[sessionId]; @@ -1418,8 +1405,8 @@ void csr_assign_rssi_for_category(tpAniSirGlobal pMac, int8_t bestApRssi, uint8_t catOffset) { int i; - sms_log(pMac, LOGD, FL("best AP RSSI:%d, cat offset:%d"), - bestApRssi, catOffset); + + sme_debug("best AP RSSI: %d cat offset: %d", bestApRssi, catOffset); if (catOffset) { pMac->roam.configParam.bCatRssiOffset = catOffset; for (i = 0; i < CSR_NUM_RSSI_CAT; i++) { @@ -1576,8 +1563,7 @@ QDF_STATUS csr_create_bg_scan_roam_channel_list(tpAniSirGlobal pMac, numOfChannels); if (NULL == pNeighborRoamInfo->cfgParams.channelInfo.ChannelList) { - sms_log(pMac, LOGE, - FL("Memory Allocation for CFG Channel List failed")); + sme_err("Memory Allocation for CFG Channel List failed"); pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels = 0; return QDF_STATUS_E_NOMEM; } @@ -1772,14 +1758,13 @@ static void csr_tsm_stats_rsp_processor(tpAniSirGlobal pMac, void *pMsg) qdf_mem_free(reqBkp); pTsmStatsRsp->tsmStatsReq = NULL; } else { - sms_log(pMac, LOGE, FL("reqBkp is NULL")); if (NULL != reqBkp) { qdf_mem_free(reqBkp); pTsmStatsRsp->tsmStatsReq = NULL; } } } else { - sms_log(pMac, LOGE, FL("pTsmStatsRsp is NULL")); + sme_err("pTsmStatsRsp is NULL"); } return; } @@ -1800,13 +1785,13 @@ static void csr_send_ese_adjacent_ap_rep_ind(tpAniSirGlobal pMac, uint8_t sessionId = CSR_SESSION_ID_INVALID; if (NULL == pSession) { - sms_log(pMac, LOGE, FL("pSession is NULL")); + sme_err("pSession is NULL"); return; } roamTS2 = qdf_mc_timer_get_system_time(); roamInfo.tsmRoamDelay = roamTS2 - pSession->roamTS1; - sms_log(pMac, LOGD, "Bssid(" MAC_ADDRESS_STR ") Roaming Delay(%u ms)", + sme_debug("Bssid(" MAC_ADDRESS_STR ") Roaming Delay(%u ms)", MAC_ADDR_ARRAY(pSession->connectedProfile.bssid.bytes), roamInfo.tsmRoamDelay); @@ -1814,7 +1799,7 @@ static void csr_send_ese_adjacent_ap_rep_ind(tpAniSirGlobal pMac, pSession->connectedProfile.bssid.bytes, &sessionId); if (NULL == pSessionEntry) { - sms_log(pMac, LOGE, FL("session %d not found"), sessionId); + sme_err("session %d not found", sessionId); return; } @@ -1847,7 +1832,7 @@ QDF_STATUS csr_get_tsm_stats(tpAniSirGlobal pMac, tAniGetTsmStatsReq *pMsg = NULL; pMsg = qdf_mem_malloc(sizeof(tAniGetTsmStatsReq)); if (!pMsg) { - sms_log(pMac, LOGE, + sme_err( "csr_get_tsm_stats: failed to allocate mem for req"); return QDF_STATUS_E_NOMEM; } @@ -1862,9 +1847,8 @@ QDF_STATUS csr_get_tsm_stats(tpAniSirGlobal pMac, pMsg->p_cds_context = p_cds_context; status = umac_send_mb_message_to_mac(pMsg); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGD, - " csr_get_tsm_stats: failed to send down the rssi req"); - /* pMsg is freed by umac_send_mb_message_to_mac */ + sme_debug("csr_get_tsm_stats: failed to send down the rssi req"); + /* pMsg is freed by cds_send_mb_message_to_mac */ status = QDF_STATUS_E_FAILURE; } return status; @@ -1913,8 +1897,8 @@ csr_fetch_ch_lst_from_received_list(tpAniSirGlobal mac_ctx, (mac_ctx->roam.configParam.sta_roam_policy.dfs_mode == CSR_STA_ROAM_POLICY_DFS_DISABLED)) && (CDS_IS_DFS_CH(*ch_lst))) { - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - FL("ignoring dfs channel %d"), *ch_lst); + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + ("ignoring dfs channel %d"), *ch_lst); ch_lst++; continue; } @@ -1931,8 +1915,8 @@ csr_fetch_ch_lst_from_received_list(tpAniSirGlobal mac_ctx, } if (is_unsafe_chan) { QDF_TRACE(QDF_MODULE_ID_SME, - QDF_TRACE_LEVEL_INFO, - FL("ignoring unsafe channel %d"), + QDF_TRACE_LEVEL_DEBUG, + ("ignoring unsafe channel %d"), *ch_lst); ch_lst++; continue; @@ -1965,7 +1949,7 @@ QDF_STATUS csr_set_cckm_ie(tpAniSirGlobal pMac, const uint8_t sessionId, QDF_STATUS status = QDF_STATUS_SUCCESS; tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } qdf_mem_copy(pSession->suppCckmIeInfo.cckmIe, pCckmIe, ccKmIeLen); @@ -2424,7 +2408,7 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, * This is how channelBondingMode5GHz works now and this is kept intact to avoid any cfg.ini change */ if (pParam->channelBondingMode24GHz > MAX_CB_VALUE_IN_INI) { - sms_log(pMac, LOGW, + sme_warn( "Invalid CB value from ini in 2.4GHz band %d, CB DISABLED", pParam->channelBondingMode24GHz); } @@ -2432,7 +2416,7 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, csr_convert_cb_ini_value_to_phy_cb_state(pParam-> channelBondingMode24GHz); if (pParam->channelBondingMode5GHz > MAX_CB_VALUE_IN_INI) { - sms_log(pMac, LOGW, + sme_warn( "Invalid CB value from ini in 5GHz band %d, CB DISABLED", pParam->channelBondingMode5GHz); } @@ -2591,7 +2575,7 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, qdf_mem_copy(&pMac->roam.configParam.csr11rConfig, &pParam->csr11rConfig, sizeof(tCsr11rConfigParams)); - sms_log(pMac, LOGD, "IsFTResourceReqSupp = %d", + sme_debug("IsFTResourceReqSupp: %d", pMac->roam.configParam.csr11rConfig. IsFTResourceReqSupported); pMac->roam.configParam.isFastTransitionEnabled = @@ -2620,56 +2604,55 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, qdf_mem_copy(&pMac->roam.configParam.neighborRoamConfig, &pParam->neighborRoamConfig, sizeof(tCsrNeighborRoamConfigParams)); - sms_log(pMac, LOGD, "nNeighborScanTimerPerioid = %d", + sme_debug("nNeighborScanTimerPerioid: %d", pMac->roam.configParam.neighborRoamConfig. nNeighborScanTimerPeriod); - sms_log(pMac, LOGD, "nNeighborLookupRssiThreshold = %d", + sme_debug("nNeighborLookupRssiThreshold: %d", pMac->roam.configParam.neighborRoamConfig. nNeighborLookupRssiThreshold); - sms_log(pMac, LOGD, "nOpportunisticThresholdDiff = %d", + sme_debug("nOpportunisticThresholdDiff: %d", pMac->roam.configParam.neighborRoamConfig. nOpportunisticThresholdDiff); - sms_log(pMac, LOGD, "nRoamRescanRssiDiff = %d", + sme_debug("nRoamRescanRssiDiff: %d", pMac->roam.configParam.neighborRoamConfig. nRoamRescanRssiDiff); - sms_log(pMac, LOGD, "nNeighborScanMinChanTime = %d", + sme_debug("nNeighborScanMinChanTime: %d", pMac->roam.configParam.neighborRoamConfig. nNeighborScanMinChanTime); - sms_log(pMac, LOGD, "nNeighborScanMaxChanTime = %d", + sme_debug("nNeighborScanMaxChanTime: %d", pMac->roam.configParam.neighborRoamConfig. nNeighborScanMaxChanTime); - sms_log(pMac, LOGD, "nMaxNeighborRetries = %d", + sme_debug("nMaxNeighborRetries: %d", pMac->roam.configParam.neighborRoamConfig. nMaxNeighborRetries); - sms_log(pMac, LOGD, "nNeighborResultsRefreshPeriod = %d", + sme_debug("nNeighborResultsRefreshPeriod: %d", pMac->roam.configParam.neighborRoamConfig. nNeighborResultsRefreshPeriod); - sms_log(pMac, LOGD, "nEmptyScanRefreshPeriod = %d", + sme_debug("nEmptyScanRefreshPeriod: %d", pMac->roam.configParam.neighborRoamConfig. nEmptyScanRefreshPeriod); { int i; - sms_log(pMac, LOGD, - FL("Num of Channels in CFG Channel List: %d"), + sme_debug("Num of Channels in CFG Channel List: %d", pMac->roam.configParam.neighborRoamConfig. neighborScanChanList.numChannels); for (i = 0; i < pMac->roam.configParam.neighborRoamConfig. neighborScanChanList.numChannels; i++) { - sms_log(pMac, LOGD, "%d ", + sme_debug("%d ", pMac->roam.configParam. neighborRoamConfig.neighborScanChanList. channelList[i]); } } - sms_log(pMac, LOGD, "nRoamBmissFirstBcnt = %d", + sme_debug("nRoamBmissFirstBcnt: %d", pMac->roam.configParam.neighborRoamConfig. nRoamBmissFirstBcnt); - sms_log(pMac, LOGD, "nRoamBmissFinalBcnt = %d", + sme_debug("nRoamBmissFinalBcnt: %d", pMac->roam.configParam.neighborRoamConfig. nRoamBmissFinalBcnt); - sms_log(pMac, LOGD, "nRoamBeaconRssiWeight = %d", + sme_debug("nRoamBeaconRssiWeight: %d", pMac->roam.configParam.neighborRoamConfig. nRoamBeaconRssiWeight); pMac->roam.configParam.addTSWhenACMIsOff = @@ -2949,13 +2932,12 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam) qdf_mem_copy(&pParam->neighborRoamConfig, &cfg_params->neighborRoamConfig, sizeof(tCsrNeighborRoamConfigParams)); - sms_log(pMac, LOGD, - FL("Num of Channels in CFG Channel List: %d"), + sme_debug("Num of Channels in CFG Channel List: %d", cfg_params->neighborRoamConfig. neighborScanChanList.numChannels); for (i = 0; i < cfg_params->neighborRoamConfig. neighborScanChanList.numChannels; i++) { - sms_log(pMac, LOGD, "%d ", + sme_debug("%d ", cfg_params->neighborRoamConfig. neighborScanChanList.channelList[i]); } @@ -3160,10 +3142,7 @@ QDF_STATUS csr_set_phy_mode(tHalHandle hHal, uint32_t phyMode, eCsrBand eBand, newPhyMode = eCSR_DOT11_MODE_11b; eBand = eCSR_BAND_24; } else { - /* We will never be here */ - sms_log(pMac, LOGE, - FL("can't recognize phymode 0x%08X"), - phyMode); + sme_err("can't recognize phymode 0x%08X", phyMode); newPhyMode = eCSR_DOT11_MODE_AUTO; } } @@ -3283,7 +3262,7 @@ QDF_STATUS csr_is_valid_channel(tpAniSirGlobal pMac, uint8_t chnNum) eSAP_DFS_CHANNEL_UNAVAILABLE)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("channel %d is in dfs nol"), + FL("channel %d is in dfs nol"), chnNum); status = QDF_STATUS_E_FAILURE; break; @@ -3293,7 +3272,7 @@ QDF_STATUS csr_is_valid_channel(tpAniSirGlobal pMac, uint8_t chnNum) if (QDF_STATUS_SUCCESS != status) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("channel %d is not available"), chnNum); + FL("channel %d is not available"), chnNum); } return status; @@ -3312,7 +3291,7 @@ QDF_STATUS csr_get_channel_and_power_list(tpAniSirGlobal pMac) if ((QDF_STATUS_SUCCESS != qdf_status) || (num20MHzChannelsFound == 0)) { - sms_log(pMac, LOGE, FL("failed to get channels ")); + sme_err("failed to get channels"); status = QDF_STATUS_E_FAILURE; } else { if (num20MHzChannelsFound > WNI_CFG_VALID_CHANNEL_LIST_LEN) { @@ -3496,7 +3475,7 @@ static void csr_roam_remove_duplicate_pending_cmd_from_list( qdf_mem_zero(&local_list, sizeof(tDblLinkList)); if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(mac_ctx->hHdd, &local_list))) { - sms_log(mac_ctx, LOGE, FL(" failed to open list")); + sme_err("failed to open list"); return; } csr_nonscan_pending_ll_lock(mac_ctx); @@ -3535,8 +3514,7 @@ static void csr_roam_remove_duplicate_pending_cmd_from_list( (eSmeCommandRoam == dup_cmd->command) && ((eCsrForcedDisassoc == roam_reason) || (eCsrHddIssued == roam_reason)))) { - sms_log(mac_ctx, LOGW, FL("RoamReason = %d"), - dup_cmd->u.roamCmd.roamReason); + sme_debug("RoamReason: %d", dup_cmd->u.roamCmd.roamReason); /* Remove the roam command from the pending list */ if (csr_nonscan_pending_ll_remove_entry(mac_ctx, entry, LL_ACCESS_NOLOCK)) @@ -3643,24 +3621,22 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId, uint8_t chan1, chan2; if (!CSR_IS_SESSION_VALID(pMac, sessionId)) { - sms_log(pMac, LOGE, "Session ID:%d is not valid", sessionId); + sme_err("Session ID: %d is not valid", sessionId); QDF_ASSERT(0); return QDF_STATUS_E_FAILURE; } pSession = CSR_GET_SESSION(pMac, sessionId); if (false == pSession->sessionActive) { - sms_log(pMac, LOGD, "%s Session is not Active", __func__); + sme_debug("Session is not Active"); return QDF_STATUS_E_FAILURE; } - sms_log(pMac, LOG4, "Received RoamCmdStatus %d with Roam Result %d", u1, - u2); + sme_debug("Received RoamCmdStatus %d with Roam Result %d", u1, u2); if (eCSR_ROAM_ASSOCIATION_COMPLETION == u1 && eCSR_ROAM_RESULT_ASSOCIATED == u2 && pRoamInfo) { - sms_log(pMac, LOG1, - FL("Assoc complete result: %d status: %d reason: %d"), + sme_info("Assoc complete result: %d status: %d reason: %d", u2, pRoamInfo->statusCode, pRoamInfo->reasonCode); beacon_ies = qdf_mem_malloc(sizeof(tDot11fBeaconIEs)); if ((NULL != beacon_ies) && (NULL != pRoamInfo->pBssDesc)) { @@ -3753,8 +3729,7 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId, } if (cfg_set_int(pMac, WNI_CFG_CURRENT_RSSI, connectionStatus.rssi) == eSIR_FAILURE) - sms_log(pMac, LOGE, - FL("Can't pass WNI_CFG_CURRENT_RSSI to cfg")); + sme_err("Can't pass WNI_CFG_CURRENT_RSSI to cfg"); connectionStatus.qosCapability = pRoamInfo->u.pConnectedProfile->qosConnection; @@ -3852,7 +3827,7 @@ QDF_STATUS csr_roam_issue_disassociate(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } @@ -3863,10 +3838,9 @@ QDF_STATUS csr_roam_issue_disassociate(tpAniSirGlobal pMac, uint32_t sessionId, } else if (eCSR_ROAM_SUBSTATE_DISASSOC_STA_HAS_LEFT == NewSubstate) { reasonCode = eSIR_MAC_DISASSOC_LEAVING_BSS_REASON; NewSubstate = eCSR_ROAM_SUBSTATE_DISASSOC_FORCED; - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - FL - ("set to reason code eSIR_MAC_DISASSOC_LEAVING_BSS_REASON" - " and set back NewSubstate")); + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + "set to reason code eSIR_MAC_DISASSOC_LEAVING_BSS_REASON" + " and set back NewSubstate"); } else { reasonCode = eSIR_MAC_UNSPEC_FAILURE_REASON; } @@ -3882,9 +3856,8 @@ QDF_STATUS csr_roam_issue_disassociate(tpAniSirGlobal pMac, uint32_t sessionId, sizeof(struct qdf_mac_addr)); } - sms_log(pMac, LOGD, - FL("CSR Attempting to Disassociate Bssid=" MAC_ADDRESS_STR - " subState = %s reason=%d"), MAC_ADDR_ARRAY(bssId.bytes), + sme_debug("CSR Attempting to Disassociate Bssid=" MAC_ADDRESS_STR + " subState: %s reason: %d", MAC_ADDR_ARRAY(bssId.bytes), mac_trace_getcsr_roam_sub_state(NewSubstate), reasonCode); csr_roam_substate_change(pMac, NewSubstate, sessionId); @@ -3903,8 +3876,7 @@ QDF_STATUS csr_roam_issue_disassociate(tpAniSirGlobal pMac, uint32_t sessionId, } #endif } else { - sms_log(pMac, LOGW, - FL("csr_send_mb_disassoc_req_msg failed with status %d"), + sme_warn("csr_send_mb_disassoc_req_msg failed status: %d", status); } @@ -3932,7 +3904,7 @@ QDF_STATUS csr_roam_issue_disassociate_sta_cmd(tpAniSirGlobal pMac, do { pCommand = csr_get_command_buffer(pMac); if (!pCommand) { - sms_log(pMac, LOGE, FL(" fail to get command buffer")); + sme_err("fail to get command buffer"); status = QDF_STATUS_E_RESOURCES; break; } @@ -3946,8 +3918,7 @@ QDF_STATUS csr_roam_issue_disassociate_sta_cmd(tpAniSirGlobal pMac, (tSirMacReasonCodes)p_del_sta_params->reason_code; status = csr_queue_sme_command(pMac, pCommand, false); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL(" fail to send message status = %d"), status); + sme_err("fail to send message status: %d", status); csr_release_command(pMac, pCommand); } } while (0); @@ -3974,7 +3945,7 @@ QDF_STATUS csr_roam_issue_deauth_sta_cmd(tpAniSirGlobal pMac, do { pCommand = csr_get_command_buffer(pMac); if (!pCommand) { - sms_log(pMac, LOGE, FL(" fail to get command buffer")); + sme_err("fail to get command buffer"); status = QDF_STATUS_E_RESOURCES; break; } @@ -3988,8 +3959,7 @@ QDF_STATUS csr_roam_issue_deauth_sta_cmd(tpAniSirGlobal pMac, (tSirMacReasonCodes)pDelStaParams->reason_code; status = csr_queue_sme_command(pMac, pCommand, false); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL(" fail to send message status = %d"), status); + sme_err("fail to send message status: %d", status); csr_release_command(pMac, pCommand); } } while (0); @@ -4031,7 +4001,7 @@ csr_roam_issue_tkip_counter_measures(tpAniSirGlobal pMac, uint32_t sessionId, struct qdf_mac_addr bssId = QDF_MAC_ADDR_BROADCAST_INITIALIZER; tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); if (!pSession) { - sms_log(pMac, LOGE, + sme_err( "csr_roam_issue_tkip_counter_measures:CSR Session not found"); return status; } @@ -4039,13 +4009,12 @@ csr_roam_issue_tkip_counter_measures(tpAniSirGlobal pMac, uint32_t sessionId, qdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId, sizeof(struct qdf_mac_addr)); } else { - sms_log(pMac, LOGE, + sme_err( "csr_roam_issue_tkip_counter_measures:Connected BSS Description in CSR Session not found"); return status; } - sms_log(pMac, LOGD, - "CSR issuing tkip counter measures for Bssid = " MAC_ADDRESS_STR - ", Enable = %d", MAC_ADDR_ARRAY(bssId.bytes), bEnable); + sme_debug("CSR issuing tkip counter measures for Bssid = " MAC_ADDRESS_STR + ", Enable = %d", MAC_ADDR_ARRAY(bssId.bytes), bEnable); status = csr_send_mb_tkip_counter_measures_req_msg(pMac, sessionId, bEnable, &bssId); @@ -4061,7 +4030,7 @@ csr_roam_get_associated_stas(tpAniSirGlobal pMac, uint32_t sessionId, struct qdf_mac_addr bssId = QDF_MAC_ADDR_BROADCAST_INITIALIZER; tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); if (!pSession) { - sms_log(pMac, LOGE, + sme_err( "csr_roam_get_associated_stas:CSR Session not found"); return status; } @@ -4069,13 +4038,12 @@ csr_roam_get_associated_stas(tpAniSirGlobal pMac, uint32_t sessionId, qdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId, sizeof(struct qdf_mac_addr)); } else { - sms_log(pMac, LOGE, + sme_err( "csr_roam_get_associated_stas:Connected BSS Description in CSR Session not found"); return status; } - sms_log(pMac, LOGD, - "CSR getting associated stations for Bssid = " MAC_ADDRESS_STR, - MAC_ADDR_ARRAY(bssId.bytes)); + sme_debug("CSR getting associated stations for Bssid = " MAC_ADDRESS_STR, + MAC_ADDR_ARRAY(bssId.bytes)); status = csr_send_mb_get_associated_stas_req_msg(pMac, sessionId, modId, bssId, @@ -4095,7 +4063,7 @@ csr_roam_get_wps_session_overlap(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); if (!pSession) { - sms_log(pMac, LOGE, + sme_err( "csr_roam_get_wps_session_overlap:CSR Session not found"); return status; } @@ -4103,13 +4071,12 @@ csr_roam_get_wps_session_overlap(tpAniSirGlobal pMac, uint32_t sessionId, qdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId, sizeof(struct qdf_mac_addr)); } else { - sms_log(pMac, LOGE, + sme_err( "csr_roam_get_wps_session_overlap:Connected BSS Description in CSR Session not found"); return status; } - sms_log(pMac, LOGD, - "CSR getting WPS Session Overlap for Bssid = " MAC_ADDRESS_STR, - MAC_ADDR_ARRAY(bssId.bytes)); + sme_debug("CSR getting WPS Session Overlap for Bssid = " MAC_ADDRESS_STR, + MAC_ADDR_ARRAY(bssId.bytes)); status = csr_send_mb_get_wpspbc_sessions(pMac, sessionId, bssId, pUsrContext, pfnSapEventCallback, pRemoveMac); @@ -4126,7 +4093,7 @@ QDF_STATUS csr_roam_issue_deauth(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } @@ -4134,8 +4101,8 @@ QDF_STATUS csr_roam_issue_deauth(tpAniSirGlobal pMac, uint32_t sessionId, qdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId, sizeof(struct qdf_mac_addr)); } - sms_log(pMac, LOGD, "CSR Attempting to Deauth Bssid= " MAC_ADDRESS_STR, - MAC_ADDR_ARRAY(bssId.bytes)); + sme_debug("CSR Attempting to Deauth Bssid= " MAC_ADDRESS_STR, + MAC_ADDR_ARRAY(bssId.bytes)); csr_roam_substate_change(pMac, NewSubstate, sessionId); status = @@ -4144,10 +4111,8 @@ QDF_STATUS csr_roam_issue_deauth(tpAniSirGlobal pMac, uint32_t sessionId, if (QDF_IS_STATUS_SUCCESS(status)) csr_roam_link_down(pMac, sessionId); else { - sms_log(pMac, LOGE, - FL - ("csr_send_mb_deauth_req_msg failed with status %d Session ID: %d" - MAC_ADDRESS_STR), status, sessionId, + sme_err("csr_send_mb_deauth_req_msg failed with status %d Session ID: %d" + MAC_ADDRESS_STR, status, sessionId, MAC_ADDR_ARRAY(bssId.bytes)); } @@ -4162,7 +4127,7 @@ QDF_STATUS csr_roam_save_connected_bss_desc(tpAniSirGlobal pMac, uint32_t sessio uint32_t size; if (!pSession) { - sms_log(pMac, LOGE, FL(" session %d not found "), sessionId); + sme_err(" session %d not found ", sessionId); return QDF_STATUS_E_FAILURE; } /* If no BSS description was found in this connection (happens with start IBSS), then */ @@ -4214,11 +4179,10 @@ QDF_STATUS csr_roam_prepare_bss_config(tpAniSirGlobal pMac, } else pBssConfig->SSID.length = 0; if (csr_is_nullssid(pBssConfig->SSID.ssId, pBssConfig->SSID.length)) { - sms_log(pMac, LOGW, FL("BSS desc SSID is a wild card")); + sme_warn("BSS desc SSID is a wild card"); /* Return failed if profile doesn't have an SSID either. */ if (pProfile->SSIDs.numOfSSIDs == 0) { - sms_log(pMac, LOGW, - FL("BSS desc and profile doesn't have SSID")); + sme_warn("BSS desc and profile doesn't have SSID"); return QDF_STATUS_E_FAILURE; } } @@ -4231,7 +4195,7 @@ QDF_STATUS csr_roam_prepare_bss_config(tpAniSirGlobal pMac, pProfile, &cfgDot11Mode, pIes)) { pBssConfig->uCfgDot11Mode = cfgDot11Mode; } else { - sms_log(pMac, LOGW, "Can not find match phy mode"); + sme_warn("Can not find match phy mode"); /* force it */ if (eCSR_BAND_24 == pBssConfig->eBand) pBssConfig->uCfgDot11Mode = eCSR_CFG_DOT11_MODE_11G; @@ -4694,7 +4658,7 @@ static QDF_STATUS csr_get_rate_set(tpAniSirGlobal pMac, QDF_ASSERT(pIes != NULL); if (NULL == pIes) { - sms_log(pMac, LOGE, FL("failed to parse BssDesc")); + sme_err("failed to parse BssDesc"); return status; } @@ -4837,7 +4801,7 @@ static void csr_set_cfg_rate_set(tpAniSirGlobal pMac, eCsrPhyMode phyMode, MCSRateLength); } /* Parsing BSSDesc */ else { - sms_log(pMac, LOGE, FL("failed to parse BssDesc")); + sme_err("failed to parse BssDesc"); } } @@ -4985,7 +4949,7 @@ void csr_roam_ccm_cfg_set_callback(tpAniSirGlobal pMac, int32_t result, tCsrRoamSession *pSession = NULL; #endif if (NULL == pEntry) { - sms_log(pMac, LOGW, "CFG_CNF with active list empty"); + sme_err("CFG_CNF with active list empty"); return; } pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link); @@ -5084,8 +5048,8 @@ QDF_STATUS csr_roam_set_bss_config_cfg(tpAniSirGlobal pMac, uint32_t sessionId, pBssConfig->uJoinTimeOut); /* Any roaming related changes should be above this line */ if (pSession && pSession->roam_synch_in_progress) { - sms_log(pMac, LOG4, FL("Roam synch is in progress %d"), - sessionId); + sme_debug("Roam synch is in progress Session_id: %d", + sessionId); return QDF_STATUS_SUCCESS; } /* Make this the last CFG to set. The callback will trigger a join_req */ @@ -5107,7 +5071,7 @@ QDF_STATUS csr_roam_stop_network(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } @@ -5115,7 +5079,7 @@ QDF_STATUS csr_roam_stop_network(tpAniSirGlobal pMac, uint32_t sessionId, if (NULL == pBssConfig) return QDF_STATUS_E_NOMEM; - sms_log(pMac, LOGD, FL("session id %d "), sessionId); + sme_debug("session id: %d", sessionId); status = csr_roam_prepare_bss_config(pMac, pProfile, pBssDesc, pBssConfig, pIes); @@ -5234,14 +5198,14 @@ static eCsrJoinState csr_roam_join(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return eCsrStopRoaming; } if (!pIesLocal && !QDF_IS_STATUS_SUCCESS(csr_get_parsed_bss_description_ies(pMac, pBssDesc, &pIesLocal))) { - sms_log(pMac, LOGE, FL("fail to parse IEs")); + sme_err("fail to parse IEs"); return eCsrStopRoaming; } if (csr_is_infra_bss_desc(pBssDesc)) { @@ -5268,8 +5232,7 @@ static eCsrJoinState csr_roam_join(tpAniSirGlobal pMac, uint32_t sessionId, */ if (csr_is_same_profile(pMac, &pSession->connectedProfile, pProfile)) { - sms_log(pMac, LOGW, - FL("detect same profile")); + sme_warn("detect same profile"); eRoamState = csr_roam_state_for_same_profile(pMac, pProfile, pSession, sessionId, @@ -5279,8 +5242,7 @@ static eCsrJoinState csr_roam_join(tpAniSirGlobal pMac, uint32_t sessionId, sessionId, eCSR_ROAM_SUBSTATE_DISASSOC_REQ, false))) { - sms_log(pMac, LOGE, - FL("fail disassoc session %d"), + sme_err("fail disassoc session %d", sessionId); eRoamState = eCsrStopRoaming; } @@ -5363,8 +5325,7 @@ static void csr_set_abort_roaming_command(tpAniSirGlobal pMac, tSmeCmd *pCommand pCommand->u.roamCmd.roamReason = eCsrLostLink3; break; default: - sms_log(pMac, LOGE, - FL(" aborting roaming reason %d not recognized"), + sme_err("aborting roaming reason %d not recognized", pCommand->u.roamCmd.roamReason); break; } @@ -5409,8 +5370,7 @@ static bool csr_roam_select_bss(tpAniSirGlobal mac_ctx, session_id, &result->BssDescriptor)) { conc_channel = csr_get_concurrent_operation_channel( mac_ctx); - sms_log(mac_ctx, LOGD, FL("csr Conc Channel = %d"), - conc_channel); + sme_debug("csr Conc Channel: %d", conc_channel); if ((conc_channel) && (conc_channel == result->BssDescriptor.channelId)) { /* @@ -5418,8 +5378,7 @@ static bool csr_roam_select_bss(tpAniSirGlobal mac_ctx, * check to pass as we don't want to connect on * other channel */ - sms_log(mac_ctx, LOGD, FL("Conc chnl match=%d"), - conc_channel); + sme_debug("Conc chnl match: %d", conc_channel); conc_channel = 0; } } @@ -5468,7 +5427,7 @@ static void csr_roam_join_handle_profile(tpAniSirGlobal mac_ctx, tDot11fBeaconIEs *ies_local = NULL; 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; } session = CSR_GET_SESSION(mac_ctx, session_id); @@ -5493,10 +5452,8 @@ static void csr_roam_join_handle_profile(tpAniSirGlobal mac_ctx, /* If roaming has stopped, don't continue the roaming command */ if (!CSR_IS_ROAMING(session) && CSR_IS_ROAMING_COMMAND(cmd)) { /* No need to complete roaming as it already complete */ - sms_log(mac_ctx, LOGD, - FL( - "Roam cmd(reason %d)aborted as roam complete"), - cmd->u.roamCmd.roamReason); + sme_debug("Roam cmd(reason %d)aborted as roam complete", + cmd->u.roamCmd.roamReason); *roam_state = eCsrStopRoaming; csr_set_abort_roaming_command(mac_ctx, cmd); return; @@ -5508,7 +5465,7 @@ static void csr_roam_join_handle_profile(tpAniSirGlobal mac_ctx, ies_local = scan_result->Result.pvIes; if (!result) { - sms_log(mac_ctx, LOGE, FL(" cannot parse IEs")); + sme_err(" cannot parse IEs"); *roam_state = eCsrStopRoaming; return; } else if (scan_result && !ies_local && @@ -5516,7 +5473,7 @@ static void csr_roam_join_handle_profile(tpAniSirGlobal mac_ctx, csr_get_parsed_bss_description_ies( mac_ctx, &result->BssDescriptor, &ies_local)))) { - sms_log(mac_ctx, LOGE, FL(" cannot parse IEs")); + sme_err(" cannot parse IEs"); *roam_state = eCsrStopRoaming; return; } @@ -5621,7 +5578,7 @@ static void csr_roam_join_handle_profile(tpAniSirGlobal mac_ctx, *roam_state = eCsrStopRoaming; } else { /* Nothing we can do */ - sms_log(mac_ctx, LOGW, FL("cannot continue without BSS list")); + sme_warn("cannot continue without BSS list"); *roam_state = eCsrStopRoaming; return; } @@ -5651,7 +5608,7 @@ static eCsrJoinState csr_roam_join_next_bss(tpAniSirGlobal mac_ctx, tCsrScanResultInfo *result = NULL; if (!session) { - sms_log(mac_ctx, LOGE, FL("session %d not found"), session_id); + sme_err("session %d not found", session_id); return eCsrStopRoaming; } @@ -5750,8 +5707,7 @@ static QDF_STATUS csr_roam(tpAniSirGlobal pMac, tSmeCmd *pCommand) status = csr_roam_issue_disassociate(pMac, sessionId, substate, false); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGW, - FL("fail issuing disassoc status = %d"), + sme_warn("fail issuing disassoc status = %d", status); /* * roam command is completed by caller in the @@ -5763,8 +5719,7 @@ static QDF_STATUS csr_roam(tpAniSirGlobal pMac, tSmeCmd *pCommand) status = csr_roam_issue_stop_bss(pMac, sessionId, eCSR_ROAM_SUBSTATE_STOP_BSS_REQ); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGW, - FL("fail issuing stop bss status = %d"), + sme_warn("fail issuing stop bss status = %d", status); /* * roam command is completed by caller in the @@ -5778,8 +5733,7 @@ static QDF_STATUS csr_roam(tpAniSirGlobal pMac, tSmeCmd *pCommand) status = csr_roam_issue_stop_bss(pMac, sessionId, substate); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGW, - FL("fail issuing stop bss status = %d"), + sme_warn("fail issuing stop bss status = %d", status); /* * roam command is completed by caller in the @@ -5825,13 +5779,13 @@ QDF_STATUS csr_process_ft_reassoc_roam_command(tpAniSirGlobal pMac, 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); return QDF_STATUS_E_FAILURE; } if (CSR_IS_ROAMING(pSession) && pSession->fCancelRoaming) { /* the roaming is cancelled. Simply complete the command */ - sms_log(pMac, LOG1, FL("Roam command canceled")); + sme_debug("Roam command canceled"); csr_roam_complete(pMac, eCsrNothingToJoin, NULL, sessionId); return QDF_STATUS_E_FAILURE; } @@ -5842,7 +5796,7 @@ QDF_STATUS csr_process_ft_reassoc_roam_command(tpAniSirGlobal pMac, pBssDesc = &pScanResult->Result.BssDescriptor; } else { /* the roaming is cancelled. Simply complete the command */ - sms_log(pMac, LOG1, FL("Roam command canceled")); + sme_debug("Roam command canceled"); csr_roam_complete(pMac, eCsrNothingToJoin, NULL, sessionId); return QDF_STATUS_E_FAILURE; } @@ -5876,7 +5830,7 @@ static QDF_STATUS csr_roam_trigger_reassociate(tpAniSirGlobal mac_ctx, status = csr_get_parsed_bss_description_ies(mac_ctx, session_ptr->pConnectBssDesc, &pIes); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, FL("fail to parse IEs")); + sme_err("fail to parse IEs"); } else { roam_info->reasonCode = eCsrRoamReasonStaCapabilityChanged; @@ -5892,14 +5846,12 @@ static QDF_STATUS csr_roam_trigger_reassociate(tpAniSirGlobal mac_ctx, eCSR_ROAM_ASSOCIATION_START, eCSR_ROAM_RESULT_NONE); - sms_log(mac_ctx, LOGD, - FL("calling csr_roam_issue_reassociate")); + sme_debug("calling csr_roam_issue_reassociate"); status = csr_roam_issue_reassociate(mac_ctx, session_id, session_ptr->pConnectBssDesc, pIes, &cmd->u.roamCmd.roamProfile); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, FL("failed status %d"), - status); + sme_err("failed status %d", status); csr_release_command(mac_ctx, cmd); } @@ -5907,8 +5859,7 @@ static QDF_STATUS csr_roam_trigger_reassociate(tpAniSirGlobal mac_ctx, pIes = NULL; } } else { - sms_log(mac_ctx, LOGE, FL - ("reassoc to same AP failed as connected BSS is NULL")); + sme_err("reassoc to same AP failed as connected BSS is NULL"); status = QDF_STATUS_E_FAILURE; } return status; @@ -5922,10 +5873,10 @@ QDF_STATUS csr_roam_process_command(tpAniSirGlobal pMac, tSmeCmd *pCommand) tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } - sms_log(pMac, LOGD, FL("Roam Reason : %d, sessionId: %d"), + sme_debug("Roam Reason: %d sessionId: %d", pCommand->u.roamCmd.roamReason, sessionId); pSession->disconnect_reason = pCommand->u.roamCmd.disconnect_reason; @@ -5933,9 +5884,8 @@ QDF_STATUS csr_roam_process_command(tpAniSirGlobal pMac, tSmeCmd *pCommand) switch (pCommand->u.roamCmd.roamReason) { case eCsrForcedDisassoc: if (eCSR_ROAMING_STATE_IDLE == pMac->roam.curState[sessionId]) { - sms_log(pMac, LOGE, - FL("Ignore eCsrForcedDisassoc cmd on roam state" - " %d"), eCSR_ROAMING_STATE_IDLE); + sme_err("Ignore eCsrForcedDisassoc cmd on roam state %d", + eCSR_ROAMING_STATE_IDLE); return QDF_STATUS_E_FAILURE; } status = csr_roam_process_disassoc_deauth(pMac, pCommand, @@ -5965,7 +5915,7 @@ QDF_STATUS csr_roam_process_command(tpAniSirGlobal pMac, tSmeCmd *pCommand) pSession, sessionId); break; case eCsrCapsChange: - sms_log(pMac, LOGE, FL("received eCsrCapsChange ")); + sme_err("received eCsrCapsChange "); csr_roam_state_change(pMac, eCSR_ROAMING_STATE_JOINING, sessionId); status = csr_roam_issue_disassociate(pMac, sessionId, @@ -5973,7 +5923,7 @@ QDF_STATUS csr_roam_process_command(tpAniSirGlobal pMac, tSmeCmd *pCommand) false); break; case eCsrSmeIssuedFTReassoc: - sms_log(pMac, LOGD, FL("received FT Reassoc Req ")); + sme_debug("received FT Reassoc Req"); status = csr_process_ft_reassoc_roam_command(pMac, pCommand); break; @@ -5989,7 +5939,7 @@ QDF_STATUS csr_roam_process_command(tpAniSirGlobal pMac, tSmeCmd *pCommand) sessionId); csr_roam_substate_change(pMac, eCSR_ROAM_SUBSTATE_DISASSOC_REQ, sessionId); - sms_log(pMac, LOGD, FL("Disassociate issued with reason: %d"), + sme_debug("Disassociate issued with reason: %d", pCommand->u.roamCmd.reason); status = csr_send_mb_disassoc_req_msg(pMac, sessionId, pCommand->u.roamCmd.peerMac, @@ -6007,7 +5957,7 @@ QDF_STATUS csr_roam_process_command(tpAniSirGlobal pMac, tSmeCmd *pCommand) break; case eCsrPerformPreauth: - sms_log(pMac, LOGD, FL("Attempting FT PreAuth Req")); + sme_debug("Attempting FT PreAuth Req"); status = csr_roam_issue_ft_preauth_req(pMac, sessionId, pCommand->u.roamCmd.pLastRoamBss); break; @@ -6034,8 +5984,7 @@ QDF_STATUS csr_roam_process_command(tpAniSirGlobal pMac, tSmeCmd *pCommand) */ status = csr_roam(pMac, pCommand); if (!QDF_IS_STATUS_SUCCESS(status)) - sms_log(pMac, LOGW, - FL("csr_roam() failed with status = 0x%08X"), + sme_warn("csr_roam() failed with status = 0x%08X", status); break; } @@ -6073,8 +6022,7 @@ void csr_roam_complete(tpAniSirGlobal mac_ctx, eCsrRoamCompleteResult Result, cmd = wlan_serialization_peek_head_active_cmd_using_psoc( mac_ctx->psoc, false); if (!cmd) { - sms_log(mac_ctx, LOGE, - FL("Roam completion called but cmd is not active")); + sme_err("Roam completion called but cmd is not active"); return; } sme_cmd = cmd->umac_cmd; @@ -6094,7 +6042,7 @@ void csr_reset_pmkid_candidate_list(tpAniSirGlobal pMac, uint32_t sessionId) { tCsrRoamSession *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); return; } qdf_mem_set(&(pSession->PmkidCandidateInfo[0]), @@ -6107,7 +6055,7 @@ void csr_reset_bkid_candidate_list(tpAniSirGlobal pMac, uint32_t sessionId) { tCsrRoamSession *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); return; } qdf_mem_set(&(pSession->BkidCandidateInfo[0]), @@ -6310,11 +6258,11 @@ static QDF_STATUS csr_roam_save_security_rsp_ie(tpAniSirGlobal pMac, tDot11fBeaconIEs *pIesLocal = pIes; if (!pSession) { - sms_log(pMac, LOGE, FL("session %d not found"), sessionId); + sme_err("session %d not found", sessionId); return QDF_STATUS_E_FAILURE; } - sms_log(pMac, LOGD, FL("authType %d session %d"), authType, sessionId); + sme_debug("authType %d session %d", authType, sessionId); if ((eCSR_AUTH_TYPE_WPA == authType) || (eCSR_AUTH_TYPE_WPA_PSK == authType) || (eCSR_AUTH_TYPE_RSN == authType) || @@ -6333,7 +6281,7 @@ static QDF_STATUS csr_roam_save_security_rsp_ie(tpAniSirGlobal pMac, if (!pIesLocal && !QDF_IS_STATUS_SUCCESS (csr_get_parsed_bss_description_ies(pMac, pSirBssDesc, &pIesLocal))) - sms_log(pMac, LOGE, FL(" cannot parse IEs")); + sme_err(" cannot parse IEs"); if (pIesLocal) { status = csr_roam_save_params(pMac, pSession, authType, pIes, pIesLocal); @@ -6500,14 +6448,13 @@ static void csr_roam_process_results_default(tpAniSirGlobal mac_ctx, QDF_STATUS status; 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; } session = CSR_GET_SESSION(mac_ctx, session_id); - sms_log(mac_ctx, LOGD, FL("receives no association indication")); - sms_log(mac_ctx, LOGD, FL("Assoc ref count %d"), - session->bRefAssocStartCnt); + sme_debug("receives no association indication"); + sme_debug("Assoc ref count: %d", session->bRefAssocStartCnt); if (CSR_IS_INFRASTRUCTURE(&session->connectedProfile) || CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(mac_ctx, session_id)) { /* @@ -6573,8 +6520,7 @@ static void csr_roam_process_results_default(tpAniSirGlobal mac_ctx, eCSR_ROAM_ASSOCIATION_FAILURE, eCSR_ROAM_RESULT_FAILURE); } - sms_log(mac_ctx, LOGD, FL("roam(reason %d) failed"), - cmd->u.roamCmd.roamReason); + sme_debug("roam(reason %d) failed", cmd->u.roamCmd.roamReason); #ifndef WLAN_MDM_CODE_REDUCTION_OPT sme_qos_update_hand_off((uint8_t) session_id, false); sme_qos_csr_event_ind(mac_ctx, (uint8_t) session_id, @@ -6621,8 +6567,7 @@ static void csr_roam_process_results_default(tpAniSirGlobal mac_ctx, csr_roam_link_down(mac_ctx, session_id); if (mac_ctx->roam.deauthRspStatus == eSIR_SME_DEAUTH_STATUS) { - sms_log(mac_ctx, LOGW, - FL("FW still in connected state")); + sme_warn("FW still in connected state"); break; } break; @@ -6719,7 +6664,7 @@ static void csr_roam_process_start_bss_success(tpAniSirGlobal mac_ctx, #endif 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; } session = CSR_GET_SESSION(mac_ctx, session_id); @@ -6733,7 +6678,7 @@ static void csr_roam_process_start_bss_success(tpAniSirGlobal mac_ctx, * to return the Bss Description that we start beaconing for the newly * started Ibss. */ - sms_log(mac_ctx, LOGD, FL("receives start BSS ok indication")); + sme_debug("receives start BSS ok indication"); status = QDF_STATUS_E_FAILURE; start_bss_rsp = (tSirSmeStartBssRsp *) context; qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); @@ -6762,7 +6707,7 @@ static void csr_roam_process_start_bss_success(tpAniSirGlobal mac_ctx, if (!QDF_IS_STATUS_SUCCESS (csr_get_parsed_bss_description_ies(mac_ctx, bss_desc, &ies_ptr))) { - sms_log(mac_ctx, LOGW, FL("cannot parse IBSS IEs")); + sme_warn("cannot parse IBSS IEs"); roam_info.pBssDesc = bss_desc; csr_roam_call_callback(mac_ctx, session_id, &roam_info, cmd->u.roamCmd.roamId, eCSR_ROAM_IBSS_IND, @@ -6940,7 +6885,7 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, uint32_t len; 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; } session = CSR_GET_SESSION(mac_ctx, session_id); @@ -6953,7 +6898,7 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, roam_info.reassoc = false; ind_qos = SME_QOS_CSR_ASSOC_COMPLETE; } - sms_log(mac_ctx, LOGW, FL("receives association indication")); + sme_debug("receives association indication"); qdf_mem_set(&roam_info, sizeof(roam_info), 0); /* always free the memory here */ if (session->pWpaRsnRspIE) { @@ -7061,8 +7006,7 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, false, true, eSIR_TX_RX, 0, 0, NULL, 0))) { /* NO keys. these key parameters don't matter */ - sms_log(mac_ctx, LOGE, - FL("Set context for unicast fail")); + sme_err("Set context for unicast fail"); csr_roam_substate_change(mac_ctx, eCSR_ROAM_SUBSTATE_NONE, session_id); } @@ -7113,8 +7057,7 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, mac_ctx, key_timeout_interval)) ) { /* Reset state so nothing is blocked. */ - sms_log(mac_ctx, LOGE, FL - ("Failed preauth timer start")); + sme_err("Failed preauth timer start"); csr_roam_substate_change(mac_ctx, eCSR_ROAM_SUBSTATE_NONE, session_id); @@ -7187,8 +7130,7 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, roam_info.tdls_prohibited = join_rsp->tdls_prohibited; roam_info.tdls_chan_swit_prohibited = join_rsp->tdls_chan_swit_prohibited; - sms_log(mac_ctx, LOGD, - FL("tdls:prohibit: %d, chan_swit_prohibit: %d"), + sme_debug("tdls:prohibit: %d chan_swit_prohibit: %d", roam_info.tdls_prohibited, roam_info.tdls_chan_swit_prohibited); #endif @@ -7253,7 +7195,7 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, * this???? */ if (conn_profile->modifyProfileFields.uapsd_mask) { - sms_log(mac_ctx, LOGE, + sme_err( " uapsd_mask (0x%X) set, request UAPSD now", conn_profile->modifyProfileFields.uapsd_mask); sme_ps_start_uapsd(mac_ctx, session_id, @@ -7282,8 +7224,7 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, csr_reset_bkid_candidate_list(mac_ctx, session_id); #endif } else { - sms_log(mac_ctx, LOGW, - "Roam command doesn't have a BSS desc"); + sme_warn("Roam command doesn't have a BSS desc"); } /* Not to signal link up because keys are yet to be set. * The linkup function will overwrite the sub-state that @@ -7328,10 +7269,11 @@ static bool csr_roam_process_results(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, tSirSmeStartBssRsp *start_bss_rsp = NULL; if (!session) { - sms_log(mac_ctx, LOGE, FL("session %d not found "), session_id); + sme_err("session %d not found ", session_id); return false; } - sms_log(mac_ctx, LOGD, FL("Processing ROAM results...")); + + sme_debug("Processing ROAM results..."); switch (res) { case eCsrJoinSuccess: case eCsrReassocSuccess: @@ -7379,7 +7321,7 @@ static bool csr_roam_process_results(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, * We are here because we try to start the same IBSS. * No message to PE. return the roaming state to Joined. */ - sms_log(mac_ctx, LOGW, FL("receives silently stop roam ind")); + sme_debug("receives silently stop roam ind"); csr_roam_state_change(mac_ctx, eCSR_ROAMING_STATE_JOINED, session_id); csr_roam_substate_change(mac_ctx, eCSR_ROAM_SUBSTATE_NONE, @@ -7402,8 +7344,7 @@ static bool csr_roam_process_results(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, case eCsrSilentlyStopRoamingSaveState: /* We are here because we try to connect to the same AP */ /* No message to PE */ - sms_log(mac_ctx, LOGW, - FL("receives silently stop roaming indication")); + sme_debug("receives silently stop roaming indication"); qdf_mem_set(&roam_info, sizeof(roam_info), 0); /* to aviod resetting the substate to NONE */ @@ -7684,9 +7625,8 @@ QDF_STATUS csr_roam_copy_connected_profile(tpAniSirGlobal pMac, pDstProfile->BSSIDs.bssid = qdf_mem_malloc(sizeof(struct qdf_mac_addr)); if (NULL == pDstProfile->BSSIDs.bssid) { status = QDF_STATUS_E_NOMEM; - sms_log(pMac, LOGE, - FL("failed to allocate memory for BSSID " - MAC_ADDRESS_STR), + sme_err("failed to allocate memory for BSSID " + MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pSrcProfile->bssid.bytes)); goto end; } @@ -7698,9 +7638,8 @@ QDF_STATUS csr_roam_copy_connected_profile(tpAniSirGlobal pMac, qdf_mem_malloc(sizeof(tCsrSSIDInfo)); if (NULL == pDstProfile->SSIDs.SSIDList) { status = QDF_STATUS_E_NOMEM; - sms_log(pMac, LOGE, - FL("failed to allocate memory for SSID " - MAC_ADDRESS_STR), + sme_err("failed to allocate memory for SSID " + MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pSrcProfile->bssid.bytes)); goto end; } @@ -7717,8 +7656,7 @@ QDF_STATUS csr_roam_copy_connected_profile(tpAniSirGlobal pMac, qdf_mem_malloc(pSrcProfile->nAddIEAssocLength); if (NULL == pDstProfile->pAddIEAssoc) { status = QDF_STATUS_E_NOMEM; - sms_log(pMac, LOGE, - FL("failed to allocate mem for additional ie")); + sme_err("failed to allocate mem for additional ie"); goto end; } pDstProfile->nAddIEAssocLength = pSrcProfile->nAddIEAssocLength; @@ -7780,7 +7718,7 @@ QDF_STATUS csr_roam_issue_connect(tpAniSirGlobal pMac, uint32_t sessionId, pCommand = csr_get_command_buffer(pMac); if (NULL == pCommand) { - sms_log(pMac, LOGE, FL(" fail to get command buffer")); + sme_err(" fail to get command buffer"); status = QDF_STATUS_E_RESOURCES; } else { if (fClearScan) { @@ -7819,15 +7757,12 @@ QDF_STATUS csr_roam_issue_connect(tpAniSirGlobal pMac, uint32_t sessionId, /* We need to free the BssList when the command is done */ pCommand->u.roamCmd.fReleaseBssList = true; pCommand->u.roamCmd.fUpdateCurRoamProfile = true; - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - FL("phymode: %d, cbmode: %d, CSR PERSONA=%d"), - pCommand->u.roamCmd.roamProfile.phyMode, - pCommand->u.roamCmd.roamProfile.CBMode, + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + FL("CSR PERSONA=%d"), pCommand->u.roamCmd.roamProfile.csrPersona); status = csr_queue_sme_command(pMac, pCommand, fImediate); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL(" fail to send message status = %d"), status); + sme_err(" fail to send message status = %d", status); csr_release_command(pMac, pCommand); } } @@ -7846,7 +7781,7 @@ QDF_STATUS csr_roam_issue_reassoc(tpAniSirGlobal pMac, uint32_t sessionId, pCommand = csr_get_command_buffer(pMac); if (NULL == pCommand) { - sms_log(pMac, LOGE, FL(" fail to get command buffer")); + sme_err(" fail to get command buffer"); status = QDF_STATUS_E_RESOURCES; } else { csr_scan_abort_mac_scan_not_for_connect(pMac, sessionId); @@ -7884,8 +7819,7 @@ QDF_STATUS csr_roam_issue_reassoc(tpAniSirGlobal pMac, uint32_t sessionId, reason); status = csr_queue_sme_command(pMac, pCommand, fImediate); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL(" fail to send message status = %d"), status); + sme_err(" fail to send message status = %d", status); csr_roam_completion(pMac, sessionId, NULL, pCommand, eCSR_ROAM_RESULT_FAILURE, false); csr_release_command(pMac, pCommand); @@ -7904,7 +7838,7 @@ QDF_STATUS csr_dequeue_roam_command(tpAniSirGlobal pMac, eCsrRoamReason reason, pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link); if ((eSmeCommandRoam == pCommand->command) && (eCsrPerformPreauth == reason)) { - sms_log(pMac, LOGD, FL("DQ-Command = %d, Reason = %d"), + sme_debug("DQ-Command = %d, Reason = %d", pCommand->command, pCommand->u.roamCmd.roamReason); if (csr_nonscan_active_ll_remove_entry(pMac, pEntry, @@ -7913,7 +7847,7 @@ QDF_STATUS csr_dequeue_roam_command(tpAniSirGlobal pMac, eCsrRoamReason reason, } } else if ((eSmeCommandRoam == pCommand->command) && (eCsrSmeIssuedFTReassoc == reason)) { - sms_log(pMac, LOGD, FL("DQ-Command = %d, Reason = %d"), + sme_debug("DQ-Command = %d, Reason = %d", pCommand->command, pCommand->u.roamCmd.roamReason); if (csr_nonscan_active_ll_remove_entry(pMac, pEntry, @@ -7921,13 +7855,12 @@ QDF_STATUS csr_dequeue_roam_command(tpAniSirGlobal pMac, eCsrRoamReason reason, csr_release_command(pMac, pCommand); } } else { - sms_log(pMac, LOGE, FL("Command = %d, Reason = %d "), + sme_err("Command = %d, Reason = %d ", pCommand->command, pCommand->u.roamCmd.roamReason); } } else { - sms_log(pMac, LOGE, - FL("pEntry NULL for eWNI_SME_FT_PRE_AUTH_RSP")); + sme_err("pEntry NULL for eWNI_SME_FT_PRE_AUTH_RSP"); } return QDF_STATUS_SUCCESS; } @@ -7945,20 +7878,19 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId, tSirBssDescription first_ap_profile; if (NULL == pSession) { - sms_log(pMac, LOGE, - FL("session does not exist for given sessionId:%d"), + sme_err("session does not exist for given sessionId: %d", sessionId); return QDF_STATUS_E_FAILURE; } if (NULL == pProfile) { - sms_log(pMac, LOGP, FL("No profile specified")); + sme_err("No profile specified"); return QDF_STATUS_E_FAILURE; } /* Initialize the count before proceeding with the Join requests */ pSession->join_bssid_count = 0; - sms_log(pMac, LOGD, - FL("called BSSType = %s (%d) authtype = %d encryType = %d"), + sme_debug( + "called BSSType = %s (%d) authtype = %d encryType = %d", sme_bss_type_to_string(pProfile->BSSType), pProfile->BSSType, pProfile->AuthType.authType[0], pProfile->EncryptionType.encryptionType[0]); @@ -8028,13 +7960,12 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId, status = csr_roam_issue_connect(pMac, sessionId, pProfile, NULL, eCsrHddIssued, roamId, false, false); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL("CSR failed to issue start BSS cmd with status = 0x%08X"), + sme_err( + "CSR failed to issue start BSS cmd with status = 0x%08X", status); fCallCallback = true; } else { - sms_log(pMac, LOGD, - FL("Connect request to proceed for sap mode")); + sme_debug("Connect request to proceed for sap mode"); } csr_free_scan_filter(pMac, pScanFilter); @@ -8042,8 +7973,8 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId, goto end; } status = csr_scan_get_result(pMac, pScanFilter, &hBSSList); - sms_log(pMac, LOGD, - FL("******* csr_scan_get_result Status ****** %d"), status); + sme_debug( + "******* csr_scan_get_result Status ****** %d", status); if (QDF_IS_STATUS_SUCCESS(status)) { /* check if set hw mode needs to be done */ if ((pScanFilter->csrPersona == QDF_STA_MODE) || @@ -8054,13 +7985,12 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId, sessionId, first_ap_profile.channelId); if ((QDF_IS_STATUS_SUCCESS(status)) && (!csr_wait_for_connection_update(pMac, true))) { - sms_log(pMac, LOGD, - FL("conn update error")); + sme_debug("conn update error"); csr_scan_result_purge(pMac, hBSSList); fCallCallback = true; goto error; } else if (status == QDF_STATUS_E_FAILURE) { - sms_log(pMac, LOGD, FL("conn update error")); + sme_debug("conn update error"); csr_scan_result_purge(pMac, hBSSList); fCallCallback = true; goto error; @@ -8070,8 +8000,8 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId, status = csr_roam_issue_connect(pMac, sessionId, pProfile, hBSSList, eCsrHddIssued, roamId, false, false); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL("CSR failed to issue connect cmd with status = 0x%08X"), + sme_err( + "CSR failed to issue connect cmd with status = 0x%08X", status); csr_scan_result_purge(pMac, hBSSList); fCallCallback = true; @@ -8084,8 +8014,7 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId, pProfile, NULL, eCsrHddIssued, roamId, false, false); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL("Failed with status = 0x%08X"), + sme_err("Failed with status = 0x%08X", status); fCallCallback = true; } @@ -8094,13 +8023,12 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId, status = csr_scan_for_ssid(pMac, sessionId, pProfile, roamId, true); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL("CSR failed to issue SSID scan cmd with status = 0x%08X"), + sme_err( + "CSR failed to issue SSID scan cmd with status = 0x%08X", status); fCallCallback = true; } else { - sms_log(pMac, LOGD, - FL("SSID scan requested")); + sme_debug("SSID scan requested"); } } } else { @@ -8147,11 +8075,11 @@ csr_roam_reassoc(tpAniSirGlobal mac_ctx, uint32_t session_id, tCsrRoamSession *session = CSR_GET_SESSION(mac_ctx, session_id); if (NULL == profile) { - sms_log(mac_ctx, LOGP, FL("No profile specified")); + sme_err("No profile specified"); return QDF_STATUS_E_FAILURE; } - sms_log(mac_ctx, LOGD, - FL("called BSSType = %s (%d) authtype = %d encryType = %d"), + sme_debug( + "called BSSType = %s (%d) authtype = %d encryType = %d", sme_bss_type_to_string(profile->BSSType), profile->BSSType, profile->AuthType.authType[0], profile->EncryptionType.encryptionType[0]); @@ -8172,23 +8100,23 @@ csr_roam_reassoc(tpAniSirGlobal mac_ctx, uint32_t session_id, * Connected SSID did not match with what is * asked in profile */ - sms_log(mac_ctx, LOGD, FL("SSID mismatch")); + sme_debug("SSID mismatch"); } } else if (qdf_mem_cmp(&mod_fields, &session->connectedProfile.modifyProfileFields, sizeof(tCsrRoamModifyProfileFields))) { fCallCallback = false; } else { - sms_log(mac_ctx, LOGD, + sme_debug( /* * Either the profile is NULL or none of the * fields in tCsrRoamModifyProfileFields got * modified */ - FL("Profile NULL or nothing to modify.")); + "Profile NULL or nothing to modify"); } } else { - sms_log(mac_ctx, LOGD, FL("Not connected! No need to reassoc")); + sme_debug("Not connected! No need to reassoc"); } if (!fCallCallback) { roamId = GET_NEXT_ROAM_ID(&mac_ctx->roam); @@ -8216,7 +8144,7 @@ static QDF_STATUS csr_roam_join_last_profile(tpAniSirGlobal pMac, tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } @@ -8265,7 +8193,7 @@ static QDF_STATUS csr_roam_join_last_profile(tpAniSirGlobal pMac, } } /* We have a profile */ else { - sms_log(pMac, LOGW, FL("cannot find a roaming profile")); + sme_warn("cannot find a roaming profile"); goto end; } end: @@ -8297,7 +8225,7 @@ QDF_STATUS csr_roam_reconnect(tpAniSirGlobal pMac, uint32_t sessionId) QDF_STATUS csr_roam_connect_to_last_profile(tpAniSirGlobal pMac, uint32_t sessionId) { QDF_STATUS status = QDF_STATUS_E_FAILURE; - sms_log(pMac, LOGW, FL("is called")); + csr_roam_cancel_roaming(pMac, sessionId); csr_roam_remove_duplicate_command(pMac, sessionId, NULL, eCsrHddIssued); if (csr_is_conn_state_disconnected(pMac, sessionId)) { @@ -8315,9 +8243,9 @@ QDF_STATUS csr_roam_process_disassoc_deauth(tpAniSirGlobal pMac, tSmeCmd *pComma uint32_t sessionId = pCommand->sessionId; if (CSR_IS_WAIT_FOR_KEY(pMac, sessionId)) { - sms_log(pMac, LOGD, - FL(" Stop Wait for key timer and change substate to" - " eCSR_ROAM_SUBSTATE_NONE")); + sme_debug( + " Stop Wait for key timer and change substate to" + " eCSR_ROAM_SUBSTATE_NONE"); csr_roam_stop_wait_for_key_timer(pMac); csr_roam_substate_change(pMac, eCSR_ROAM_SUBSTATE_NONE, sessionId); } @@ -8344,9 +8272,8 @@ QDF_STATUS csr_roam_process_disassoc_deauth(tpAniSirGlobal pMac, tSmeCmd *pComma && (eSIR_MAC_DISASSOC_LEAVING_BSS_REASON == pCommand->u.roamCmd.reason)) { NewSubstate = eCSR_ROAM_SUBSTATE_DISASSOC_STA_HAS_LEFT; - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - FL - ("set to substate eCSR_ROAM_SUBSTATE_DISASSOC_STA_HAS_LEFT")); + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + "set to substate eCSR_ROAM_SUBSTATE_DISASSOC_STA_HAS_LEFT"); } if (eCsrSmeIssuedDisassocForHandoff != pCommand->u.roamCmd.roamReason) { @@ -8405,7 +8332,7 @@ QDF_STATUS csr_roam_process_disassoc_deauth(tpAniSirGlobal pMac, tSmeCmd *pComma eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED; } } else { - sms_log(pMac, LOGW, FL(" failed with status %d"), status); + sme_warn(" failed with status %d", status); } return status; } @@ -8427,7 +8354,7 @@ QDF_STATUS csr_prepare_disconnect_command(tpAniSirGlobal mac, command = csr_get_command_buffer(mac); if (!command) { - sms_log(mac, LOGE, FL("fail to get command buffer")); + sme_err("fail to get command buffer"); return QDF_STATUS_E_RESOURCES; } @@ -8447,7 +8374,7 @@ QDF_STATUS csr_roam_issue_disassociate_cmd(tpAniSirGlobal pMac, uint32_t session do { pCommand = csr_get_command_buffer(pMac); if (!pCommand) { - sms_log(pMac, LOGE, FL(" fail to get command buffer")); + sme_err(" fail to get command buffer"); status = QDF_STATUS_E_RESOURCES; break; } @@ -8459,8 +8386,8 @@ QDF_STATUS csr_roam_issue_disassociate_cmd(tpAniSirGlobal pMac, uint32_t session } pCommand->command = eSmeCommandRoam; pCommand->sessionId = (uint8_t) sessionId; - sms_log(pMac, LOGD, - FL("Disassociate reason: %d, sessionId: %d"), + sme_debug( + "Disassociate reason: %d, sessionId: %d", reason, sessionId); switch (reason) { case eCSR_DISCONNECT_REASON_MIC_ERROR: @@ -8492,8 +8419,8 @@ QDF_STATUS csr_roam_issue_disassociate_cmd(tpAniSirGlobal pMac, uint32_t session pCommand->u.roamCmd.roamReason = eCsrForcedDisassoc; pCommand->u.roamCmd.reason = eSIR_MAC_DISASSOC_LEAVING_BSS_REASON; - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - FL("SME convert to internal reason code eCsrStaHasLeft")); + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + "SME convert to internal reason code eCsrStaHasLeft"); break; case eCSR_DISCONNECT_REASON_NDI_DELETE: pCommand->u.roamCmd.roamReason = eCsrStopBss; @@ -8505,8 +8432,7 @@ QDF_STATUS csr_roam_issue_disassociate_cmd(tpAniSirGlobal pMac, uint32_t session pCommand->u.roamCmd.disconnect_reason = reason; status = csr_queue_sme_command(pMac, pCommand, true); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL(" fail to send message status = %d"), status); + sme_err("fail to send message status = %d", status); csr_release_command(pMac, pCommand); } } while (0); @@ -8531,12 +8457,11 @@ QDF_STATUS csr_roam_issue_stop_bss_cmd(tpAniSirGlobal pMac, uint32_t sessionId, pCommand->u.roamCmd.roamReason = eCsrStopBss; status = csr_queue_sme_command(pMac, pCommand, fHighPriority); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL(" fail to send message status = %d"), status); + sme_err("fail to send message status = %d", status); csr_release_command(pMac, pCommand); } } else { - sms_log(pMac, LOGE, FL(" fail to get command buffer")); + sme_err(" fail to get command buffer"); status = QDF_STATUS_E_RESOURCES; } return status; @@ -8549,7 +8474,7 @@ QDF_STATUS csr_roam_disconnect_internal(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } #ifdef FEATURE_WLAN_BTAMP_UT_RF @@ -8563,7 +8488,7 @@ QDF_STATUS csr_roam_disconnect_internal(tpAniSirGlobal pMac, uint32_t sessionId, || csr_is_bss_type_ibss(pSession->connectedProfile.BSSType) || csr_is_roam_command_waiting_for_session(pMac, sessionId) || CSR_IS_CONN_NDI(&pSession->connectedProfile)) { - sms_log(pMac, LOGD, FL("called")); + sme_debug("called"); status = csr_roam_issue_disassociate_cmd(pMac, sessionId, reason); } else { @@ -8571,10 +8496,9 @@ QDF_STATUS csr_roam_disconnect_internal(tpAniSirGlobal pMac, uint32_t sessionId, eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTING; csr_scan_abort_scan_for_ssid(pMac, sessionId); status = QDF_STATUS_CMD_NOT_QUEUED; - sms_log(pMac, LOGD, - FL - (" Disconnect cmd not queued, Roam command is not present" - " return with status %d"), status); + sme_debug( + " Disconnect cmd not queued, Roam command is not present" + " return with status %d", status); } return status; } @@ -8585,7 +8509,7 @@ QDF_STATUS csr_roam_disconnect(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } @@ -8611,11 +8535,11 @@ QDF_STATUS csr_roam_save_connected_infomation(tpAniSirGlobal pMac, pSession = CSR_GET_SESSION(pMac, sessionId); if (NULL == pSession) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("session %d not found"), sessionId); + "session %d not found", sessionId); return QDF_STATUS_E_FAILURE; } - sms_log(pMac, LOGD, FL("session id %d"), sessionId); + sme_debug("session id %d", sessionId); pConnectProfile = &pSession->connectedProfile; if (pConnectProfile->pAddIEAssoc) { qdf_mem_free(pConnectProfile->pAddIEAssoc); @@ -8650,8 +8574,8 @@ QDF_STATUS csr_roam_save_connected_infomation(tpAniSirGlobal pMac, else status = QDF_STATUS_SUCCESS; if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL("Failed to allocate memory for IE")); + sme_err( + "Failed to allocate memory for IE"); return QDF_STATUS_E_FAILURE; } pConnectProfile->nAddIEAssocLength = @@ -8670,13 +8594,13 @@ QDF_STATUS csr_roam_save_connected_infomation(tpAniSirGlobal pMac, pConnectProfile->CBMode = csr_get_cb_mode_from_ies(pMac, pSirBssDesc->channelId, pIes); else - sms_log(pMac, LOGE, FL("IE unavailable to derive CB mode")); + sme_err("IE unavailable to derive CB mode"); /* Save bssid */ pConnectProfile->operationChannel = pSirBssDesc->channelId; pConnectProfile->beaconInterval = pSirBssDesc->beaconInterval; if (!pConnectProfile->beaconInterval) { - sms_log(pMac, LOGW, FL("ERROR: Beacon interval is ZERO")); + sme_err("ERROR: Beacon interval is ZERO"); } csr_get_bss_id_bss_desc(pMac, pSirBssDesc, &pConnectProfile->bssid); if (pSirBssDesc->mdiePresent) { @@ -8794,7 +8718,7 @@ static void csr_roam_join_rsp_processor(tpAniSirGlobal pMac, } if (!session_ptr) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("session %d not found"), pSmeJoinRsp->sessionId); + ("session %d not found"), pSmeJoinRsp->sessionId); return; } /* The head of the active list is the request we sent */ @@ -8814,8 +8738,8 @@ static void csr_roam_join_rsp_processor(tpAniSirGlobal pMac, session_ptr->supported_nss_1x1 = pSmeJoinRsp->supported_nss_1x1; - sms_log(pMac, LOGD, - FL("SME session supported nss: %d"), + sme_debug( + "SME session supported nss: %d", session_ptr->supported_nss_1x1); /* * @@ -8839,7 +8763,7 @@ static void csr_roam_join_rsp_processor(tpAniSirGlobal pMac, pSmeJoinRsp->statusCode; session_ptr->joinFailStatusCode.reasonCode = pSmeJoinRsp->protStatusCode; - sms_log(pMac, LOGW, + sme_warn( "SmeJoinReq failed with statusCode= 0x%08X [%d]", pSmeJoinRsp->statusCode, pSmeJoinRsp->statusCode); /* If Join fails while Handoff is in progress, indicate disassociated event to supplicant to reconnect */ @@ -8876,12 +8800,12 @@ static void csr_roam_join_rsp_processor(tpAniSirGlobal pMac, CSR_MAX_BSSID_COUNT) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("Excessive Join Req Failures")); + "Excessive Join Req Failures"); if (is_dis_pending) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("disconnect is pending, complete roam")); + "disconnect is pending, complete roam"); if (session_ptr->bRefAssocStartCnt) session_ptr->bRefAssocStartCnt--; @@ -8906,7 +8830,7 @@ static QDF_STATUS csr_roam_issue_join(tpAniSirGlobal pMac, uint32_t sessionId, uint32_t roamId) { QDF_STATUS status; - sms_log(pMac, LOGD, "Attempting to Join Bssid= " MAC_ADDRESS_STR, + sme_debug("Attempting to Join Bssid= " MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pSirBssDesc->bssId)); /* Set the roaming substate to 'join attempt'... */ @@ -8929,20 +8853,20 @@ csr_roam_reissue_roam_command(tpAniSirGlobal pMac, uint8_t session_id) pEntry = csr_nonscan_active_ll_peek_head(pMac, LL_ACCESS_LOCK); if (NULL == pEntry) { - sms_log(pMac, LOGE, - FL("Disassoc rsp can't continue, no active CMD")); + sme_err( + "Disassoc rsp can't continue, no active CMD"); return; } pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link); if (eSmeCommandRoam != pCommand->command) { - sms_log(pMac, LOGW, FL("Active cmd, is not a roaming CMD")); + sme_err("Active cmd, is not a roaming CMD"); return; } sessionId = pCommand->sessionId; 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); return; } @@ -8960,8 +8884,7 @@ csr_roam_reissue_roam_command(tpAniSirGlobal pMac, uint8_t session_id) } if (eCsrStopRoaming == csr_roam_join_next_bss(pMac, pCommand, true)) { - sms_log(pMac, LOGW, - FL("Failed to reissue join command")); + sme_warn("Failed to reissue join command"); csr_roam_complete(pMac, eCsrNothingToJoin, NULL, session_id); } @@ -8979,8 +8902,7 @@ csr_roam_reissue_roam_command(tpAniSirGlobal pMac, uint8_t session_id) if (!QDF_IS_STATUS_SUCCESS(csr_roam_issue_stop_bss(pMac, sessionId, eCSR_ROAM_SUBSTATE_STOP_BSS_REQ))) { - sms_log(pMac, LOGE, - FL("Failed to reissue stop_bss command for WDS")); + sme_err("Failed to reissue stop_bss command for WDS"); csr_roam_complete(pMac, eCsrNothingToJoin, NULL, session_id); } } @@ -9068,20 +8990,20 @@ csr_roaming_state_config_cnf_processor(tpAniSirGlobal mac_ctx, QDF_STATUS status = QDF_STATUS_E_FAILURE; if (NULL == cmd) { - sms_log(mac_ctx, LOGE, FL("given sme cmd is null")); + sme_err("given sme cmd is null"); return; } session_id = cmd->sessionId; 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; } if (CSR_IS_ROAMING(session) && session->fCancelRoaming) { /* the roaming is cancelled. Simply complete the command */ - sms_log(mac_ctx, LOGW, FL("Roam command canceled")); + sme_warn("Roam command canceled"); csr_roam_complete(mac_ctx, eCsrNothingToJoin, NULL, sme_session_id); return; @@ -9090,8 +9012,8 @@ csr_roaming_state_config_cnf_processor(tpAniSirGlobal mac_ctx, /* If the roaming has stopped, not to continue the roaming command */ if (!CSR_IS_ROAMING(session) && CSR_IS_ROAMING_COMMAND(cmd)) { /* No need to complete roaming here as it already completes */ - sms_log(mac_ctx, LOGW, - FL("Roam cmd (reason %d) aborted(roaming completed)"), + sme_warn( + "Roam cmd (reason %d) aborted(roaming completed)", cmd->u.roamCmd.roamReason); csr_set_abort_roaming_command(mac_ctx, cmd); csr_roam_complete(mac_ctx, eCsrNothingToJoin, NULL, @@ -9122,7 +9044,7 @@ csr_roaming_state_config_cnf_processor(tpAniSirGlobal mac_ctx, } /* we have active entry */ - sms_log(mac_ctx, LOGD, "Cfg sequence complete"); + sme_debug("Cfg sequence complete"); /* * Successfully set the configuration parameters for the new Bss. * Attempt to join the roaming Bss @@ -9141,7 +9063,7 @@ csr_roaming_state_config_cnf_processor(tpAniSirGlobal mac_ctx, &cmd->u.roamCmd.roamProfile, bss_desc, cmd->u.roamCmd.roamId))) { - sms_log(mac_ctx, LOGE, FL("CSR start BSS failed")); + sme_err("CSR start BSS failed"); /* We need to complete the command */ csr_roam_complete(mac_ctx, eCsrStartBssFailure, NULL, sme_session_id); @@ -9150,7 +9072,7 @@ csr_roaming_state_config_cnf_processor(tpAniSirGlobal mac_ctx, } if (!cmd->u.roamCmd.pRoamBssEntry) { - sms_log(mac_ctx, LOGE, FL("pRoamBssEntry is NULL")); + sme_err("pRoamBssEntry is NULL"); /* We need to complete the command */ csr_roam_complete(mac_ctx, eCsrJoinFailure, NULL, sme_session_id); @@ -9164,8 +9086,7 @@ csr_roaming_state_config_cnf_processor(tpAniSirGlobal mac_ctx, } if (!csr_is_infra_bss_desc(bss_desc)) { - sms_log(mac_ctx, LOGW, - FL("found BSSType mismatching the one in BSS descp")); + sme_warn("found BSSType mismatching the one in BSS descp"); return; } @@ -9264,13 +9185,13 @@ static void csr_roam_roaming_state_reassoc_rsp_processor(tpAniSirGlobal pMac, if (eSIR_SME_SUCCESS == pSmeJoinRsp->statusCode) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - FL("CSR SmeReassocReq Successful")); + "CSR SmeReassocReq Successful"); result = eCsrReassocSuccess; csr_session = CSR_GET_SESSION(pMac, pSmeJoinRsp->sessionId); if (NULL != csr_session) { csr_session->supported_nss_1x1 = pSmeJoinRsp->supported_nss_1x1; - sms_log(pMac, LOGD, FL("SME session supported nss: %d"), + sme_debug("SME session supported nss: %d", csr_session->supported_nss_1x1); } /* @@ -9292,7 +9213,7 @@ static void csr_roam_roaming_state_reassoc_rsp_processor(tpAniSirGlobal pMac, /* Should we handle this similar to handling the join failure? Is it ok * to call csr_roam_complete() with state as CsrJoinFailure */ else { - sms_log(pMac, LOGW, + sme_warn( "CSR SmeReassocReq failed with statusCode= 0x%08X [%d]", pSmeJoinRsp->statusCode, pSmeJoinRsp->statusCode); result = eCsrReassocFailure; @@ -9394,7 +9315,7 @@ csr_dequeue_command(tpAniSirGlobal mac_ctx) tListElem *entry = csr_nonscan_active_ll_peek_head(mac_ctx, LL_ACCESS_LOCK); if (!entry) { - sms_log(mac_ctx, LOGE, FL("NO commands are active")); + sme_err("NO commands are active"); return; } @@ -9404,7 +9325,7 @@ csr_dequeue_command(tpAniSirGlobal mac_ctx) * and put this on the Free queue. */ if (eSmeCommandRoam != cmd->command) { - sms_log(mac_ctx, LOGE, FL("Roam command not active")); + sme_err("Roam command not active"); return; } /* @@ -9421,7 +9342,7 @@ csr_dequeue_command(tpAniSirGlobal mac_ctx) if (fRemoveCmd) csr_release_command(mac_ctx, cmd); else - sms_log(mac_ctx, LOGE, FL("fail to remove cmd reason %d"), + sme_err("fail to remove cmd reason %d", cmd->u.roamCmd.roamReason); } @@ -9468,8 +9389,8 @@ csr_post_roam_failure(tpAniSirGlobal mac_ctx, status = csr_roam_issue_disassociate(mac_ctx, session_id, eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, false); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("csr_roam_issue_disassociate failed, status %d"), + sme_err( + "csr_roam_issue_disassociate failed, status %d", status); csr_roam_complete(mac_ctx, eCsrJoinFailure, NULL, session_id); } @@ -9494,7 +9415,7 @@ csr_check_profile_in_scan_cache(tpAniSirGlobal mac_ctx, QDF_STATUS status; *scan_filter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); if (NULL == *scan_filter) { - sms_log(mac_ctx, LOGE, FL("alloc for ScanFilter failed.")); + sme_err("alloc for ScanFilter failed"); return false; } (*scan_filter)->scan_filter_for_roam = 1; @@ -9502,15 +9423,15 @@ csr_check_profile_in_scan_cache(tpAniSirGlobal mac_ctx, &neighbor_roam_info->csrNeighborRoamProfile, *scan_filter); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("failed to prepare scan filter, status %d"), + sme_err( + "failed to prepare scan filter, status %d", status); return false; } status = csr_scan_get_result(mac_ctx, *scan_filter, hBSSList); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("csr_scan_get_result failed, status %d"), + sme_err( + "csr_scan_get_result failed, status %d", status); return false; } @@ -9534,7 +9455,7 @@ void csr_roam_roaming_state_disassoc_rsp_processor(tpAniSirGlobal pMac, csr_ser_des_unpack_diassoc_rsp((uint8_t *) pSmeRsp, &SmeDisassocRsp); sessionId = SmeDisassocRsp.sessionId; - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, FL("sessionId %d"), + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, "sessionId %d", sessionId); if (csr_is_conn_state_infra(pMac, sessionId)) { @@ -9544,18 +9465,17 @@ void csr_roam_roaming_state_disassoc_rsp_processor(tpAniSirGlobal pMac, 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); return; } if (CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(pMac, sessionId)) { - sms_log(pMac, LOG2, "***eCsrNothingToJoin***"); + sme_debug("***eCsrNothingToJoin***"); csr_roam_complete(pMac, eCsrNothingToJoin, NULL, sessionId); } else if (CSR_IS_ROAM_SUBSTATE_DISASSOC_FORCED(pMac, sessionId) || CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(pMac, sessionId)) { if (eSIR_SME_SUCCESS == SmeDisassocRsp.statusCode) { - sms_log(pMac, LOG2, - FL("CSR force disassociated successful")); + sme_debug("CSR force disassociated successful"); /* * A callback to HDD will be issued from * csr_roam_complete so no need to do anything here @@ -9564,7 +9484,7 @@ void csr_roam_roaming_state_disassoc_rsp_processor(tpAniSirGlobal pMac, csr_roam_complete(pMac, eCsrNothingToJoin, NULL, sessionId); } else if (CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - FL("CSR SmeDisassocReq due to HO on session %d"), + "CSR SmeDisassocReq due to HO on session %d", sessionId); pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[sessionId]; /* @@ -9612,8 +9532,8 @@ void csr_roam_roaming_state_disassoc_rsp_processor(tpAniSirGlobal pMac, eCsrSmeIssuedAssocToSimilarAP, roamId, true, false); if (!QDF_IS_STATUS_SUCCESS(status)) - sms_log(pMac, LOGE, - FL("issue_connect failed. status %d"), + sme_err( + "issue_connect failed. status %d", status); csr_release_profile(pMac, pCurRoamProfile); @@ -9644,11 +9564,10 @@ POST_ROAM_FAILURE: * In all cases, we set the new Bss configuration here * and attempt to join */ - sms_log(pMac, LOGD, - FL("Disassociated successfully")); + sme_debug("Disassociated successfully"); } else { - sms_log(pMac, LOGE, - FL("DisassocReq failed, statusCode= 0x%08X"), + sme_err( + "DisassocReq failed, statusCode= 0x%08X", SmeDisassocRsp.statusCode); } /* We are not done yet. Get the data and continue roaming */ @@ -9661,7 +9580,7 @@ static void csr_roam_roaming_state_deauth_rsp_processor(tpAniSirGlobal pMac, { tSirResultCodes statusCode; /* No one is sending eWNI_SME_DEAUTH_REQ to PE. */ - sms_log(pMac, LOGW, FL("is no-op")); + sme_debug("is no-op"); statusCode = csr_get_de_auth_rsp_status_code(pSmeRsp); pMac->roam.deauthRspStatus = statusCode; if (CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, pSmeRsp->sessionId)) { @@ -9671,10 +9590,10 @@ static void csr_roam_roaming_state_deauth_rsp_processor(tpAniSirGlobal pMac, if (eSIR_SME_SUCCESS == statusCode) { /* Successfully deauth from the 'old' Bss... */ /* */ - sms_log(pMac, LOGD, + sme_debug( "CSR SmeDeauthReq disassociated Successfully"); } else { - sms_log(pMac, LOGW, + sme_warn( "SmeDeauthReq failed with statusCode= 0x%08X", statusCode); } @@ -9690,10 +9609,10 @@ static void csr_roam_roaming_state_start_bss_rsp_processor(tpAniSirGlobal pMac, eCsrRoamCompleteResult result; if (eSIR_SME_SUCCESS == pSmeStartBssRsp->statusCode) { - sms_log(pMac, LOGW, "SmeStartBssReq Successful"); + sme_debug("SmeStartBssReq Successful"); result = eCsrStartBssSuccess; } else { - sms_log(pMac, LOGW, + sme_warn( "SmeStartBssReq failed with statusCode= 0x%08X", pSmeStartBssRsp->statusCode); /* Let csr_roam_complete decide what to do */ @@ -9722,7 +9641,7 @@ void csr_roaming_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf) tSmeIbssPeerInd *pIbssPeerInd; tCsrRoamInfo roamInfo; pSmeRsp = (tSirSmeRsp *) pMsgBuf; - sms_log(pMac, LOGD, FL("Message %d[0x%04X] received in substate %s"), + sme_debug("Message %d[0x%04X] received in substate %s", pSmeRsp->messageType, pSmeRsp->messageType, mac_trace_getcsr_roam_sub_state( pMac->roam.curSubState[pSmeRsp->sessionId])); @@ -9760,7 +9679,7 @@ void csr_roaming_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf) || CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, pSmeRsp->sessionId)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - FL("eWNI_SME_DISASSOC_RSP subState = %s"), + "eWNI_SME_DISASSOC_RSP subState = %s", mac_trace_getcsr_roam_sub_state( pMac->roam.curSubState[pSmeRsp->sessionId])); csr_roam_roaming_state_disassoc_rsp_processor(pMac, @@ -9789,8 +9708,8 @@ void csr_roaming_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf) */ case eWNI_SME_IBSS_PEER_DEPARTED_IND: pIbssPeerInd = (tSmeIbssPeerInd *) pSmeRsp; - sms_log(pMac, LOGE, - FL("Peer departed ntf from LIM in joining state")); + sme_err( + "Peer departed ntf from LIM in joining state"); qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); roamInfo.staId = (uint8_t) pIbssPeerInd->staId; roamInfo.ucastSig = (uint8_t) pIbssPeerInd->ucastSig; @@ -9808,13 +9727,12 @@ void csr_roaming_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf) (pGetRssiReq->lastRSSI, pGetRssiReq->staId, pGetRssiReq->pDevContext); else - sms_log(pMac, LOGE, - FL("pGetRssiReq->rssiCallback is NULL")); + sme_err("pGetRssiReq->rssiCallback is NULL"); } break; default: - sms_log(pMac, LOGD, - FL("Unexpected message type = %d[0x%X] received in substate %s"), + sme_debug( + "Unexpected message type = %d[0x%X] received in substate %s", pSmeRsp->messageType, pSmeRsp->messageType, mac_trace_getcsr_roam_sub_state( pMac->roam.curSubState[pSmeRsp->sessionId])); @@ -9830,7 +9748,7 @@ void csr_roam_joined_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf) tSirSmeRsp *pSirMsg = (tSirSmeRsp *) pMsgBuf; switch (pSirMsg->messageType) { case eWNI_SME_GET_STATISTICS_RSP: - sms_log(pMac, LOGD, FL("Stats rsp from PE")); + sme_debug("Stats rsp from PE"); csr_roam_stats_rsp_processor(pMac, pSirMsg); break; case eWNI_SME_UPPER_LAYER_ASSOC_CNF: @@ -9841,9 +9759,8 @@ void csr_roam_joined_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf) tCsrRoamInfo *pRoamInfo = NULL; uint32_t sessionId; QDF_STATUS status; - sms_log(pMac, LOGD, - FL - ("ASSOCIATION confirmation can be given to upper layer ")); + sme_debug( + "ASSOCIATION confirmation can be given to upper layer "); qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); pRoamInfo = &roamInfo; pUpperLayerAssocCnf = @@ -9856,9 +9773,7 @@ void csr_roam_joined_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf) 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); return; } @@ -9925,8 +9840,8 @@ QDF_STATUS csr_roam_issue_set_context_req(tpAniSirGlobal pMac, QDF_STATUS status = QDF_STATUS_SUCCESS; tAniEdType edType; - sms_log(pMac, LOGD, - FL("sessionId %d EncryptType %d"), sessionId, EncryptType); + sme_debug( + "sessionId %d EncryptType %d", sessionId, EncryptType); if (eCSR_ENCRYPT_TYPE_UNKNOWN == EncryptType) { EncryptType = eCSR_ENCRYPT_TYPE_NONE; @@ -9983,8 +9898,8 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, /* KeyLength maybe 0 for static WEP */ if (set_key->keyLength) { if (set_key->keyLength < CSR_WEP40_KEY_LEN) { - sms_log(mac_ctx, LOGW, - FL("Invalid WEP40 keylength [= %d]"), + sme_warn( + "Invalid WEP40 keylength [= %d]", set_key->keyLength); *enqueue_cmd = false; return QDF_STATUS_E_INVAL; @@ -10001,8 +9916,8 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, /* KeyLength maybe 0 for static WEP */ if (set_key->keyLength) { if (set_key->keyLength < CSR_WEP104_KEY_LEN) { - sms_log(mac_ctx, LOGW, - FL("Invalid WEP104 keylength [= %d]"), + sme_warn( + "Invalid WEP104 keylength [= %d]", set_key->keyLength); *enqueue_cmd = false; return QDF_STATUS_E_INVAL; @@ -10016,8 +9931,8 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, break; case eCSR_ENCRYPT_TYPE_TKIP: if (set_key->keyLength < CSR_TKIP_KEY_LEN) { - sms_log(mac_ctx, LOGW, - FL("Invalid TKIP keylength [= %d]"), + sme_warn( + "Invalid TKIP keylength [= %d]", set_key->keyLength); *enqueue_cmd = false; return QDF_STATUS_E_INVAL; @@ -10029,8 +9944,8 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, break; case eCSR_ENCRYPT_TYPE_AES: if (set_key->keyLength < CSR_AES_KEY_LEN) { - sms_log(mac_ctx, LOGW, - FL("Invalid AES/CCMP keylength [= %d]"), + sme_warn( + "Invalid AES/CCMP keylength [= %d]", set_key->keyLength); *enqueue_cmd = false; return QDF_STATUS_E_INVAL; @@ -10043,8 +9958,8 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, #ifdef FEATURE_WLAN_WAPI case eCSR_ENCRYPT_TYPE_WPI: if (set_key->keyLength < CSR_WAPI_KEY_LEN) { - sms_log(mac_ctx, LOGW, - FL("Invalid WAPI keylength [= %d]"), + sme_warn( + "Invalid WAPI keylength [= %d]", set_key->keyLength); *enqueue_cmd = false; return QDF_STATUS_E_INVAL; @@ -10056,8 +9971,7 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, session->pCurRoamProfile->negotiatedUCEncryptionType = eCSR_ENCRYPT_TYPE_WPI; } else { - sms_log(mac_ctx, LOGW, - FL("pCurRoamProfile is NULL.")); + sme_err("pCurRoamProfile is NULL"); *enqueue_cmd = false; return QDF_STATUS_E_INVAL; } @@ -10069,8 +9983,8 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, /* no need to enqueue KRK key request, since they are local */ *enqueue_cmd = false; if (set_key->keyLength < CSR_KRK_KEY_LEN) { - sms_log(mac_ctx, LOGW, - FL("Invalid KRK keylength [= %d]"), + sme_warn( + "Invalid KRK keylength [= %d]", set_key->keyLength); return QDF_STATUS_E_INVAL; } @@ -10084,8 +9998,8 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, /* no need to enqueue KRK key request, since they are local */ *enqueue_cmd = false; if (set_key->keyLength < SIR_BTK_KEY_LEN) { - sms_log(mac_ctx, LOGW, - FL("LFR3:Invalid BTK keylength [= %d]"), + sme_warn( + "LFR3:Invalid BTK keylength [= %d]", set_key->keyLength); return QDF_STATUS_E_INVAL; } @@ -10098,8 +10012,8 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, /* Check for 11w BIP */ case eCSR_ENCRYPT_TYPE_AES_CMAC: if (set_key->keyLength < CSR_AES_KEY_LEN) { - sms_log(mac_ctx, LOGW, - FL("Invalid AES/CCMP keylength [= %d]"), + sme_warn( + "Invalid AES/CCMP keylength [= %d]", set_key->keyLength); *enqueue_cmd = false; return QDF_STATUS_E_INVAL; @@ -10131,14 +10045,14 @@ static QDF_STATUS csr_roam_issue_set_key_command(tpAniSirGlobal pMac, tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); if (NULL == pSession) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("session %d not found"), sessionId); + "session %d not found", sessionId); return QDF_STATUS_E_FAILURE; } #endif /* FEATURE_WLAN_ESE */ pCommand = csr_get_command_buffer(pMac); if (NULL == pCommand) { - sms_log(pMac, LOGE, FL(" fail to get command buffer")); + sme_err(" fail to get command buffer"); return QDF_STATUS_E_RESOURCES; } qdf_mem_zero(pCommand, sizeof(tSmeCmd)); @@ -10174,8 +10088,8 @@ static QDF_STATUS csr_roam_issue_set_key_command(tpAniSirGlobal pMac, status = csr_queue_sme_command(pMac, pCommand, true); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL("fail to send message status = %d"), status); + sme_err( + "fail to send message status = %d", status); /* update to false so that command can be freed */ enqueue_cmd = false; } @@ -10208,7 +10122,7 @@ QDF_STATUS csr_roam_process_set_key_command(tpAniSirGlobal pMac, tSmeCmd *pComma host_event_wlan_security_payload_type); if (NULL == pSession) { - sms_log(pMac, LOGE, FL(" session %d not found "), sessionId); + sme_err(" session %d not found ", sessionId); return QDF_STATUS_E_FAILURE; } @@ -10273,12 +10187,12 @@ QDF_STATUS csr_roam_process_set_key_command(tpAniSirGlobal pMac, tSmeCmd *pComma pCommand->u.setKeyCmd. keyRsc); } else { - sms_log(pMac, LOGW, FL(" cannot process not connected")); + sme_warn(" cannot process not connected"); /* Set this status so the error handling take care of the case. */ status = QDF_STATUS_CSR_WRONG_STATE; } if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, FL(" error status %d"), status); + sme_err(" error status %d", status); csr_roam_call_callback(pMac, sessionId, NULL, pCommand->u.setKeyCmd.roamId, eCSR_ROAM_SET_KEY_COMPLETE, @@ -10351,7 +10265,7 @@ csr_roam_prepare_filter_from_profile(tpAniSirGlobal mac_ctx, if (profile->SSIDs.numOfSSIDs) { scan_fltr->SSIDs.numOfSSIDs = profile->SSIDs.numOfSSIDs; QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - FL("No of Allowed List:%d"), + ("No of Allowed List:%d"), roam_params->num_ssid_allowed_list); if (scan_fltr->scan_filter_for_roam && roam_params->num_ssid_allowed_list) { @@ -10414,13 +10328,13 @@ csr_roam_prepare_filter_from_profile(tpAniSirGlobal mac_ctx, = profile_ch_info->ChannelList[idx]; fltr_ch_info->numOfChannels++; } else { - sms_log(mac_ctx, LOGD, - FL("Channel (%d) is invalid"), + sme_debug( + "Channel (%d) is invalid", profile_ch_info->ChannelList[idx]); } } } else { - sms_log(mac_ctx, LOGE, FL("Channel list empty")); + sme_err("Channel list empty"); status = QDF_STATUS_E_FAILURE; goto free_filter; } @@ -10491,7 +10405,7 @@ bool csr_roam_issue_wm_status_change(tpAniSirGlobal pMac, uint32_t sessionId, break; pCommand = csr_get_command_buffer(pMac); if (!pCommand) { - sms_log(pMac, LOGE, FL(" fail to get command buffer")); + sme_err(" fail to get command buffer"); break; } /* Change the substate in case it is waiting for key */ @@ -10518,7 +10432,7 @@ bool csr_roam_issue_wm_status_change(tpAniSirGlobal pMac, uint32_t sessionId, (csr_queue_sme_command(pMac, pCommand, true))) { fCommandQueued = true; } else { - sms_log(pMac, LOGE, FL(" fail to send message ")); + sme_err("fail to send message"); csr_release_command(pMac, pCommand); } @@ -10560,8 +10474,7 @@ static void csr_update_rssi(tpAniSirGlobal pMac, void *pMsg) if (NULL != pGetRssiReq->p_cds_context) { qdf_status = csr_send_snr_request(pGetRssiReq); } else { - sms_log(pMac, LOGE, - FL("pGetRssiReq->p_cds_context is NULL")); + sme_err("GetRssiReq->p_cds_context is NULL"); return; } @@ -10571,16 +10484,14 @@ static void csr_update_rssi(tpAniSirGlobal pMac, void *pMsg) (rssi, pGetRssiReq->staId, pGetRssiReq->pDevContext); else - sms_log(pMac, LOGD, - FL - ("rssi request is posted. waiting for reply")); + sme_debug( + "rssi request is posted. waiting for reply"); } else { - sms_log(pMac, LOGE, - FL("pGetRssiReq->rssiCallback is NULL")); + sme_err("GetRssiReq->rssiCallback is NULL"); return; } } else { - sms_log(pMac, LOGE, FL("pGetRssiReq is NULL")); + sme_err("pGetRssiReq is NULL"); } return; @@ -10592,12 +10503,12 @@ static void csr_update_snr(tpAniSirGlobal pMac, void *pMsg) if (pGetSnrReq) { if (QDF_STATUS_SUCCESS != wma_get_snr(pGetSnrReq)) { - sms_log(pMac, LOGE, FL("Error in wma_get_snr")); + sme_err("Error in wma_get_snr"); return; } } else { - sms_log(pMac, LOGE, FL("pGetSnrReq is NULL")); + sme_err("pGetSnrReq is NULL"); } return; } @@ -10621,12 +10532,12 @@ static QDF_STATUS csr_send_reset_ap_caps_changed(tpAniSirGlobal pMac, pMsg->messageType = eWNI_SME_RESET_AP_CAPS_CHANGED; pMsg->length = len; qdf_copy_macaddr(&pMsg->bssId, bssId); - sms_log(pMac, LOGD, - FL("CSR reset caps change for Bssid= " MAC_ADDRESS_STR), + sme_debug( + "CSR reset caps change for Bssid= " MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pMsg->bssId.bytes)); status = umac_send_mb_message_to_mac(pMsg); } else { - sms_log(pMac, LOGE, FL("Memory allocation failed")); + sme_err("Memory allocation failed"); } return status; } @@ -10642,18 +10553,17 @@ csr_roam_chk_lnk_assoc_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) tCsrRoamInfo roam_info; qdf_mem_set(&roam_info, sizeof(roam_info), 0); - sms_log(mac_ctx, LOGD, FL("Receive WNI_SME_ASSOC_IND from SME")); + sme_debug("Receive WNI_SME_ASSOC_IND from SME"); pAssocInd = (tSirSmeAssocInd *) msg_ptr; status = csr_roam_get_session_id_from_bssid(mac_ctx, (struct qdf_mac_addr *) pAssocInd->bssId, &sessionId); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGD, - FL("Couldn't find session_id for given BSSID")); + sme_debug("Couldn't find session_id for given BSSID"); return; } session = CSR_GET_SESSION(mac_ctx, sessionId); if (!session) { - sms_log(mac_ctx, LOGE, FL("session %d not found"), sessionId); + sme_err("session %d not found", sessionId); return; } roam_info_ptr = &roam_info; @@ -10731,8 +10641,8 @@ csr_roam_chk_lnk_disassoc_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) cmd = qdf_mem_malloc(sizeof(*cmd)); if (NULL == cmd) { - sms_log(mac_ctx, LOGE, - FL("memory allocation failed for size = %zu"), + sme_err( + "memory allocation failed for size = %zu", sizeof(*cmd)); return; } @@ -10746,16 +10656,16 @@ csr_roam_chk_lnk_disassoc_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) status = csr_roam_get_session_id_from_bssid(mac_ctx, &pDisassocInd->bssid, &sessionId); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, FL("Session Id not found for BSSID " - MAC_ADDRESS_STR), + sme_err("Session Id not found for BSSID " + MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pDisassocInd->bssid.bytes)); qdf_mem_free(cmd); return; } - sms_log(mac_ctx, LOGE, - FL("DISASSOCIATION from peer =" MAC_ADDRESS_STR - " " " reason: %d status: %d session: %d"), + sme_err( + "DISASSOCIATION from peer =" MAC_ADDRESS_STR + " " " reason: %d status: %d session: %d", MAC_ADDR_ARRAY(pDisassocInd->peer_macaddr.bytes), pDisassocInd->reasonCode, pDisassocInd->statusCode, sessionId); @@ -10781,7 +10691,7 @@ csr_roam_chk_lnk_disassoc_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) mac_ctx, sessionId); session = CSR_GET_SESSION(mac_ctx, sessionId); if (!session) { - sms_log(mac_ctx, LOGE, FL("session %d not found"), sessionId); + sme_err("session %d not found", sessionId); qdf_mem_free(cmd); return; } @@ -10831,7 +10741,7 @@ csr_roam_send_disconnect_done_indication(tpAniSirGlobal mac_ctx, tSirSmeRsp tCsrRoamInfo roam_info; tCsrRoamSession *session; - sms_log(mac_ctx, LOGD, FL("eWNI_SME_DISCONNECT_DONE_IND RC:%d"), + sme_debug("eWNI_SME_DISCONNECT_DONE_IND RC:%d", discon_ind->reason_code); if (CSR_IS_SESSION_VALID(mac_ctx, discon_ind->session_id)) { @@ -10849,7 +10759,7 @@ csr_roam_send_disconnect_done_indication(tpAniSirGlobal mac_ctx, tSirSmeRsp discon_ind->session_id); } else - sms_log(mac_ctx, LOGE, FL("Inactive session %d"), + sme_err("Inactive session %d", discon_ind->session_id); } @@ -10863,7 +10773,7 @@ csr_roam_chk_lnk_deauth_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) tCsrRoamInfo roam_info; qdf_mem_set(&roam_info, sizeof(roam_info), 0); - sms_log(mac_ctx, LOGD, FL("DEAUTHENTICATION Indication from MAC")); + sme_debug("DEAUTHENTICATION Indication from MAC"); pDeauthInd = (tpSirSmeDeauthInd) msg_ptr; status = csr_roam_get_session_id_from_bssid(mac_ctx, &pDeauthInd->bssid, @@ -10891,7 +10801,7 @@ csr_roam_chk_lnk_deauth_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) mac_ctx, sessionId); session = CSR_GET_SESSION(mac_ctx, sessionId); if (!session) { - sms_log(mac_ctx, LOGE, FL("session %d not found"), sessionId); + sme_err("session %d not found", sessionId); return; } @@ -10917,7 +10827,7 @@ csr_roam_chk_lnk_swt_ch_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) tCsrRoamInfo roamInfo; /* in case of STA, the SWITCH_CHANNEL originates from its AP */ - sms_log(mac_ctx, LOGW, FL("eWNI_SME_SWITCH_CHL_IND from SME")); + sme_debug("eWNI_SME_SWITCH_CHL_IND from SME"); pSwitchChnInd = (tpSirSmeSwitchChannelInd) msg_ptr; /* Update with the new channel id. The channel id is hidden in the * statusCode. @@ -10927,8 +10837,7 @@ csr_roam_chk_lnk_swt_ch_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) if (QDF_IS_STATUS_SUCCESS(status)) { session = CSR_GET_SESSION(mac_ctx, sessionId); if (!session) { - sms_log(mac_ctx, LOGE, - FL("session %d not found"), sessionId); + sme_err("session %d not found", sessionId); return; } session->connectedProfile.operationChannel = @@ -10965,7 +10874,7 @@ csr_roam_chk_lnk_deauth_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) tCsrRoamInfo roam_info; qdf_mem_set(&roam_info, sizeof(roam_info), 0); - sms_log(mac_ctx, LOGW, FL("eWNI_SME_DEAUTH_RSP from SME")); + sme_debug("eWNI_SME_DEAUTH_RSP from SME"); sessionId = pDeauthRsp->sessionId; if (!CSR_IS_SESSION_VALID(mac_ctx, sessionId)) return; @@ -10999,7 +10908,7 @@ csr_roam_chk_lnk_disassoc_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) tSirSmeDisassocRsp *pDisassocRsp = (tSirSmeDisassocRsp *) msg_ptr; qdf_mem_set(&roam_info, sizeof(roam_info), 0); - sms_log(mac_ctx, LOGW, FL("eWNI_SME_DISASSOC_RSP from SME ")); + sme_debug("eWNI_SME_DISASSOC_RSP from SME "); sessionId = pDisassocRsp->sessionId; if (!CSR_IS_SESSION_VALID(mac_ctx, sessionId)) return; @@ -11026,7 +10935,7 @@ csr_roam_diag_mic_fail(tpAniSirGlobal mac_ctx, uint32_t sessionId) host_event_wlan_security_payload_type); tCsrRoamSession *session = CSR_GET_SESSION(mac_ctx, sessionId); if (!session) { - sms_log(mac_ctx, LOGE, FL("session %d not found"), sessionId); + sme_err("session %d not found", sessionId); return; } qdf_mem_set(&secEvent, sizeof(host_event_wlan_security_payload_type), @@ -11085,7 +10994,7 @@ csr_roam_chk_lnk_pbs_probe_req_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) tpSirSmeProbeReqInd pProbeReqInd = (tpSirSmeProbeReqInd) msg_ptr; qdf_mem_set(&roam_info, sizeof(roam_info), 0); - sms_log(mac_ctx, LOGD, FL("WPS PBC Probe request Indication from SME")); + sme_debug("WPS PBC Probe request Indication from SME"); status = csr_roam_get_session_id_from_bssid(mac_ctx, &pProbeReqInd->bssid, &sessionId); @@ -11151,7 +11060,7 @@ csr_roam_chk_lnk_wm_status_change_ntf(tpAniSirGlobal mac_ctx, break; session = CSR_GET_SESSION(mac_ctx, sessionId); if (!session) { - sms_log(mac_ctx, LOGE, FL("session %d not found"), + sme_err("session %d not found", sessionId); return; } @@ -11164,8 +11073,7 @@ csr_roam_chk_lnk_wm_status_change_ntf(tpAniSirGlobal mac_ctx, &session->connectedProfile; roam_info_ptr = &roam_info; } else { - sms_log(mac_ctx, LOGE, - FL("CSR: connected BSS is empty")); + sme_err("CSR: connected BSS is empty"); } result = eCSR_ROAM_RESULT_IBSS_CONNECT; roamStatus = eCSR_ROAM_CONNECT_STATUS_UPDATE; @@ -11176,8 +11084,7 @@ csr_roam_chk_lnk_wm_status_change_ntf(tpAniSirGlobal mac_ctx, if (CSR_SESSION_ID_INVALID != sessionId) { session = CSR_GET_SESSION(mac_ctx, sessionId); if (!session) { - sms_log(mac_ctx, LOGE, - FL("session %d not found"), sessionId); + sme_err("session %d not found", sessionId); return; } session->connectState = @@ -11189,14 +11096,13 @@ csr_roam_chk_lnk_wm_status_change_ntf(tpAniSirGlobal mac_ctx, case eSIR_SME_JOINED_NEW_BSS: /* IBSS coalescing. */ - sms_log(mac_ctx, LOGW, - FL("CSR: eSIR_SME_JOINED_NEW_BSS received from PE")); + sme_debug("CSR: eSIR_SME_JOINED_NEW_BSS received from PE"); sessionId = csr_find_ibss_session(mac_ctx); if (CSR_SESSION_ID_INVALID == sessionId) break; session = CSR_GET_SESSION(mac_ctx, sessionId); if (!session) { - sms_log(mac_ctx, LOGE, FL("session %d not found"), + sme_err("session %d not found", sessionId); return; } @@ -11235,8 +11141,7 @@ csr_roam_chk_lnk_wm_status_change_ntf(tpAniSirGlobal mac_ctx, */ case eSIR_SME_AP_CAPS_CHANGED: pApNewCaps = &pStatusChangeMsg->statusChangeInfo.apNewCaps; - sms_log(mac_ctx, LOGW, - FL("CSR handling eSIR_SME_AP_CAPS_CHANGED")); + sme_debug("CSR handling eSIR_SME_AP_CAPS_CHANGED"); status = csr_roam_get_session_id_from_bssid(mac_ctx, &pApNewCaps->bssId, &sessionId); if (!QDF_IS_STATUS_SUCCESS(status)) @@ -11251,13 +11156,12 @@ csr_roam_chk_lnk_wm_status_change_ntf(tpAniSirGlobal mac_ctx, == mac_ctx->roam.curSubState[sessionId]) || (eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC == mac_ctx->roam.curSubState[sessionId]))) { - sms_log(mac_ctx, LOGW, - FL("Calling csr_roam_disconnect_internal")); + sme_warn("Calling csr_roam_disconnect_internal"); csr_roam_disconnect_internal(mac_ctx, sessionId, eCSR_DISCONNECT_REASON_UNSPECIFIED); } else { - sms_log(mac_ctx, LOGW, - FL("Skipping the new scan as CSR is in state %s and sub-state %s"), + sme_warn( + "Skipping the new scan as CSR is in state %s and sub-state %s", mac_trace_getcsr_roam_state( mac_ctx->roam.curState[sessionId]), mac_trace_getcsr_roam_sub_state( @@ -11312,7 +11216,7 @@ csr_roam_chk_lnk_ibss_new_peer_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) return; session = CSR_GET_SESSION(mac_ctx, sessionId); if (!session) { - sms_log(mac_ctx, LOGE, FL("session %d not found"), sessionId); + sme_err("session %d not found", sessionId); return; } /* @@ -11320,7 +11224,7 @@ csr_roam_chk_lnk_ibss_new_peer_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) * context for the new peer... */ if (!session->pConnectBssDesc) { - sms_log(mac_ctx, LOGW, FL("CSR: connected BSS is empty")); + sme_warn("CSR: connected BSS is empty"); goto callback_and_free; } qdf_copy_macaddr(&roam_info.peerMac, &pIbssPeerInd->peer_addr); @@ -11395,7 +11299,7 @@ csr_roam_chk_lnk_ibss_peer_departed_ind(tpAniSirGlobal mac_ctx, tSmeIbssPeerInd *pIbssPeerInd; if (NULL == msg_ptr) { - sms_log(mac_ctx, LOGE, FL("IBSS peer ind. message is NULL")); + sme_err("IBSS peer ind. message is NULL"); return; } qdf_mem_set(&roam_info, sizeof(roam_info), 0); @@ -11415,8 +11319,7 @@ csr_roam_chk_lnk_ibss_peer_departed_ind(tpAniSirGlobal mac_ctx, WLAN_HOST_DIAG_LOG_REPORT(pIbssLog); } #endif /* FEATURE_WLAN_DIAG_SUPPORT_CSR */ - sms_log(mac_ctx, LOGW, - FL("CSR: Peer departed notification from LIM")); + sme_debug("CSR: Peer departed notification from LIM"); roam_info.staId = (uint8_t) pIbssPeerInd->staId; roam_info.ucastSig = (uint8_t) pIbssPeerInd->ucastSig; roam_info.bcastSig = (uint8_t) pIbssPeerInd->bcastSig; @@ -11479,19 +11382,19 @@ csr_roam_chk_lnk_set_ctx_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) qdf_mem_set(&roam_info, sizeof(roam_info), 0); entry = csr_nonscan_active_ll_peek_head(mac_ctx, LL_ACCESS_LOCK); if (!entry) { - sms_log(mac_ctx, LOGE, FL("CSR: NO commands are ACTIVE ...")); + sme_err("CSR: NO commands are ACTIVE ..."); goto process_pending_n_exit; } cmd = GET_BASE_ADDR(entry, tSmeCmd, Link); if (eSmeCommandSetKey != cmd->command) { - sms_log(mac_ctx, LOGE, FL("CSR: setkey cmd is not ACTIVE ...")); + sme_err("CSR: setkey cmd is not ACTIVE ..."); goto process_pending_n_exit; } sessionId = cmd->sessionId; session = CSR_GET_SESSION(mac_ctx, sessionId); if (!session) { - sms_log(mac_ctx, LOGE, FL("session %d not found"), sessionId); + sme_err("session %d not found", sessionId); return; } #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR @@ -11520,7 +11423,7 @@ csr_roam_chk_lnk_set_ctx_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) pMsg = qdf_mem_malloc( sizeof(tSirSetActiveModeSetBncFilterReq)); if (NULL == pMsg) { - sms_log(mac_ctx, LOGE, FL("Malloc failed")); + sme_err("Malloc failed"); goto remove_entry_n_process_pending; } pMsg->messageType = eWNI_SME_SET_BCN_FILTER_REQ; @@ -11547,8 +11450,7 @@ csr_roam_chk_lnk_set_ctx_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) msg = qdf_mem_malloc(sizeof( struct sme_obss_ht40_scanind_msg)); if (NULL == msg) { - sms_log(mac_ctx, LOGE, - FL("Malloc failed")); + sme_err("Malloc failed"); goto remove_entry_n_process_pending; } msg->msg_type = eWNI_SME_HT40_OBSS_SCAN_IND; @@ -11565,9 +11467,9 @@ csr_roam_chk_lnk_set_ctx_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) roam_info_ptr = &roam_info; } else { result = eCSR_ROAM_RESULT_FAILURE; - sms_log(mac_ctx, LOGE, - FL("CSR: setkey command failed(err=%d) PeerMac " - MAC_ADDRESS_STR), + sme_err( + "CSR: setkey command failed(err=%d) PeerMac " + MAC_ADDRESS_STR, pRsp->statusCode, MAC_ADDR_ARRAY(pRsp->peer_macaddr.bytes)); } @@ -11607,8 +11509,8 @@ csr_roam_chk_lnk_max_assoc_exceeded(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) qdf_mem_set(&roam_info, sizeof(roam_info), 0); pSmeMaxAssocInd = (tSmeMaxAssocInd *) msg_ptr; - sms_log(mac_ctx, LOGD, - FL("max assoc have been reached, new peer cannot be accepted")); + sme_debug( + "max assoc have been reached, new peer cannot be accepted"); sessionId = pSmeMaxAssocInd->sessionId; roam_info.sessionId = sessionId; qdf_copy_macaddr(&roam_info.peerMac, &pSmeMaxAssocInd->peer_mac); @@ -11620,7 +11522,7 @@ csr_roam_chk_lnk_max_assoc_exceeded(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) void csr_roam_check_for_link_status_change(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg) { if (NULL == pSirMsg) { - sms_log(pMac, LOGE, FL("pSirMsg is NULL")); + sme_err("pSirMsg is NULL"); return; } switch (pSirMsg->messageType) { @@ -11664,21 +11566,21 @@ void csr_roam_check_for_link_status_change(tpAniSirGlobal pMac, tSirSmeRsp *pSir csr_roam_chk_lnk_set_ctx_rsp(pMac, pSirMsg); break; case eWNI_SME_GET_STATISTICS_RSP: - sms_log(pMac, LOGD, FL("Stats rsp from PE")); + sme_debug("Stats rsp from PE"); csr_roam_stats_rsp_processor(pMac, pSirMsg); break; #ifdef FEATURE_WLAN_ESE case eWNI_SME_GET_TSM_STATS_RSP: - sms_log(pMac, LOGD, FL("TSM Stats rsp from PE")); + sme_debug("TSM Stats rsp from PE"); csr_tsm_stats_rsp_processor(pMac, pSirMsg); break; #endif /* FEATURE_WLAN_ESE */ case eWNI_SME_GET_RSSI_REQ: - sms_log(pMac, LOGD, FL("GetRssiReq from self")); + sme_debug("GetRssiReq from self"); csr_update_rssi(pMac, pSirMsg); break; case eWNI_SME_GET_SNR_REQ: - sms_log(pMac, LOGD, FL("GetSnrReq from self")); + sme_debug("GetSnrReq from self"); csr_update_snr(pMac, pSirMsg); break; case eWNI_SME_FT_PRE_AUTH_RSP: @@ -11688,11 +11590,11 @@ void csr_roam_check_for_link_status_change(tpAniSirGlobal pMac, tSirSmeRsp *pSir csr_roam_chk_lnk_max_assoc_exceeded(pMac, pSirMsg); break; case eWNI_SME_CANDIDATE_FOUND_IND: - sms_log(pMac, LOGD, FL("Candidate found indication from PE")); + sme_debug("Candidate found indication from PE"); csr_neighbor_roam_candidate_found_ind_hdlr(pMac, pSirMsg); break; case eWNI_SME_HANDOFF_REQ: - sms_log(pMac, LOGD, FL("Handoff Req from self")); + sme_debug("Handoff Req from self"); csr_neighbor_roam_handoff_req_hdlr(pMac, pSirMsg); break; default: @@ -11723,7 +11625,7 @@ void csr_call_roaming_completion_callback(tpAniSirGlobal pMac, roamId, eCSR_ROAM_ROAMING_COMPLETION, roamResult); } else { - sms_log(pMac, LOGW, FL(" pSession is NULL")); + sme_err(" pSession is NULL"); } } @@ -11745,14 +11647,14 @@ bool csr_roam_complete_roaming(tpAniSirGlobal pMac, uint32_t sessionId, bool fCompleted = true; tCsrRoamSession *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); return false; } /* Check whether time is up */ if (pSession->fCancelRoaming || fForce || eCsrReassocRoaming == pSession->roamingReason || eCsrDynamicRoaming == pSession->roamingReason) { - sms_log(pMac, LOGW, FL(" indicates roaming completion")); + sme_debug(" indicates roaming completion"); if (pSession->fCancelRoaming && CSR_IS_LOSTLINK_ROAMING(pSession->roamingReason)) { /* roaming is cancelled, tell HDD to indicate disconnect */ @@ -11794,12 +11696,12 @@ void csr_roam_cancel_roaming(tpAniSirGlobal pMac, uint32_t sessionId) tCsrRoamSession *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); return; } if (CSR_IS_ROAMING(pSession)) { - sms_log(pMac, LOGW, "Cancel roaming"); + sme_debug("Cancel roaming"); pSession->fCancelRoaming = true; if (CSR_IS_ROAM_JOINING(pMac, sessionId) && CSR_IS_ROAM_SUBSTATE_CONFIG(pMac, sessionId)) { @@ -11828,7 +11730,7 @@ void csr_roam_roaming_timer_handler(void *pv) tCsrRoamSession *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); return; } @@ -11860,11 +11762,11 @@ void csr_roam_roaming_offload_timeout_handler(void *timer_data) if (timer_info) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - FL("LFR3:roaming offload timer expired, session: %d"), + "LFR3:roaming offload timer expired, session: %d", timer_info->sessionId); } else { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("Invalid Session")); + "Invalid Session"); return; } csr_roam_disconnect(timer_info->pMac, timer_info->sessionId, @@ -11878,11 +11780,11 @@ QDF_STATUS csr_roam_start_roaming_timer(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } - sms_log(pMac, LOGD, " csrScanStartRoamingTimer"); + sme_debug(" csrScanStartRoamingTimer"); pSession->roamingTimerInfo.sessionId = (uint8_t) sessionId; status = qdf_mc_timer_start(&pSession->hTimerRoaming, interval / QDF_MC_TIMER_TO_MS_UNIT); @@ -11904,12 +11806,12 @@ void csr_roam_wait_for_key_time_out_handler(void *pv) QDF_STATUS status = QDF_STATUS_E_FAILURE; if (pSession == NULL) { - sms_log(pMac, LOGE, "%s: session not found", __func__); + sme_err("session not found"); return; } - sms_log(pMac, LOGW, - FL("WaitForKey timer expired in state=%s sub-state=%s"), + sme_debug( + "WaitForKey timer expired in state=%s sub-state=%s", mac_trace_get_neighbour_roam_state(pMac->roam. neighborRoamInfo[pInfo->sessionId]. neighborRoamState), @@ -11922,14 +11824,14 @@ void csr_roam_wait_for_key_time_out_handler(void *pv) * Enable heartbeat timer when hand-off is in progress * and Key Wait timer expired. */ - sms_log(pMac, LOGD, + sme_debug( "Enabling HB timer after WaitKey expiry" " (nHBCount=%d)", pMac->roam.configParam.HeartbeatThresh24); cfg_set_int(pMac, WNI_CFG_HEART_BEAT_THRESHOLD, pMac->roam.configParam.HeartbeatThresh24); } - sms_log(pMac, LOGE, " SME pre-auth state timeout. "); + sme_debug(" SME pre-auth state timeout. "); /* Change the substate so command queue is unblocked. */ if (CSR_ROAM_SESSION_MAX > pInfo->sessionId) { @@ -11947,7 +11849,7 @@ void csr_roam_wait_for_key_time_out_handler(void *pv) sme_release_global_lock(&pMac->sme); } } else { - sms_log(pMac, LOGE, "%s: session not found", __func__); + sme_err("session not found"); } } @@ -11971,18 +11873,18 @@ void csr_roam_roaming_offload_timer_action(tpAniSirGlobal mac_ctx, tCsrRoamSession *csr_session = CSR_GET_SESSION(mac_ctx, session_id); QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - FL("LFR3: timer action %d, session %d, intvl %d"), + ("LFR3: timer action %d, session %d, intvl %d"), action, session_id, interval); if (mac_ctx) { csr_session = CSR_GET_SESSION(mac_ctx, session_id); } else { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("LFR3: Invalid MAC Context")); + ("LFR3: Invalid MAC Context")); return; } if (!csr_session) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("LFR3: session %d not found"), session_id); + ("LFR3: session %d not found"), session_id); return; } csr_session->roamingTimerInfo.sessionId = (uint8_t) session_id; @@ -12005,8 +11907,8 @@ QDF_STATUS csr_roam_start_wait_for_key_timer(tpAniSirGlobal pMac, uint32_t inter pMac->roam.WaitForKeyTimerInfo. sessionId)) { /* Disable heartbeat timer when hand-off is in progress */ - sms_log(pMac, LOGD, - FL("disabling HB timer in state=%s sub-state=%s"), + sme_debug( + "disabling HB timer in state=%s sub-state=%s", mac_trace_get_neighbour_roam_state( pNeighborRoamInfo->neighborRoamState), mac_trace_getcsr_roam_sub_state( @@ -12014,7 +11916,7 @@ QDF_STATUS csr_roam_start_wait_for_key_timer(tpAniSirGlobal pMac, uint32_t inter WaitForKeyTimerInfo.sessionId])); cfg_set_int(pMac, WNI_CFG_HEART_BEAT_THRESHOLD, 0); } - sms_log(pMac, LOGD, " csrScanStartWaitForKeyTimer"); + sme_debug(" csrScanStartWaitForKeyTimer"); status = qdf_mc_timer_start(&pMac->roam.hTimerWaitForKey, interval / QDF_MC_TIMER_TO_MS_UNIT); @@ -12027,8 +11929,8 @@ QDF_STATUS csr_roam_stop_wait_for_key_timer(tpAniSirGlobal pMac) &pMac->roam.neighborRoamInfo[pMac->roam.WaitForKeyTimerInfo. sessionId]; - sms_log(pMac, LOGD, - FL("WaitForKey timer stopped in state=%s sub-state=%s"), + sme_debug( + "WaitForKey timer stopped in state=%s sub-state=%s", mac_trace_get_neighbour_roam_state(pNeighborRoamInfo-> neighborRoamState), mac_trace_getcsr_roam_sub_state(pMac->roam. @@ -12042,7 +11944,7 @@ QDF_STATUS csr_roam_stop_wait_for_key_timer(tpAniSirGlobal pMac) * Enable heartbeat timer when hand-off is in progress * and Key Wait timer got stopped for some reason */ - sms_log(pMac, LOGD, "Enabling HB timer after WaitKey stop" + sme_debug("Enabling HB timer after WaitKey stop" " (nHBCount=%d)", pMac->roam.configParam.HeartbeatThresh24); cfg_set_int(pMac, WNI_CFG_HEART_BEAT_THRESHOLD, @@ -12060,7 +11962,7 @@ void csr_roam_completion(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return; } @@ -12079,9 +11981,7 @@ void csr_roam_completion(tpAniSirGlobal pMac, uint32_t sessionId, QDF_ASSERT(pSession->bRefAssocStartCnt == 0); return; } - sms_log(pMac, LOGW, - FL - (" indicates association completion. roamResult = %d"), + sme_debug("indicates association completion. roamResult = %d", roamResult); csr_roam_call_callback(pMac, sessionId, pRoamInfo, roamId, roamStatus, roamResult); @@ -12101,7 +12001,7 @@ QDF_STATUS csr_roam_lost_link(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } /* Only need to roam for infra station. In this case P2P client will roam as well */ @@ -12122,7 +12022,7 @@ QDF_STATUS csr_roam_lost_link(tpAniSirGlobal pMac, uint32_t sessionId, pSession->joinFailStatusCode.reasonCode = pDeauthIndMsg->reasonCode; } else { - sms_log(pMac, LOGW, FL("gets an unknown type (%d)"), type); + sme_warn("gets an unknown type (%d)", type); result = eCSR_ROAM_RESULT_NONE; pSession->joinFailStatusCode.reasonCode = 1; } @@ -12160,7 +12060,7 @@ QDF_STATUS csr_roam_lost_link(tpAniSirGlobal pMac, uint32_t sessionId, roamInfo.reasonCode = pDeauthIndMsg->reasonCode; roamInfo.rxRssi = pDeauthIndMsg->rssi; } - sms_log(pMac, LOGW, FL("roamInfo.staId: %d"), roamInfo.staId); + sme_debug("roamInfo.staId: %d", roamInfo.staId); /* Dont initiate internal driver based roaming after disconnection*/ #ifndef NAPIER_SCAN /* See if we can possibly roam. If so, start the roaming process and notify HDD @@ -12197,16 +12097,16 @@ static void csr_roam_wm_status_change_complete(tpAniSirGlobal pMac, LL_ACCESS_LOCK)) { csr_release_command(pMac, pCommand); } else { - sms_log(pMac, LOGE, + sme_err( " ******csr_roam_wm_status_change_complete fail to release command"); } } else { - sms_log(pMac, LOGW, + sme_warn( "CSR: WmStatusChange Completion called but LOST LINK command is not ACTIVE ..."); } } else { - sms_log(pMac, LOGW, + sme_warn( "CSR: WmStatusChange Completion called but NO commands are ACTIVE ..."); } } @@ -12219,11 +12119,10 @@ void csr_roam_process_wm_status_change_command(tpAniSirGlobal pMac, tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, pCommand->sessionId); if (!pSession) { - sms_log(pMac, LOGE, FL(" session %d not found "), - pCommand->sessionId); + sme_err("session %d not found", pCommand->sessionId); return; } - sms_log(pMac, LOGD, FL("session:%d, CmdType : %d"), + sme_debug("session:%d, CmdType : %d", pCommand->sessionId, pCommand->u.wmStatusChangeCmd.Type); switch (pCommand->u.wmStatusChangeCmd.Type) { @@ -12244,7 +12143,7 @@ void csr_roam_process_wm_status_change_command(tpAniSirGlobal pMac, eWNI_SME_DEAUTH_IND, pSirSmeMsg); break; default: - sms_log(pMac, LOGW, FL("gets an unknown command %d"), + sme_warn("gets an unknown command %d", pCommand->u.wmStatusChangeCmd.Type); break; } @@ -12466,7 +12365,7 @@ csr_roam_get_phy_mode_band_for_bss(tpAniSirGlobal mac_ctx, *p_band = band; if (opr_chn == 14) { - sms_log(mac_ctx, LOGE, FL("Switching to Dot11B mode")); + sme_err("Switching to Dot11B mode"); cfg_dot11_mode = eCSR_CFG_DOT11_MODE_11B; } @@ -12502,7 +12401,7 @@ QDF_STATUS csr_roam_issue_stop_bss(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR @@ -12522,8 +12421,8 @@ QDF_STATUS csr_roam_issue_stop_bss(tpAniSirGlobal pMac, uint32_t sessionId, /* attempt to stop the Bss (reason code is ignored...) */ status = csr_send_mb_stop_bss_req_msg(pMac, sessionId); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGW, - FL("csr_send_mb_stop_bss_req_msg failed with status %d"), + sme_warn( + "csr_send_mb_stop_bss_req_msg failed with status %d", status); } return status; @@ -12579,7 +12478,7 @@ int8_t csr_get_cfg_max_tx_power(tpAniSirGlobal pMac, uint8_t channel) status = QDF_STATUS_SUCCESS; if (status != QDF_STATUS_SUCCESS) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("%s: failed to allocate memory, status = %d"), + "%s: failed to allocate memory, status = %d", __FUNCTION__, status); goto error; } @@ -12663,7 +12562,7 @@ static ePhyChanBondState csr_get_cb_mode_from_ies(tpAniSirGlobal pMac, (pIes->WPA.unicast_cipher_count == 1) && !memcmp(&(pIes->WPA.unicast_ciphers[0][0]), "\x00\x50\xf2\x02", 4)))) { - sms_log(pMac, LOGW, + sme_debug( " No channel bonding in TKIP mode "); return PHY_SINGLE_CHANNEL_CENTERED; } @@ -12676,7 +12575,7 @@ static ePhyChanBondState csr_get_cb_mode_from_ies(tpAniSirGlobal pMac, * value of supported channel width and recommended tx width as per * standard */ - sms_log(pMac, LOGD, "scws %u rtws %u sco %u", + sme_debug("scws %u rtws %u sco %u", pIes->HTCaps.supportedChannelWidthSet, pIes->HTInfo.recommendedTxWidthSet, pIes->HTInfo.secondaryChannelOffset); @@ -12702,7 +12601,7 @@ static ePhyChanBondState csr_get_cb_mode_from_ies(tpAniSirGlobal pMac, if ((PHY_SINGLE_CHANNEL_CENTERED != eRet) && (QDF_STATUS_SUCCESS != sme_check_ch_in_band(pMac, centerChn - 2, 2))) { - sms_log(pMac, LOGE, + sme_err( "Invalid center channel (%d), disable 40MHz mode", centerChn); eRet = PHY_SINGLE_CHANNEL_CENTERED; @@ -12977,8 +12876,8 @@ csr_populate_basic_rates(tSirMacRateSet *rate_set, bool is_ofdm_rates, rate_set->rate[4] |= CSR_DOT11_BASIC_RATE_MASK; } for (i = 0; i < rate_set->numRates; i++) - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - FL("Default OFDM rate is %2x"), rate_set->rate[i]); + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + ("Default OFDM rate is %2x"), rate_set->rate[i]); } else { rate_set->numRates = 4; qdf_mem_copy(rate_set->rate, cck_rates, sizeof(cck_rates)); @@ -12989,8 +12888,8 @@ csr_populate_basic_rates(tSirMacRateSet *rate_set, bool is_ofdm_rates, rate_set->rate[3] |= CSR_DOT11_BASIC_RATE_MASK; } for (i = 0; i < rate_set->numRates; i++) - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - FL("Default CCK rate is %2x"), rate_set->rate[i]); + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + ("Default CCK rate is %2x"), rate_set->rate[i]); } } @@ -13047,8 +12946,8 @@ static void csr_populate_supported_rates_from_hostapd(tSirMacRateSet *opr_rates, pProfile->supported_rates.rate, pProfile->supported_rates.numRates); for (i = 0; i < opr_rates->numRates; i++) - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - FL("Supported Rate is %2x"), opr_rates->rate[i]); + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + ("Supported Rate is %2x"), opr_rates->rate[i]); } if (pProfile->extended_rates.numRates) { ext_rates->numRates = @@ -13057,8 +12956,8 @@ static void csr_populate_supported_rates_from_hostapd(tSirMacRateSet *opr_rates, pProfile->extended_rates.rate, pProfile->extended_rates.numRates); for (i = 0; i < ext_rates->numRates; i++) - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - FL("Extended Rate is %2x"), ext_rates->rate[i]); + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + ("Extended Rate is %2x"), ext_rates->rate[i]); } } /** @@ -13098,7 +12997,7 @@ csr_roam_get_bss_start_parms(tpAniSirGlobal pMac, && (pParam->uCfgDot11Mode == eCSR_CFG_DOT11_MODE_11B)) { /* This should never happen */ QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_FATAL, - FL("For P2P (persona %d) dot11_mode is 11B"), + "For P2P (persona %d) dot11_mode is 11B", pProfile->csrPersona); QDF_ASSERT(0); } @@ -13120,9 +13019,9 @@ csr_roam_get_bss_start_parms(tpAniSirGlobal pMac, } else { switch (nw_type) { default: - sms_log(pMac, LOGE, - FL("sees an unknown pSirNwType (%d)"), - nw_type); + sme_err( + "sees an unknown pSirNwType (%d)", + nw_type); case eSIR_11A_NW_TYPE: csr_populate_basic_rates(opr_rates, true, true); if (eCSR_OPERATING_CHANNEL_ANY != tmp_opr_ch) { @@ -13194,7 +13093,7 @@ csr_roam_get_bss_start_parms_from_bss_desc(tpAniSirGlobal pMac, tCsrRoamStartBssParams *pParam) { if (!pParam) { - sms_log(pMac, LOGE, FL("BSS param's pointer is NULL")); + sme_err("BSS param's pointer is NULL"); return; } @@ -13206,15 +13105,15 @@ csr_roam_get_bss_start_parms_from_bss_desc(tpAniSirGlobal pMac, if (!pIes) { pParam->ssId.length = 0; pParam->operationalRateSet.numRates = 0; - sms_log(pMac, LOGE, FL("IEs struct pointer is NULL")); + sme_err("IEs struct pointer is NULL"); return; } if (pIes->SuppRates.present) { pParam->operationalRateSet.numRates = pIes->SuppRates.num_rates; if (pIes->SuppRates.num_rates > SIR_MAC_RATESET_EID_MAX) { - sms_log(pMac, LOGE, - FL("num_rates: %d > max val, resetting"), + sme_err( + "num_rates: %d > max val, resetting", pIes->SuppRates.num_rates); pIes->SuppRates.num_rates = SIR_MAC_RATESET_EID_MAX; } @@ -13226,8 +13125,8 @@ csr_roam_get_bss_start_parms_from_bss_desc(tpAniSirGlobal pMac, if (pIes->ExtSuppRates.present) { pParam->extendedRateSet.numRates = pIes->ExtSuppRates.num_rates; if (pIes->ExtSuppRates.num_rates > SIR_MAC_RATESET_EID_MAX) { - sms_log(pMac, LOGE, - FL("num_rates: %d > max val, resetting"), + sme_err( + "num_rates: %d > max val, resetting", pIes->ExtSuppRates.num_rates); pIes->ExtSuppRates.num_rates = SIR_MAC_RATESET_EID_MAX; } @@ -13379,7 +13278,7 @@ void csr_roam_prepare_bss_params(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return; } @@ -13414,7 +13313,7 @@ void csr_roam_prepare_bss_params(tpAniSirGlobal pMac, uint32_t sessionId, pProfile->operationChannel = Channel; if (Channel == 0) { - sms_log(pMac, LOGE, + sme_err( " CSR cannot find a channel to start IBSS"); } else { @@ -13431,7 +13330,7 @@ void csr_roam_prepare_bss_params(tpAniSirGlobal pMac, uint32_t sessionId, pMac->roam.configParam. channelBondingMode5GHz; } - sms_log(pMac, LOGD, "## cbMode %d", cbMode); + sme_debug("## cbMode %d", cbMode); pBssConfig->cbMode = cbMode; pSession->bssParams.cbMode = cbMode; } @@ -13510,7 +13409,7 @@ static void csr_roam_update_connected_profile_from_new_bss(tpAniSirGlobal pMac, tCsrRoamSession *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); return; } @@ -13531,7 +13430,7 @@ QDF_STATUS csr_roam_set_psk_pmk(tpAniSirGlobal pMac, uint32_t sessionId, { tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } qdf_mem_copy(pSession->psk_pmk, pPSK_PMK, sizeof(pSession->psk_pmk)); @@ -13577,11 +13476,11 @@ csr_roam_set_pmkid_cache(tpAniSirGlobal pMac, uint32_t sessionId, tPmkidCacheInfo *pmksa; if (!pSession) { - sms_log(pMac, LOGE, FL("session %d not found"), sessionId); + sme_err("session %d not found", sessionId); return QDF_STATUS_E_FAILURE; } - sms_log(pMac, LOGW, FL("numItems = %d"), numItems); + sme_debug("numItems = %d", numItems); if (numItems > CSR_MAX_PMKID_ALLOWED) return QDF_STATUS_E_INVAL; @@ -13640,13 +13539,13 @@ QDF_STATUS csr_roam_del_pmkid_from_cache(tpAniSirGlobal pMac, uint32_t i; if (!pSession) { - sms_log(pMac, LOGE, FL(" session %d not found "), sessionId); + sme_err("session %d not found", sessionId); return QDF_STATUS_E_FAILURE; } /* Check if there are no entries to delete */ if (0 == pSession->NumPmkidCache) { - sms_log(pMac, LOGD, FL("No entries to delete/Flush")); + sme_debug("No entries to delete/Flush"); return QDF_STATUS_SUCCESS; } @@ -13673,8 +13572,8 @@ QDF_STATUS csr_roam_del_pmkid_from_cache(tpAniSirGlobal pMac, } if (Index == CSR_MAX_PMKID_ALLOWED && !fMatchFound) { - sms_log(pMac, LOGD, FL("No such PMKSA entry exists" - MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pBSSId)); + sme_debug("No such PMKSA entry exists" + MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pBSSId)); return QDF_STATUS_SUCCESS; } @@ -13721,12 +13620,12 @@ QDF_STATUS csr_roam_get_pmkid_cache(tpAniSirGlobal pMac, uint32_t sessionId, uint16_t i, j; if (!pSession) { - sms_log(pMac, LOGE, FL("session %d not found "), sessionId); + sme_err("session %d not found", sessionId); return QDF_STATUS_E_FAILURE; } if (!pNum || !pPmkidCache) { - sms_log(pMac, LOGE, FL("Either pNum or pPmkidCache is NULL")); + sme_err("Either pNum or pPmkidCache is NULL"); return QDF_STATUS_E_FAILURE; } @@ -13740,9 +13639,8 @@ QDF_STATUS csr_roam_get_pmkid_cache(tpAniSirGlobal pMac, uint32_t sessionId, } if (pSession->NumPmkidCache > CSR_MAX_PMKID_ALLOWED) { - sms_log(pMac, LOGE, - FL( - "NumPmkidCache :%d is more than CSR_MAX_PMKID_ALLOWED, resetting to CSR_MAX_PMKID_ALLOWED"), + sme_err( + "NumPmkidCache :%d is more than CSR_MAX_PMKID_ALLOWED, resetting to CSR_MAX_PMKID_ALLOWED", pSession->NumPmkidCache); pSession->NumPmkidCache = CSR_MAX_PMKID_ALLOWED; } @@ -13771,7 +13669,7 @@ QDF_STATUS csr_roam_get_wpa_rsn_req_ie(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } @@ -13797,7 +13695,7 @@ QDF_STATUS csr_roam_get_wpa_rsn_rsp_ie(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } @@ -13824,7 +13722,7 @@ QDF_STATUS csr_roam_get_wapi_req_ie(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } @@ -13850,7 +13748,7 @@ QDF_STATUS csr_roam_get_wapi_rsp_ie(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } @@ -13874,7 +13772,7 @@ eRoamCmdStatus csr_get_roam_complete_status(tpAniSirGlobal pMac, uint32_t sessio tCsrRoamSession *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); return retStatus; } @@ -13991,7 +13889,7 @@ static QDF_STATUS csr_roam_start_wds(tpAniSirGlobal pMac, uint32_t sessionId, tBssConfigParam bssConfig; if (!pSession) { - sms_log(pMac, LOGE, FL(" session %d not found "), sessionId); + sme_err("session %d not found", sessionId); return QDF_STATUS_E_FAILURE; } @@ -14072,7 +13970,7 @@ static void csr_add_supported_5Ghz_channels(tpAniSirGlobal mac_ctx, uint32_t size = 0; if (!chan_list) { - sms_log(mac_ctx, LOGE, FL("chan_list buffer NULL")); + sme_err("chan_list buffer NULL"); return; } @@ -14097,8 +13995,7 @@ static void csr_add_supported_5Ghz_channels(tpAniSirGlobal mac_ctx, } *num_chnl = (uint8_t)j; } else { - sms_log(mac_ctx, LOGE, - FL("can not find any valid channel")); + sme_err("can not find any valid channel"); *num_chnl = 0; } } @@ -14211,12 +14108,12 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, QDF_STATUS packetdump_timer_status; if (!pSession) { - sms_log(pMac, LOGE, FL(" session %d not found "), sessionId); + sme_err("session %d not found", sessionId); return QDF_STATUS_E_FAILURE; } /* To satisfy klockworks */ if (NULL == pBssDescription) { - sms_log(pMac, LOGE, FL(" pBssDescription is NULL")); + sme_err(" pBssDescription is NULL"); return QDF_STATUS_E_FAILURE; } neigh_roam_info = &pMac->roam.neighborRoamInfo[sessionId]; @@ -14226,8 +14123,8 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, (neigh_roam_info->cfgParams.neighborLookupThreshold - neigh_roam_info->cfgParams.hi_rssi_scan_rssi_delta))) { pSession->disable_hi_rssi = true; - sms_log(pMac, LOGD, - FL("Disabling HI_RSSI feature, AP channel=%d, rssi=%d"), + sme_debug( + "Disabling HI_RSSI feature, AP channel=%d, rssi=%d", pBssDescription->channelId, pBssDescription->rssi); } else { pSession->disable_hi_rssi = false; @@ -14277,9 +14174,9 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, csr_join_req->ssId.length = 0; qdf_mem_copy(&csr_join_req->selfMacAddr, &pSession->selfMacAddr, sizeof(tSirMacAddr)); - sms_log(pMac, LOGE, - FL("Connecting to ssid:%.*s bssid: " - MAC_ADDRESS_STR" rssi: %d channel: %d country_code: %c%c"), + sme_err( + "Connecting to ssid:%.*s bssid: " + MAC_ADDRESS_STR" rssi: %d channel: %d country_code: %c%c", pIes->SSID.num_ssid, pIes->SSID.ssid, MAC_ADDR_ARRAY(pBssDescription->bssId), pBssDescription->rssi, pBssDescription->channelId, @@ -14308,11 +14205,9 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, csr_join_req->staPersona = (uint8_t) pProfile->csrPersona; csr_join_req->wps_registration = pProfile->bWPSAssociation; csr_join_req->cbMode = (uint8_t) pSession->bssParams.cbMode; - sms_log(pMac, LOGD, - FL("CSR PERSONA=%d CSR CbMode %d dot11mode: %d"), - pProfile->csrPersona, pSession->bssParams.cbMode, - csr_join_req->dot11mode); - + sme_debug( + "CSR PERSONA=%d CSR CbMode %d", + pProfile->csrPersona, pSession->bssParams.cbMode); csr_join_req->uapsdPerAcBitmask = pProfile->uapsd_mask; pSession->uapsd_mask = pProfile->uapsd_mask; status = @@ -14375,9 +14270,8 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, /* remember the IE for future use */ if (ieLen) { if (ieLen > DOT11F_IE_RSN_MAX_LEN) { - sms_log(pMac, LOGE, - FL - (" WPA RSN IE length :%d is more than DOT11F_IE_RSN_MAX_LEN, resetting to %d"), + sme_err( + " WPA RSN IE length :%d is more than DOT11F_IE_RSN_MAX_LEN, resetting to %d", ieLen, DOT11F_IE_RSN_MAX_LEN); ieLen = DOT11F_IE_RSN_MAX_LEN; } @@ -14685,8 +14579,8 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, &pSession->htConfig, sizeof(tSirHTConfig)); qdf_mem_copy(&csr_join_req->vht_config, &pSession->vht_config, sizeof(pSession->vht_config)); - sms_log(pMac, LOGD, - FL("ht capability 0x%x VHT capability 0x%x"), + sme_debug( + "ht capability 0x%x VHT capability 0x%x", (unsigned int)(*(uint32_t *) &csr_join_req->htConfig), (unsigned int)(*(uint32_t *) &csr_join_req->vht_config)); @@ -14696,12 +14590,12 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, if (wlan_cfg_get_int(pMac, WNI_CFG_VHT_SU_BEAMFORMEE_CAP, &value) != eSIR_SUCCESS) QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - FL("Failed to get SU beamformee capability")); + ("Failed to get SU beamformee capability")); if (wlan_cfg_get_int(pMac, WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED, &value1) != eSIR_SUCCESS) QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - FL("Failed to get CSN beamformee capability")); + ("Failed to get CSN beamformee capability")); csr_join_req->vht_config.su_beam_formee = value; if (value) { @@ -14724,7 +14618,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, WNI_CFG_VHT_MU_BEAMFORMEE_CAP, &value) != eSIR_SUCCESS) QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - FL("Failed to get CSN beamformee capability")); + ("Failed to get CSN beamformee capability")); csr_join_req->vht_config.mu_beam_formee = (uint8_t) value; csr_join_req->enableVhtpAid = @@ -14823,7 +14717,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, channelId)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("STA-conn on 5G isn't allowed")); + "STA-conn on 5G isn't allowed"); status = QDF_STATUS_E_FAILURE; break; } @@ -14861,8 +14755,8 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, break; } else { if (pProfile->csrPersona == QDF_STA_MODE) { - sms_log(pMac, LOGD, - FL(" Invoking packetdump register API")); + sme_debug( + " Invoking packetdump register API"); wlan_register_txrx_packetdump(); packetdump_timer_status = qdf_mc_timer_start( @@ -14872,10 +14766,10 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, QDF_MC_TIMER_TO_MS_UNIT); if (!QDF_IS_STATUS_SUCCESS( packetdump_timer_status)) { - sms_log(pMac, LOGE, - FL("cannot start packetdump timer")); - sms_log(pMac, LOGE, - FL("packetdump_timer_status: %d"), + sme_err( + "cannot start packetdump timer"); + sme_err( + "packetdump_timer_status: %d", packetdump_timer_status); } } @@ -15020,7 +14914,7 @@ QDF_STATUS csr_send_chng_mcc_beacon_interval(tpAniSirGlobal pMac, uint32_t sessi tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } /* NO need to update the Beacon Params if update beacon parameter flag is not set */ @@ -15042,11 +14936,11 @@ QDF_STATUS csr_send_chng_mcc_beacon_interval(tpAniSirGlobal pMac, uint32_t sessi pMsg->length = len; qdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr); - sms_log(pMac, LOGD, - FL("CSR Attempting to change BI for Bssid= " - MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pMsg->bssid.bytes)); + sme_debug( + "CSR Attempting to change BI for Bssid= " + MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pMsg->bssid.bytes)); pMsg->sessionId = sessionId; - sms_log(pMac, LOGD, FL(" session %d BeaconInterval %d"), + sme_debug(" session %d BeaconInterval %d", sessionId, pMac->roam.roamSession[sessionId].bssParams. beaconInterval); @@ -15067,7 +14961,7 @@ QDF_STATUS csr_set_ht2040_mode(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } @@ -15084,11 +14978,11 @@ QDF_STATUS csr_set_ht2040_mode(tpAniSirGlobal pMac, uint32_t sessionId, pMsg->length = len; qdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr); - sms_log(pMac, LOGD, - FL("CSR Attempting to set HT20/40 mode for Bssid= " - MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pMsg->bssid.bytes)); + sme_debug( + "CSR Attempting to set HT20/40 mode for Bssid= " + MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pMsg->bssid.bytes)); pMsg->sessionId = sessionId; - sms_log(pMac, LOGD, FL(" session %d HT20/40 mode %d"), + sme_debug(" session %d HT20/40 mode %d", sessionId, cbMode); pMsg->cbMode = cbMode; pMsg->obssEnabled = obssEnabled; @@ -15210,8 +15104,8 @@ QDF_STATUS csr_send_assoc_cnf_msg(tpAniSirGlobal pMac, tpSirSmeAssocInd pAssocIn QDF_STATUS status = QDF_STATUS_SUCCESS; tSirSmeAssocCnf *pMsg; - sms_log(pMac, LOGD, - FL("Posting eWNI_SME_ASSOC_CNF to LIM.HalStatus :%d"), + sme_debug( + "Posting eWNI_SME_ASSOC_CNF to LIM.HalStatus :%d", Halstatus); do { pMsg = qdf_mem_malloc(sizeof(tSirSmeAssocCnf)); @@ -15336,7 +15230,7 @@ QDF_STATUS csr_send_mb_set_context_req_msg(tpAniSirGlobal pMac, uint16_t msgLen; QDF_STATUS status = QDF_STATUS_E_FAILURE; tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); - sms_log(pMac, LOGD, FL("keylength is %d, Encry type is : %d"), + sme_debug("keylength is %d, Encry type is : %d", keyLength, edType); do { if ((1 != numKeys) && (0 != numKeys)) @@ -15400,7 +15294,7 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } @@ -15463,7 +15357,7 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId if (wlan_cfg_get_int(pMac, WNI_CFG_VHT_SU_BEAMFORMEE_CAP, &value) != eSIR_SUCCESS) QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - FL("could not get SU beam formee capability")); + "could not get SU beam formee capability"); pMsg->vht_config.su_beam_formee = (uint8_t)value && (uint8_t)pMac->roam.configParam.enable_txbf_sap_mode; @@ -15471,7 +15365,7 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED, &value) != eSIR_SUCCESS) QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - FL("Failed to get CSN beamformee capability")); + ("Failed to get CSN beamformee capability")); pMsg->vht_config.csnof_beamformer_antSup = (uint8_t)value; #ifdef WLAN_FEATURE_11W @@ -15510,7 +15404,7 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId qdf_mem_copy(&pMsg->htConfig, &pSession->htConfig, sizeof(tSirHTConfig)); - sms_log(pMac, LOGD, FL("ht capability 0x%x VHT capability 0x%x"), + sme_debug("ht capability 0x%x VHT capability 0x%x", (uint32_t)(*(uint32_t *) &pMsg->htConfig), (uint32_t)(*(uint32_t *) &pMsg->vht_config)); if (IS_DOT11_MODE_HE(pMsg->dot11mode)) @@ -15535,7 +15429,7 @@ QDF_STATUS csr_send_mb_stop_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId) tCsrRoamSession *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); return QDF_STATUS_E_FAILURE; } @@ -15596,20 +15490,20 @@ QDF_STATUS csr_process_add_sta_session_rsp(tpAniSirGlobal pMac, uint8_t *pMsg) QDF_STATUS status; if (pMsg == NULL) { - sms_log(pMac, LOGE, "in %s msg ptr is NULL", __func__); + sme_err("in %s msg ptr is NULL", __func__); return QDF_STATUS_E_FAILURE; } rsp = (struct add_sta_self_params *) pMsg; - sms_log(pMac, LOGD, "Add Sta self rsp status = %d", rsp->status); + sme_debug("Add Sta self rsp status = %d", rsp->status); if (QDF_STATUS_SUCCESS == rsp->status && (WMI_VDEV_TYPE_STA == rsp->type || (WMI_VDEV_TYPE_AP == rsp->type && WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE == rsp->sub_type))) { - sms_log(pMac, LOGD, FL("send SET IE msg to PE")); + sme_debug("send SET IE msg to PE"); msg = qdf_mem_malloc(sizeof(*msg)); if (NULL == msg) { - sms_log(pMac, LOGE, FL("Memory allocation failed")); + sme_err("Memory allocation failed"); return QDF_STATUS_E_NOMEM; } @@ -15618,8 +15512,7 @@ QDF_STATUS csr_process_add_sta_session_rsp(tpAniSirGlobal pMac, uint8_t *pMsg) msg->length = sizeof(*msg); status = umac_send_mb_message_to_mac(msg); if (!QDF_IS_STATUS_SUCCESS(status)) - sms_log(pMac, LOGE, - FL("Failed to send down the set IE req ")); + sme_err("Failed to send down the set IE req "); } csr_roam_session_opened(pMac, rsp->session_id); @@ -15673,10 +15566,10 @@ void csr_get_vdev_type_nss(tpAniSirGlobal mac_ctx, default: *nss_2g = 1; *nss_5g = 1; - sms_log(mac_ctx, LOGE, FL("Unknown device mode")); + sme_err("Unknown device mode"); break; } - sms_log(mac_ctx, LOGD, FL("mode - %d: nss_2g - %d, 5g - %d"), + sme_debug("mode - %d: nss_2g - %d, 5g - %d", dev_mode, *nss_2g, *nss_5g); } @@ -15694,8 +15587,7 @@ QDF_STATUS csr_issue_add_sta_for_session_req(tpAniSirGlobal pMac, add_sta_self_req = qdf_mem_malloc(sizeof(struct add_sta_self_params)); if (NULL == add_sta_self_req) { - sms_log(pMac, LOGP, - FL("Unable to allocate memory for tAddSelfStaParams")); + sme_err("Unable to allocate memory for tAddSelfStaParams"); return QDF_STATUS_E_NOMEM; } @@ -15721,14 +15613,13 @@ QDF_STATUS csr_issue_add_sta_for_session_req(tpAniSirGlobal pMac, msg.bodyptr = add_sta_self_req; msg.bodyval = 0; - sms_log(pMac, LOGD, - FL - ("Send WMA_ADD_STA_SELF_REQ for selfMac=" MAC_ADDRESS_STR), + sme_debug( + "Send WMA_ADD_STA_SELF_REQ for selfMac=" MAC_ADDRESS_STR, MAC_ADDR_ARRAY(add_sta_self_req->self_mac_addr)); status = wma_post_ctrl_msg(pMac, &msg); if (status != QDF_STATUS_SUCCESS) { - sms_log(pMac, LOGP, FL("wma_post_ctrl_msg failed")); + sme_err("wma_post_ctrl_msg failed"); qdf_mem_free(add_sta_self_req); add_sta_self_req = NULL; } @@ -15756,9 +15647,8 @@ QDF_STATUS csr_roam_open_session(tpAniSirGlobal mac_ctx, (struct qdf_mac_addr *)pSelfMacAddr, &existing_session_id); if (QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("Session %d exists with mac address " - MAC_ADDRESS_STR), + sme_err("Session %d exists with mac address " + MAC_ADDRESS_STR, existing_session_id, MAC_ADDR_ARRAY(pSelfMacAddr)); return QDF_STATUS_E_FAILURE; } @@ -15766,16 +15656,14 @@ QDF_STATUS csr_roam_open_session(tpAniSirGlobal mac_ctx, /* attempt to retrieve session for Id */ session = CSR_GET_SESSION(mac_ctx, session_id); if (!session) { - sms_log(mac_ctx, LOGE, - FL("Session does not exist for interface %d"), + sme_err("Session does not exist for interface %d", session_id); return QDF_STATUS_E_FAILURE; } /* check to see if the session is already active */ if (session->sessionActive) { - sms_log(mac_ctx, LOGE, - FL("Cannot re-open active session with Id %d"), + sme_err("Cannot re-open active session with Id %d", session_id); return QDF_STATUS_E_FAILURE; } @@ -15795,8 +15683,7 @@ QDF_STATUS csr_roam_open_session(tpAniSirGlobal mac_ctx, csr_roam_roaming_timer_handler, &session->roamingTimerInfo); if (QDF_IS_STATUS_ERROR(status)) { - sms_log(mac_ctx, LOGE, - FL("cannot allocate memory for Roaming timer")); + sme_err("cannot allocate memory for Roaming timer"); return status; } @@ -15805,14 +15692,14 @@ QDF_STATUS csr_roam_open_session(tpAniSirGlobal mac_ctx, csr_roam_roaming_offload_timeout_handler, &session->roamingTimerInfo); if (QDF_IS_STATUS_ERROR(status)) { - sms_log(mac_ctx, LOGE, FL("mem fail for roaming timer")); + sme_err("mem fail for roaming timer"); return status; } /* get the HT capability info */ if (wlan_cfg_get_int(mac_ctx, WNI_CFG_HT_CAP_INFO, &nCfgValue) != eSIR_SUCCESS) { - sms_log(mac_ctx, LOG1, FL("could not get HT capability info")); + sme_err("could not get HT capability info"); return QDF_STATUS_SUCCESS; } @@ -15828,8 +15715,7 @@ QDF_STATUS csr_roam_open_session(tpAniSirGlobal mac_ctx, csr_roam_join_retry_timer_handler, &session->joinRetryTimerInfo); if (QDF_IS_STATUS_ERROR(status)) { - sms_log(mac_ctx, LOGE, - FL("cannot allocate memory for join retry timer")); + sme_err("cannot allocate memory for join retry timer"); return status; } #endif /* FEATURE_WLAN_BTAMP_UT_RF */ @@ -15923,23 +15809,23 @@ QDF_STATUS csr_process_del_sta_session_rsp(tpAniSirGlobal pMac, uint8_t *pMsg) uint8_t sessionId; if (pMsg == NULL) { - sms_log(pMac, LOGE, FL("msg ptr is NULL")); + sme_err("msg ptr is NULL"); return status; } rsp = (struct del_sta_self_params *) pMsg; sessionId = rsp->session_id; - sms_log(pMac, LOG1, FL("Del Sta rsp status = %d"), rsp->status); + sme_debug("Del Sta rsp status = %d", rsp->status); /* This session is done. */ csr_cleanup_session(pMac, sessionId); if (rsp->sme_callback) { status = sme_release_global_lock(&pMac->sme); if (!QDF_IS_STATUS_SUCCESS(status)) - sms_log(pMac, LOG1, FL("Failed to Release Lock")); + sme_debug("Failed to Release Lock"); else { rsp->sme_callback(rsp->sme_ctx); status = sme_acquire_global_lock(&pMac->sme); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOG1, FL("Failed to get Lock")); + sme_debug("Failed to get Lock"); return status; } } @@ -15960,8 +15846,7 @@ csr_issue_del_sta_for_session_req(tpAniSirGlobal pMac, uint32_t sessionId, QDF_STATUS status = QDF_STATUS_E_FAILURE; del_sta_self_req = qdf_mem_malloc(sizeof(struct del_sta_self_params)); if (NULL == del_sta_self_req) { - sms_log(pMac, LOGP, - FL(" mem alloc failed for tDelStaSelfParams")); + sme_err(" mem alloc failed for tDelStaSelfParams"); return QDF_STATUS_E_NOMEM; } @@ -15976,11 +15861,10 @@ csr_issue_del_sta_for_session_req(tpAniSirGlobal pMac, uint32_t sessionId, msg.bodyptr = del_sta_self_req; msg.bodyval = 0; - sms_log(pMac, LOGD, - FL("sending WMA_DEL_STA_SELF_REQ")); + sme_debug("sending WMA_DEL_STA_SELF_REQ"); status = wma_post_ctrl_msg(pMac, &msg); if (status != QDF_STATUS_SUCCESS) { - sms_log(pMac, LOGP, FL("wma_post_ctrl_msg failed")); + sme_err("wma_post_ctrl_msg failed"); qdf_mem_free(del_sta_self_req); } return status; @@ -16042,7 +15926,7 @@ static void csr_init_session(tpAniSirGlobal pMac, uint32_t sessionId) tCsrRoamSession *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); return; } @@ -16143,7 +16027,7 @@ static void csr_roam_link_up(tpAniSirGlobal pMac, struct qdf_mac_addr bssid) * profile info from pmac global structure */ - sms_log(pMac, LOGW, + sme_debug( " csr_roam_link_up: WLAN link UP with AP= " MAC_ADDRESS_STR, MAC_ADDR_ARRAY(bssid.bytes)); /* Check for user misconfig of RSSI trigger threshold */ @@ -16169,7 +16053,7 @@ static void csr_roam_link_down(tpAniSirGlobal pMac, uint32_t sessionId) tCsrRoamSession *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); return; } /* Only to handle the case for Handover on infra link */ @@ -16183,7 +16067,7 @@ static void csr_roam_link_down(tpAniSirGlobal pMac, uint32_t sessionId) if (csr_roam_is_sta_mode(pMac, sessionId) && !CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId) && !csr_roam_is11r_assoc(pMac, sessionId)) { - sms_log(pMac, LOGD, FL("Inform Link lost for session %d"), + sme_debug("Inform Link lost for session %d", sessionId); csr_roam_call_callback(pMac, sessionId, NULL, 0, eCSR_ROAM_LOSTLINK, @@ -16211,9 +16095,8 @@ void csr_roam_tl_stats_timer_handler(void *pv) QDF_STATUS status; pMac->roam.tlStatsReqInfo.timerRunning = false; - sms_log(pMac, LOGD, - FL - (" TL stat timer is no-op. It needs to support multiple stations")); + sme_debug( + " TL stat timer is no-op. It needs to support multiple stations"); if (!pMac->roam.tlStatsReqInfo.timerRunning) { if (pMac->roam.tlStatsReqInfo.periodicity) { @@ -16224,9 +16107,8 @@ void csr_roam_tl_stats_timer_handler(void *pv) pMac->roam.tlStatsReqInfo. periodicity); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL - ("csr_roam_tl_stats_timer_handler:cannot start TlStatsTimer timer")); + sme_err( + "csr_roam_tl_stats_timer_handler:cannot start TlStatsTimer timer"); return; } pMac->roam.tlStatsReqInfo.timerRunning = true; @@ -16249,9 +16131,8 @@ void csr_roam_pe_stats_timer_handler(void *pv) qdf_status = qdf_mc_timer_destroy(&pPeStatsReqListEntry->hPeStatsTimer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - sms_log(pMac, LOGE, - FL - ("csr_roam_pe_stats_timer_handler:failed to destroy hPeStatsTimer timer")); + sme_err( + "csr_roam_pe_stats_timer_handler:failed to destroy hPeStatsTimer timer"); } /* Free the entry */ qdf_mem_free(pPeStatsReqListEntry); @@ -16267,9 +16148,8 @@ void csr_roam_pe_stats_timer_handler(void *pv) pPeStatsReqListEntry-> sessionId); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL - ("csr_roam_pe_stats_timer_handler:failed to send down stats req to PE")); + sme_err( + "csr_roam_pe_stats_timer_handler:failed to send down stats req to PE"); } else { pPeStatsReqListEntry->rspPending = true; } @@ -16293,9 +16173,8 @@ void csr_roam_pe_stats_timer_handler(void *pv) pPeStatsReqListEntry-> periodicity); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - sms_log(pMac, LOGE, - FL - ("csr_roam_pe_stats_timer_handler:cannot start hPeStatsTimer timer")); + sme_err( + "csr_roam_pe_stats_timer_handler:cannot start hPeStatsTimer timer"); return; } pPeStatsReqListEntry->timerRunning = true; @@ -16310,8 +16189,8 @@ void csr_roam_stats_client_timer_handler(void *pv) tCsrStatsClientReqInfo *pStaEntry = (tCsrStatsClientReqInfo *) pv; if (QDF_TIMER_STATE_STOPPED == qdf_mc_timer_get_current_state(&pStaEntry->timer)) { - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - FL("roam stats client timer is stopped")); + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + "roam stats client timer is stopped"); } } @@ -16322,7 +16201,7 @@ QDF_STATUS csr_send_mb_stats_req_msg(tpAniSirGlobal pMac, uint32_t statsMask, QDF_STATUS status = QDF_STATUS_SUCCESS; pMsg = qdf_mem_malloc(sizeof(tAniGetPEStatsReq)); if (NULL == pMsg) { - sms_log(pMac, LOGE, FL("Failed to allocate mem for stats req ")); + sme_err("Failed to allocate mem for stats req "); return QDF_STATUS_E_NOMEM; } /* need to initiate a stats request to PE */ @@ -16333,7 +16212,7 @@ QDF_STATUS csr_send_mb_stats_req_msg(tpAniSirGlobal pMac, uint32_t statsMask, pMsg->sessionId = sessionId; status = umac_send_mb_message_to_mac(pMsg); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGD, FL("Failed to send down the stats req ")); + sme_debug("Failed to send down the stats req "); } return status; } @@ -16358,29 +16237,28 @@ csr_update_stats(tpAniSirGlobal mac, uint8_t stats_type, { switch (stats_type) { case eCsrSummaryStats: - sms_log(mac, LOGD, FL("summary stats")); + sme_debug("summary stats"); qdf_mem_copy((uint8_t *) &mac->roam.summaryStatsInfo, *stats, sizeof(tCsrSummaryStatsInfo)); *stats += sizeof(tCsrSummaryStatsInfo); *length -= sizeof(tCsrSummaryStatsInfo); break; case eCsrGlobalClassAStats: - sms_log(mac, LOGD, FL("ClassA stats")); + sme_debug("ClassA stats"); qdf_mem_copy((uint8_t *) &mac->roam.classAStatsInfo, *stats, sizeof(tCsrGlobalClassAStatsInfo)); *stats += sizeof(tCsrGlobalClassAStatsInfo); *length -= sizeof(tCsrGlobalClassAStatsInfo); break; case csr_per_chain_rssi_stats: - sms_log(mac, LOGD, - FL("csrRoamStatsRspProcessor:Per Chain RSSI stats")); + sme_debug("csrRoamStatsRspProcessor:Per Chain RSSI stats"); qdf_mem_copy((uint8_t *)&mac->roam.per_chain_rssi_stats, *stats, sizeof(struct csr_per_chain_rssi_stats_info)); *stats += sizeof(struct csr_per_chain_rssi_stats_info); *length -= sizeof(struct csr_per_chain_rssi_stats_info); break; default: - sms_log(mac, LOGW, FL("unknown stats type")); + sme_warn("unknown stats type"); break; } } @@ -16409,7 +16287,7 @@ void csr_roam_stats_rsp_processor(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg) pSmeStatsRsp = (tAniGetPEStatsRsp *) pSirMsg; if (pSmeStatsRsp->rc) { - sms_log(pMac, LOGW, FL("stats rsp from PE shows failure")); + sme_warn("stats rsp from PE shows failure"); goto post_update; } tempMask = pSmeStatsRsp->statsMask; @@ -16489,15 +16367,13 @@ tListElem *csr_roam_find_in_pe_stats_req_list(tpAniSirGlobal pMac, uint32_t stat pEntry = csr_ll_peek_head(&pMac->roam.peStatsReqList, LL_ACCESS_LOCK); if (!pEntry) { /* list empty */ - sms_log(pMac, LOGD, + sme_debug( "csr_roam_find_in_pe_stats_req_list: List empty, no request to PE"); return NULL; } while (pEntry) { pTempStaEntry = GET_BASE_ADDR(pEntry, tCsrPeStatsReqInfo, link); if (pTempStaEntry->statsMask == statsMask) { - sms_log(pMac, LOG3, - "csr_roam_find_in_pe_stats_req_list: match found"); break; } pEntry = @@ -16517,7 +16393,7 @@ tListElem *csr_roam_checkn_update_client_req_list(tpAniSirGlobal pMac, pEntry = csr_ll_peek_head(&pMac->roam.statsClientReqList, LL_ACCESS_LOCK); if (!pEntry) { /* list empty */ - sms_log(pMac, LOGD, + sme_debug( "csr_roam_checkn_update_client_req_list: List empty, no request from " "upper layer client(s)"); return NULL; @@ -16527,8 +16403,6 @@ tListElem *csr_roam_checkn_update_client_req_list(tpAniSirGlobal pMac, GET_BASE_ADDR(pEntry, tCsrStatsClientReqInfo, link); if ((pTempStaEntry->requesterId == pStaEntry->requesterId) && (pTempStaEntry->statsMask == pStaEntry->statsMask)) { - sms_log(pMac, LOG3, - "csr_roam_checkn_update_client_req_list: match found"); if (update) { pTempStaEntry->periodicity = pStaEntry->periodicity; @@ -16551,7 +16425,7 @@ tListElem *csr_roam_check_client_req_list(tpAniSirGlobal pMac, uint32_t statsMas pEntry = csr_ll_peek_head(&pMac->roam.statsClientReqList, LL_ACCESS_LOCK); if (!pEntry) { /* list empty */ - sms_log(pMac, LOGD, + sme_debug( "csr_roam_check_client_req_list: List empty, no request from " "upper layer client(s)"); return NULL; @@ -16561,8 +16435,6 @@ tListElem *csr_roam_check_client_req_list(tpAniSirGlobal pMac, uint32_t statsMas GET_BASE_ADDR(pEntry, tCsrStatsClientReqInfo, link); if ((pTempStaEntry-> statsMask & ~(1 << eCsrGlobalClassDStats)) == statsMask) { - sms_log(pMac, LOG3, - "csr_roam_check_client_req_list: match found"); break; } pEntry = @@ -16588,23 +16460,23 @@ void csr_roam_vcc_trigger(tpAniSirGlobal pMac) QDF_ASSERT(ul_mac_loss_trigger_threshold != 0); return; } - sms_log(pMac, LOGW, "csr_roam_vcc_trigger: UL_MAC_LOSS_THRESHOLD is %d", + sme_debug("csr_roam_vcc_trigger: UL_MAC_LOSS_THRESHOLD is %d", ul_mac_loss_trigger_threshold); if (ul_mac_loss_trigger_threshold < ul_mac_loss) { - sms_log(pMac, LOGW, "csr_roam_vcc_trigger: link quality is POOR "); + sme_debug("csr_roam_vcc_trigger: link quality is POOR "); newVccLinkQuality = eCSR_ROAM_LINK_QUAL_POOR_IND; } else { - sms_log(pMac, LOGW, "csr_roam_vcc_trigger: link quality is GOOD"); + sme_debug("csr_roam_vcc_trigger: link quality is GOOD"); newVccLinkQuality = eCSR_ROAM_LINK_QUAL_GOOD_IND; } - sms_log(pMac, LOGW, + sme_debug( "csr_roam_vcc_trigger: link qual : *** UL_MAC_LOSS %d *** ", ul_mac_loss); if (newVccLinkQuality != pMac->roam.vccLinkQuality) { - sms_log(pMac, LOGW, + sme_debug( "csr_roam_vcc_trigger: link quality changed: trigger necessary"); if (NULL != pMac->roam.linkQualityIndInfo.callback) { - sms_log(pMac, LOGW, + sme_debug( "csr_roam_vcc_trigger: link quality indication %d", newVccLinkQuality); @@ -16631,7 +16503,7 @@ tCsrStatsClientReqInfo *csr_roam_insert_entry_into_list(tpAniSirGlobal pMac, pNewStaEntry = qdf_mem_malloc(sizeof(tCsrStatsClientReqInfo)); if (NULL == pNewStaEntry) { - sms_log(pMac, LOGW, + sme_err( "csr_roam_insert_entry_into_list: couldn't allocate memory for the " "entry"); return NULL; @@ -16662,7 +16534,7 @@ tCsrPeStatsReqInfo *csr_roam_insert_entry_into_pe_stats_req_list(tpAniSirGlobal tCsrPeStatsReqInfo *pNewStaEntry = NULL; pNewStaEntry = qdf_mem_malloc(sizeof(tCsrPeStatsReqInfo)); if (NULL == pNewStaEntry) { - sms_log(pMac, LOGW, + sme_err( "csr_roam_insert_entry_into_pe_stats_req_list: couldn't allocate memory for the " "entry"); return NULL; @@ -16692,18 +16564,18 @@ QDF_STATUS csr_get_rssi(tpAniSirGlobal pMac, uint32_t sessionId; tAniGetRssiReq *pMsg; - sms_log(pMac, LOGD, FL("called")); + sme_debug("called"); status = csr_roam_get_session_id_from_bssid(pMac, &bssId, &sessionId); if (!QDF_IS_STATUS_SUCCESS(status)) { callback(lastRSSI, staId, pContext); - sms_log(pMac, LOGE, FL("Failed to get SessionId")); + sme_err("Failed to get SessionId"); return QDF_STATUS_E_FAILURE; } pMsg = qdf_mem_malloc(sizeof(tAniGetRssiReq)); if (NULL == pMsg) { - sms_log(pMac, LOGE, + sme_err( " csr_get_rssi: failed to allocate mem for req "); return QDF_STATUS_E_NOMEM; } @@ -16725,11 +16597,11 @@ QDF_STATUS csr_get_rssi(tpAniSirGlobal pMac, msg.reserved = 0; if (QDF_STATUS_SUCCESS != scheduler_post_msg(QDF_MODULE_ID_SME, &msg)) { - sms_log(pMac, LOGE, " csr_get_rssi failed to post msg to self "); + sme_err("scheduler_post_msg failed to post msg to self"); qdf_mem_free((void *)pMsg); status = QDF_STATUS_E_FAILURE; } - sms_log(pMac, LOGD, FL("returned")); + sme_debug("returned"); return status; } @@ -16743,12 +16615,11 @@ QDF_STATUS csr_get_snr(tpAniSirGlobal pMac, tAniGetSnrReq *pMsg; - sms_log(pMac, LOGD, FL("called")); + sme_debug("called"); pMsg = (tAniGetSnrReq *) qdf_mem_malloc(sizeof(tAniGetSnrReq)); if (NULL == pMsg) { - sms_log(pMac, LOGE, "%s: failed to allocate mem for req", - __func__); + sme_err("failed to allocate mem for req"); return QDF_STATUS_E_NOMEM; } @@ -16766,12 +16637,12 @@ QDF_STATUS csr_get_snr(tpAniSirGlobal pMac, if (QDF_STATUS_SUCCESS != scheduler_post_msg(QDF_MODULE_ID_SME, &msg)) { - sms_log(pMac, LOGE, "%s failed to post msg to self", __func__); + sme_err("failed to post msg to self"); qdf_mem_free((void *)pMsg); status = QDF_STATUS_E_FAILURE; } - sms_log(pMac, LOGD, FL("returned")); + sme_debug("returned"); return status; } @@ -16793,8 +16664,8 @@ csr_deregister_client_request(tpAniSirGlobal mac_ctx, entry = csr_roam_checkn_update_client_req_list(mac_ctx, sta_entry, false); if (!entry) { - sms_log(mac_ctx, LOGW, - FL("callback is empty in the request & couldn't find any existing request in statsClientReqList")); + sme_err( + "callback is empty in the request & couldn't find any existing request in statsClientReqList"); return QDF_STATUS_E_FAILURE; } /* clean up & return */ @@ -16813,8 +16684,8 @@ csr_deregister_client_request(tpAniSirGlobal mac_ctx, status = qdf_mc_timer_stop( &mac_ctx->roam.tlStatsReqInfo.hTlStatsTimer); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("cannot stop TlStatsTimer timer")); + sme_err( + "cannot stop TlStatsTimer timer"); return status; } } @@ -16825,8 +16696,8 @@ csr_deregister_client_request(tpAniSirGlobal mac_ctx, /* Destroy the qdf timer... */ status = qdf_mc_timer_destroy(&ptr_sta_entry->timer); if (!QDF_IS_STATUS_SUCCESS(status)) - sms_log(mac_ctx, LOGE, - FL("failed to destroy Client req timer")); + sme_err( + "failed to destroy Client req timer"); csr_roam_remove_stat_list_entry(mac_ctx, entry); return QDF_STATUS_SUCCESS; @@ -16850,8 +16721,8 @@ csr_insert_stats_request_to_list(tpAniSirGlobal mac_ctx, mac_ctx, &mac_ctx->roam.statsClientReqList, sta_entry); if (!ptr_sta_entry) { - sms_log(mac_ctx, LOGW, - FL("Failed to insert req in statsClientReqList")); + sme_err( + "Failed to insert req in statsClientReqList"); return QDF_STATUS_E_FAILURE; } /* Init & start timer if needed */ @@ -16862,15 +16733,15 @@ csr_insert_stats_request_to_list(tpAniSirGlobal mac_ctx, csr_roam_stats_client_timer_handler, ptr_sta_entry); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("cannot init StatsClient timer")); + sme_err( + "cannot init StatsClient timer"); return QDF_STATUS_E_FAILURE; } status = qdf_mc_timer_start(&ptr_sta_entry->timer, ptr_sta_entry->periodicity); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("cannot start StatsClient timer")); + sme_err( + "cannot start StatsClient timer"); return QDF_STATUS_E_FAILURE; } } @@ -16895,7 +16766,7 @@ csr_get_statistics_from_tl(tpAniSirGlobal mac_ctx, QDF_STATUS status; if (cache && mac_ctx->roam.tlStatsReqInfo.numClient) { - sms_log(mac_ctx, LOGE, FL("Looking for cached stats from TL")); + sme_err("Looking for cached stats from TL"); mac_ctx->roam.tlStatsReqInfo.numClient++; return QDF_STATUS_SUCCESS; } @@ -16922,8 +16793,8 @@ csr_get_statistics_from_tl(tpAniSirGlobal mac_ctx, &mac_ctx->roam.tlStatsReqInfo.hTlStatsTimer, mac_ctx->roam.tlStatsReqInfo.periodicity); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("cannot start TlStatsTimer timer")); + sme_err( + "cannot start TlStatsTimer timer"); return QDF_STATUS_E_FAILURE; } mac_ctx->roam.tlStatsReqInfo.timerRunning = true; @@ -16954,13 +16825,13 @@ QDF_STATUS csr_get_statistics(tpAniSirGlobal pMac, return QDF_STATUS_E_FAILURE; if (csr_neighbor_middle_of_roaming(pMac, sessionId)) { - sms_log(pMac, LOGD, FL("in the middle of roaming states")); + sme_debug("in the middle of roaming states"); return QDF_STATUS_E_FAILURE; } if ((!statsMask) && (!callback)) { - sms_log(pMac, LOGW, - FL("statsMask & callback empty in the request")); + sme_err( + "statsMask & callback empty in the request"); return QDF_STATUS_E_FAILURE; } /* for the search list method for deregister */ @@ -17022,8 +16893,8 @@ QDF_STATUS csr_get_statistics(tpAniSirGlobal pMac, status = csr_send_mb_stats_req_msg(pMac, temp_mask, staId, sessionId); if (!QDF_IS_STATUS_SUCCESS(status)) - sms_log(pMac, LOGE, - FL("failed to send down stats req")); + sme_err( + "failed to send down stats req"); /* * so that when the stats rsp comes back from PE we * respond to upper layer right away @@ -17065,7 +16936,7 @@ QDF_STATUS csr_roam_set_key_mgmt_offload(tpAniSirGlobal mac_ctx, { 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); return QDF_STATUS_E_FAILURE; } session->RoamKeyMgmtOffloadEnabled = roam_key_mgmt_offload_enabled; @@ -17102,8 +16973,8 @@ csr_update_roam_scan_offload_request(tpAniSirGlobal mac_ctx, if (wlan_cfg_get_int(mac_ctx, WNI_CFG_REASSOCIATION_FAILURE_TIMEOUT, (uint32_t *) &req_buf->ReassocFailureTimeout) != eSIR_SUCCESS) { - sms_log(mac_ctx, LOGE, - FL("could not retrieve ReassocFailureTimeout value")); + sme_err( + "could not retrieve ReassocFailureTimeout value"); req_buf->ReassocFailureTimeout = DEFAULT_REASSOC_FAILURE_TIMEOUT; } @@ -17187,7 +17058,7 @@ csr_fetch_ch_lst_from_ini(tpAniSirGlobal mac_ctx, if ((eCSR_BAND_24 != band) && (eCSR_BAND_5G != band) && (eCSR_BAND_ALL != band)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("Invalid band(%d), roam scan offload req aborted"), + "Invalid band(%d), roam scan offload req aborted", band); return QDF_STATUS_E_FAILURE; } @@ -17200,8 +17071,8 @@ csr_fetch_ch_lst_from_ini(tpAniSirGlobal mac_ctx, (mac_ctx->roam.configParam.sta_roam_policy.dfs_mode == CSR_STA_ROAM_POLICY_DFS_DISABLED)) && (CDS_IS_DFS_CH(*ch_lst))) { - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - FL("ignoring dfs channel %d"), *ch_lst); + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + ("ignoring dfs channel %d"), *ch_lst); ch_lst++; continue; } @@ -17218,8 +17089,8 @@ csr_fetch_ch_lst_from_ini(tpAniSirGlobal mac_ctx, } if (is_unsafe_chan) { QDF_TRACE(QDF_MODULE_ID_SME, - QDF_TRACE_LEVEL_INFO, - FL("ignoring unsafe channel %d"), + QDF_TRACE_LEVEL_DEBUG, + ("ignoring unsafe channel %d"), *ch_lst); ch_lst++; continue; @@ -17281,8 +17152,8 @@ csr_fetch_ch_lst_from_occupied_lst(tpAniSirGlobal mac_ctx, (mac_ctx->roam.configParam.sta_roam_policy.dfs_mode == CSR_STA_ROAM_POLICY_DFS_DISABLED)) && (CDS_IS_DFS_CH(*ch_lst))) { - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - FL("ignoring dfs channel %d"), *ch_lst); + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + ("ignoring dfs channel %d"), *ch_lst); ch_lst++; continue; } @@ -17299,8 +17170,8 @@ csr_fetch_ch_lst_from_occupied_lst(tpAniSirGlobal mac_ctx, } if (is_unsafe_chan) { QDF_TRACE(QDF_MODULE_ID_SME, - QDF_TRACE_LEVEL_INFO, - FL("ignoring unsafe channel %d"), + QDF_TRACE_LEVEL_DEBUG, + ("ignoring unsafe channel %d"), *ch_lst); ch_lst++; continue; @@ -17372,7 +17243,7 @@ csr_fetch_valid_ch_lst(tpAniSirGlobal mac_ctx, &host_channels); if (!QDF_IS_STATUS_SUCCESS(status)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("Failed to get the valid channel list")); + "Failed to get the valid channel list"); return status; } ch_lst = mac_ctx->roam.validChannelList; @@ -17383,8 +17254,8 @@ csr_fetch_valid_ch_lst(tpAniSirGlobal mac_ctx, (mac_ctx->roam.configParam.sta_roam_policy.dfs_mode == CSR_STA_ROAM_POLICY_DFS_DISABLED)) && (CDS_IS_DFS_CH(*ch_lst))) { - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - FL("ignoring dfs channel %d"), *ch_lst); + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + ("ignoring dfs channel %d"), *ch_lst); ch_lst++; continue; } @@ -17401,8 +17272,8 @@ csr_fetch_valid_ch_lst(tpAniSirGlobal mac_ctx, } if (is_unsafe_chan) { QDF_TRACE(QDF_MODULE_ID_SME, - QDF_TRACE_LEVEL_INFO, - FL("ignoring unsafe channel %d"), + QDF_TRACE_LEVEL_DEBUG, + ("ignoring unsafe channel %d"), *ch_lst); ch_lst++; continue; @@ -17458,7 +17329,7 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx, req_buf = qdf_mem_malloc(sizeof(tSirRoamOffloadScanReq)); if (NULL == req_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("Mem alloc for roam scan offload req failed.")); + "Mem alloc for roam scan offload req failed"); return NULL; } req_buf->Command = command; @@ -17537,7 +17408,7 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx, (csr_is_auth_type_ese(req_buf-> ConnectedNetwork.authentication))); QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - FL("IsEseAssoc=%d middle of roaming %d ese_neighbor_list_recvd %d cur no of chan %d"), + ("IsEseAssoc=%d middle of roaming %d ese_neighbor_list_recvd %d cur no of chan %d"), req_buf->IsESEAssoc, req_buf->middle_of_roaming, ese_neighbor_list_recvd, @@ -17554,7 +17425,7 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx, if (!QDF_IS_STATUS_SUCCESS(status)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - FL("Fetch channel list from ini failed")); + "Fetch channel list from ini failed"); qdf_mem_free(req_buf); return NULL; } @@ -17584,7 +17455,7 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx, break; } QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - FL("ChnlCacheType:%d, No of Chnls:%d,Channels: %s"), + FL("ChnlCacheType:%d, No of Chnls:%d,Channels: %s"), req_buf->ChannelCacheType, req_buf->ConnectedNetwork.ChannelCount, ch_cache_str); @@ -17592,7 +17463,7 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx, status = csr_fetch_valid_ch_lst(mac_ctx, req_buf); if (!QDF_IS_STATUS_SUCCESS(status)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("Fetch channel list fail")); + "Fetch channel list fail"); qdf_mem_free(req_buf); return NULL; } @@ -17614,15 +17485,15 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx, */ if (req_buf->HomeAwayTime < (req_buf->NeighborScanChannelMaxTime + (2 * CSR_ROAM_SCAN_CHANNEL_SWITCH_TIME))) { - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_WARN, - FL("Invalid config, Home away time(%d) is less than (twice RF switching time + channel max time)(%d). Hence enforcing home away time to disable (0)"), + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + "Invalid config, Home away time(%d) is less than (twice RF switching time + channel max time)(%d). Hence enforcing home away time to disable (0)", req_buf->HomeAwayTime, (req_buf->NeighborScanChannelMaxTime + (2 * CSR_ROAM_SCAN_CHANNEL_SWITCH_TIME))); req_buf->HomeAwayTime = 0; } QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - FL("HomeAwayTime:%d"), req_buf->HomeAwayTime); + "HomeAwayTime: %d", req_buf->HomeAwayTime); /*Prepare a probe request for 2.4GHz band and one for 5GHz band */ dot11_mode = (uint8_t) csr_translate_to_wni_cfg_dot11_mode(mac_ctx, @@ -17637,7 +17508,7 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx, req_buf->early_stop_scan_max_threshold = mac_ctx->roam.configParam.early_stop_scan_max_threshold; QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - FL("EarlyStopFeature Enable=%d, MinThresh=%d, MaxThresh=%d"), + FL("EarlyStopFeature Enable=%d, MinThresh=%d, MaxThresh=%d"), req_buf->early_stop_scan_enable, req_buf->early_stop_scan_min_threshold, req_buf->early_stop_scan_max_threshold); @@ -17760,7 +17631,7 @@ static bool csr_is_RSO_cmd_allowed(tpAniSirGlobal mac_ctx, uint8_t command, break; default: QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("Wrong RSO command %d, not allowed"), command); + ("Wrong RSO command %d, not allowed"), command); return 0;/*Cmd Not allowed*/ } ret_val = desiredMask & (1 << neigh_roam_info->last_sent_cmd); @@ -17785,7 +17656,7 @@ static QDF_STATUS csr_roam_send_rso_cmd(tpAniSirGlobal mac_ctx, status = umac_send_mb_message_to_mac(request_buf); if (QDF_STATUS_SUCCESS != status) { - sms_log(mac_ctx, LOGE, FL("Send RSO from CSR failed")); + sme_err("Send RSO from CSR failed"); return status; } return QDF_STATUS_SUCCESS; @@ -17807,11 +17678,11 @@ static void csr_append_assoc_ies(tpAniSirGlobal mac_ctx, { tSirAddie *assoc_ie = &req_buf->assoc_ie; if ((SIR_MAC_MAX_ADD_IE_LENGTH - assoc_ie->length) < ie_len) { - sms_log(mac_ctx, LOGE, "Appending IE(id:%d) fails", ie_id); + sme_err("Appending IE(id:%d) fails", ie_id); return; } - sms_log(mac_ctx, LOGD, "Appended IE(Id:%d) to RSO", ie_id); + sme_debug("Appended IE(Id:%d) to RSO", ie_id); assoc_ie->addIEdata[assoc_ie->length] = ie_id; assoc_ie->addIEdata[assoc_ie->length + 1] = ie_len; qdf_mem_copy(&assoc_ie->addIEdata[assoc_ie->length + 2], @@ -17958,7 +17829,7 @@ csr_create_per_roam_request(tpAniSirGlobal mac_ctx, uint8_t session_id) req_buf = qdf_mem_malloc(sizeof(struct wmi_per_roam_config_req)); if (!req_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("Mem alloc for per roam req failed.")); + "Mem alloc for per roam req failed."); return NULL; } req_buf->vdev_id = session_id; @@ -17984,7 +17855,7 @@ csr_create_per_roam_request(tpAniSirGlobal mac_ctx, uint8_t session_id) mac_ctx->roam.configParam.per_roam_config.rx_rate_thresh_percnt; QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - FL("PER based roaming configuaration enable=%d vdev=%d high_rate_thresh=%d low_rate_thresh=%d rate_thresh_percnt=%d per_rest_time=%d monitor_time=%d"), + FL("PER based roaming configuaration enable=%d vdev=%d high_rate_thresh=%d low_rate_thresh=%d rate_thresh_percnt=%d per_rest_time=%d monitor_time=%d"), req_buf->per_config.enable, session_id, req_buf->per_config.tx_high_rate_thresh, req_buf->per_config.tx_low_rate_thresh, @@ -18020,15 +17891,15 @@ csr_roam_offload_per_scan(tpAniSirGlobal mac_ctx, uint8_t session_id) return QDF_STATUS_SUCCESS; if (!mac_ctx->roam.configParam.per_roam_config.enable) { - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - FL("PER based roaming is disabled in configuration")); + QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, + "PER based roaming is disabled in configuration"); return QDF_STATUS_SUCCESS; } req_buf = csr_create_per_roam_request(mac_ctx, session_id); if (!req_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("Failed to create req packet")); + "Failed to create req packet"); return QDF_STATUS_E_FAILURE; } msg.type = WMA_SET_PER_ROAM_CONFIG_CMD; @@ -18076,32 +17947,31 @@ csr_roam_offload_scan(tpAniSirGlobal mac_ctx, uint8_t session_id, command, session_id, reason); if (NULL == session) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("session is null")); + "session is null"); return QDF_STATUS_E_FAILURE; } if ((ROAM_SCAN_OFFLOAD_START == command) && (session->pCurRoamProfile && session->pCurRoamProfile->do_not_roam)) { - sms_log(mac_ctx, LOGE, - FL("Supplicant disabled driver roaming")); + sme_debug("Supplicant disabled driver roaming"); return QDF_STATUS_E_FAILURE; } if (0 == csr_roam_is_roam_offload_scan_enabled(mac_ctx)) { - sms_log(mac_ctx, LOGE, "isRoamOffloadScanEnabled not set"); + sme_err("isRoamOffloadScanEnabled not set"); return QDF_STATUS_E_FAILURE; } if (!csr_is_RSO_cmd_allowed(mac_ctx, command, session_id) && reason != REASON_ROAM_SET_BLACKLIST_BSSID) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("RSO out-of-sync command %d lastSentCmd %d"), + ("RSO out-of-sync command %d lastSentCmd %d"), command, roam_info->last_sent_cmd); return QDF_STATUS_E_FAILURE; } if ((true == b_roam_scan_offload_started) && (ROAM_SCAN_OFFLOAD_START == command)) { - sms_log(mac_ctx, LOGE, "Roam Scan Offload is already started"); + sme_err("Roam Scan Offload is already started"); return QDF_STATUS_E_FAILURE; } /* @@ -18123,7 +17993,7 @@ csr_roam_offload_scan(tpAniSirGlobal mac_ctx, uint8_t session_id, state = mac_trace_get_neighbour_roam_state( roam_info->neighborRoamState); QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - FL("Scan Command not sent to FW state=%s and cmd=%d"), + FL("Scan Command not sent to FW state=%s and cmd=%d"), state, command); return QDF_STATUS_E_FAILURE; } @@ -18133,7 +18003,7 @@ csr_roam_offload_scan(tpAniSirGlobal mac_ctx, uint8_t session_id, session, roam_info); if (!req_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("Failed to create req packet")); + "Failed to create req packet"); return QDF_STATUS_E_FAILURE; } roam_params_dst = &req_buf->roam_params; @@ -18197,7 +18067,7 @@ csr_roam_offload_scan(tpAniSirGlobal mac_ctx, uint8_t session_id, for (i = 0; i < roam_params_dst->num_bssid_avoid_list; i++) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - "Blacklist Bssid: ("MAC_ADDRESS_STR")", + "Blacklist Bssid:"MAC_ADDRESS_STR")", MAC_ADDR_ARRAY(roam_params_dst->bssid_avoid_list[i].bytes)); } for (i = 0; i < roam_params_dst->num_ssid_allowed_list; i++) { @@ -18208,7 +18078,7 @@ csr_roam_offload_scan(tpAniSirGlobal mac_ctx, uint8_t session_id, } for (i = 0; i < roam_params_dst->num_bssid_favored; i++) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, - "Preferred Bssid: ("MAC_ADDRESS_STR") score: %d", + "Preferred Bssid:"MAC_ADDRESS_STR") score: %d", MAC_ADDR_ARRAY(roam_params_dst->bssid_favored[i].bytes), roam_params_dst->bssid_favored_factor[i]); } @@ -18333,9 +18203,8 @@ tCsrPeStatsReqInfo *csr_roam_check_pe_stats_req_list(tpAniSirGlobal pMac, peStatsReqList, &staEntry); if (!pTempStaEntry) { - /* msg */ - sms_log(pMac, LOGW, - "csr_roam_check_pe_stats_req_list: Failed to insert req in peStatsReqList"); + sme_err( + "Failed to insert req in peStatsReqList"); return NULL; } } @@ -18350,9 +18219,8 @@ tCsrPeStatsReqInfo *csr_roam_check_pe_stats_req_list(tpAniSirGlobal pMac, eCsrGlobalClassDStats), staId, sessionId); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL - ("csr_roam_check_pe_stats_req_list:failed to send down stats req to PE")); + sme_err( + "csr_roam_check_pe_stats_req_list:failed to send down stats req to PE"); } else { pTempStaEntry->rspPending = true; } @@ -18367,23 +18235,21 @@ tCsrPeStatsReqInfo *csr_roam_check_pe_stats_req_list(tpAniSirGlobal pMac, csr_roam_pe_stats_timer_handler, pTempStaEntry); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - sms_log(pMac, LOGE, - FL - ("csr_roam_check_pe_stats_req_list:cannot init hPeStatsTimer timer")); + sme_err( + "csr_roam_check_pe_stats_req_list:cannot init hPeStatsTimer timer"); return NULL; } } /* start timer */ - sms_log(pMac, LOGD, + sme_debug( "csr_roam_check_pe_stats_req_list:peStatsTimer period %d", pTempStaEntry->periodicity); qdf_status = qdf_mc_timer_start(&pTempStaEntry->hPeStatsTimer, pTempStaEntry->periodicity); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - sms_log(pMac, LOGE, - FL - ("csr_roam_check_pe_stats_req_list:cannot start hPeStatsTimer timer")); + sme_err( + "csr_roam_check_pe_stats_req_list:cannot start hPeStatsTimer timer"); return NULL; } pTempStaEntry->timerRunning = true; @@ -18415,7 +18281,7 @@ void csr_roam_remove_entry_from_pe_stats_req_list(tpAniSirGlobal pMac, QDF_STATUS qdf_status; pEntry = csr_ll_peek_head(&pMac->roam.peStatsReqList, LL_ACCESS_LOCK); if (!pEntry) { - sms_log(pMac, LOGE, FL(" List empty, no stats req for PE")); + sme_err(" List empty, no stats req for PE"); return; } while (pEntry) { @@ -18427,7 +18293,7 @@ void csr_roam_remove_entry_from_pe_stats_req_list(tpAniSirGlobal pMac, LL_ACCESS_NOLOCK); continue; } - sms_log(pMac, LOGW, FL("Match found")); + sme_debug("Match found"); if (pTempStaEntry->timerRunning) { qdf_status = qdf_mc_timer_stop( &pTempStaEntry->hPeStatsTimer); @@ -18451,8 +18317,8 @@ void csr_roam_remove_entry_from_pe_stats_req_list(tpAniSirGlobal pMac, pTempStaEntry->timerStopFailed = true; } if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - sms_log(pMac, LOGE, - FL("failed to stop/destroy timer")); + sme_err( + "failed to stop/destroy timer"); } } @@ -18483,11 +18349,11 @@ void csr_roam_report_statistics(tpAniSirGlobal pMac, uint32_t statsMask, uint32_t tempMask = 0; uint8_t counter = 0; if (!callback) { - sms_log(pMac, LOGE, FL("Cannot report callback NULL")); + sme_err("Cannot report callback NULL"); return; } if (!statsMask) { - sms_log(pMac, LOGE, FL("Cannot report statsMask is 0")); + sme_err("Cannot report statsMask is 0"); return; } pStats = stats; @@ -18497,7 +18363,7 @@ void csr_roam_report_statistics(tpAniSirGlobal pMac, uint32_t statsMask, /* new stats info from PE, fill up the stats strucutres in PMAC */ switch (counter) { case eCsrSummaryStats: - sms_log(pMac, LOGD, FL("Summary stats")); + sme_debug("Summary stats"); qdf_mem_copy(pStats, (uint8_t *) &pMac->roam. summaryStatsInfo, @@ -18505,7 +18371,7 @@ void csr_roam_report_statistics(tpAniSirGlobal pMac, uint32_t statsMask, pStats += sizeof(tCsrSummaryStatsInfo); break; case eCsrGlobalClassAStats: - sms_log(pMac, LOGD, FL("ClassA stats")); + sme_debug("ClassA stats"); qdf_mem_copy(pStats, (uint8_t *) &pMac->roam. classAStatsInfo, @@ -18513,7 +18379,7 @@ void csr_roam_report_statistics(tpAniSirGlobal pMac, uint32_t statsMask, pStats += sizeof(tCsrGlobalClassAStatsInfo); break; case eCsrGlobalClassDStats: - sms_log(pMac, LOGD, FL("ClassD stats")); + sme_debug("ClassD stats"); qdf_mem_copy(pStats, (uint8_t *) &pMac->roam. classDStatsInfo, @@ -18521,7 +18387,7 @@ void csr_roam_report_statistics(tpAniSirGlobal pMac, uint32_t statsMask, pStats += sizeof(tCsrGlobalClassDStatsInfo); break; case csr_per_chain_rssi_stats: - sms_log(pMac, LOGD, FL("Per Chain RSSI stats")); + sme_debug("Per Chain RSSI stats"); qdf_mem_copy(pStats, (uint8_t *)&pMac->roam.per_chain_rssi_stats, sizeof(struct csr_per_chain_rssi_stats_info)); @@ -18529,8 +18395,8 @@ void csr_roam_report_statistics(tpAniSirGlobal pMac, uint32_t statsMask, struct csr_per_chain_rssi_stats_info); break; default: - sms_log(pMac, LOGE, - FL("Unknown stats type and counter %d"), + sme_err( + "Unknown stats type and counter %d", counter); break; } @@ -18551,9 +18417,7 @@ QDF_STATUS csr_roam_dereg_statistics_req(tpAniSirGlobal pMac) pEntry = csr_ll_peek_head(&pMac->roam.statsClientReqList, LL_ACCESS_LOCK); if (!pEntry) { /* list empty */ - sms_log(pMac, LOGW, - "csr_roam_dereg_statistics_req: List empty, no request from " - "upper layer client(s)"); + sme_debug("List empty, no request from upper layer client(s)"); return status; } while (pEntry) { @@ -18589,9 +18453,8 @@ QDF_STATUS csr_roam_dereg_statistics_req(tpAniSirGlobal pMac) tlStatsReqInfo. hTlStatsTimer); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL - ("csr_roam_dereg_statistics_req:cannot stop TlStatsTimer timer")); + sme_err( + "csr_roam_dereg_statistics_req:cannot stop TlStatsTimer timer"); /* we will continue */ } } @@ -18608,9 +18471,8 @@ QDF_STATUS csr_roam_dereg_statistics_req(tpAniSirGlobal pMac) qdf_status = qdf_mc_timer_destroy(&pTempStaEntry->timer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - sms_log(pMac, LOGE, - FL - ("csr_roam_dereg_statistics_req:failed to destroy Client req timer")); + sme_err( + "csr_roam_dereg_statistics_req:failed to destroy Client req timer"); } } @@ -18692,7 +18554,7 @@ void csr_release_command_buffer(tpAniSirGlobal pMac, tSmeCmd *pCommand) csr_free_cmd_memory(pMac, pCommand); sme_release_command(pMac, pCommand); } else { - sms_log(pMac, LOGE, FL("no pending commands")); + sme_err("no pending commands"); QDF_ASSERT(0); } } @@ -18703,19 +18565,19 @@ void csr_release_command(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd) struct wlan_serialization_command cmd; if (!sme_cmd) { - sms_log(mac_ctx, LOGE, "sme_cmd is NULL"); + sme_err("sme_cmd is NULL"); return; } qdf_mem_zero(&cmd_info, sizeof(struct wlan_serialization_queued_cmd_info)); if (sme_cmd->command == eSmeCommandScan || sme_cmd->command == eSmeCommandRemainOnChannel) { - sms_log(mac_ctx, LOG2, "filled cmd_id[%d]", + sme_debug("filled cmd_id[%d]", sme_cmd->u.scanCmd.scanID); cmd_info.cmd_id = sme_cmd->u.scanCmd.scanID; cmd_info.req_type = WLAN_SER_CANCEL_SINGLE_SCAN; } else { - sms_log(mac_ctx, LOG2, "filled cmd_id = 0"); + sme_debug("filled cmd_id = 0"); cmd_info.cmd_id = 0; cmd_info.req_type = WLAN_SER_CANCEL_NON_SCAN_CMD; } @@ -18730,19 +18592,16 @@ void csr_release_command(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd) cmd.vdev = cmd_info.vdev; if (wlan_serialization_is_cmd_present_in_active_queue( mac_ctx->psoc, &cmd)) { - sms_log(mac_ctx, LOG1, - FL("Releasing active cmd_id[%d] cmd_type[%d]"), + sme_debug("Releasing active cmd_id[%d] cmd_type[%d]", cmd_info.cmd_id, cmd_info.cmd_type); wlan_serialization_remove_cmd(&cmd_info); } else if (wlan_serialization_is_cmd_present_in_pending_queue( mac_ctx->psoc, &cmd)) { - sms_log(mac_ctx, LOG1, - FL("Releasing pending cmd_id[%d] cmd_type[%d]"), + sme_debug("Releasing pending cmd_id[%d] cmd_type[%d]", cmd_info.cmd_id, cmd_info.cmd_type); wlan_serialization_cancel_request(&cmd_info); } else { - sms_log(mac_ctx, LOG1, - FL("can't find cmd_id[%d] cmd_type[%d]"), + sme_debug("can't find cmd_id[%d] cmd_type[%d]", cmd_info.cmd_id, cmd_info.cmd_type); } if (cmd_info.vdev) @@ -18973,11 +18832,11 @@ QDF_STATUS csr_set_serialization_params_to_cmd(tpAniSirGlobal mac_ctx, QDF_STATUS status = QDF_STATUS_E_FAILURE; if (!sme_cmd) { - sms_log(mac_ctx, LOGE, FL("Invalid sme_cmd")); + sme_err("Invalid sme_cmd"); return status; } if (!cmd) { - sms_log(mac_ctx, LOGE, FL("Invalid serialization_cmd")); + sme_err("Invalid serialization_cmd"); return status; } @@ -18988,13 +18847,13 @@ QDF_STATUS csr_set_serialization_params_to_cmd(tpAniSirGlobal mac_ctx, if (sme_cmd->command == eSmeCommandScan || sme_cmd->command == eSmeCommandRemainOnChannel) { cmd->cmd_id = sme_cmd->u.scanCmd.scanID; - sms_log(mac_ctx, LOG2, "cmd_id[%d]", sme_cmd->u.scanCmd.scanID); + sme_debug("cmd_id[%d]", sme_cmd->u.scanCmd.scanID); } else { - sms_log(mac_ctx, LOG2, "cmd_id = 0"); + sme_debug("cmd_id = 0"); cmd->cmd_id = 0; } cmd->cmd_type = csr_get_cmd_type(sme_cmd); - sms_log(mac_ctx, LOG1, "filled cmd_type[%d] cmd_id[%d]", + sme_debug("filled cmd_type[%d] cmd_id[%d]", cmd->cmd_type, cmd->cmd_id); if (cmd->cmd_type == WLAN_SER_CMD_MAX) { sms_log(mac_ctx, LOGE, FL("serialization enum not found")); @@ -19016,14 +18875,14 @@ QDF_STATUS csr_queue_sme_command(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd, QDF_STATUS status; if (!SME_IS_START(mac_ctx)) { - sms_log(mac_ctx, LOGE, FL("Sme in stop state")); + sme_err("Sme in stop state"); QDF_ASSERT(0); return QDF_STATUS_E_PERM; } if ((eSmeCommandScan == sme_cmd->command) && mac_ctx->scan.fDropScanCmd) { - sms_log(mac_ctx, LOGW, FL("drop scan (scan reason %d) command"), + sme_debug("drop scan (scan reason %d) command", sme_cmd->u.scanCmd.reason); return QDF_STATUS_CSR_WRONG_STATE; } @@ -19031,8 +18890,7 @@ QDF_STATUS csr_queue_sme_command(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd, if (CSR_IS_WAIT_FOR_KEY(mac_ctx, sme_cmd->sessionId)) { if (!CSR_IS_SET_KEY_COMMAND(sme_cmd) && !CSR_IS_DISCONNECT_COMMAND(sme_cmd)) { - sms_log(mac_ctx, LOGE, - FL("Can't process cmd(%d), waiting for key"), + sme_err("Can't process cmd(%d), waiting for key", sme_cmd->command); return QDF_STATUS_CMD_NOT_QUEUED; } @@ -19065,8 +18923,7 @@ QDF_STATUS csr_roam_update_apwpsie(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); if (NULL == pSession) { - sms_log(pMac, LOGE, - FL("Session does not exist for session id %d"), + sme_err("Session does not exist for session id %d", sessionId); return QDF_STATUS_E_FAILURE; } @@ -19093,8 +18950,7 @@ QDF_STATUS csr_roam_update_wparsni_es(tpAniSirGlobal pMac, uint32_t sessionId, tSirUpdateAPWPARSNIEsReq *pMsg; tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); if (NULL == pSession) { - sms_log(pMac, LOGE, - FL(" Session does not exist for session id %d"), + sme_err("Session does not exist for session id %d", sessionId); return QDF_STATUS_E_FAILURE; } @@ -19144,12 +19000,11 @@ bool csr_roam_is_sta_mode(tpAniSirGlobal pMac, uint32_t sessionId) tCsrRoamSession *pSession = NULL; pSession = CSR_GET_SESSION(pMac, sessionId); if (!pSession) { - sms_log(pMac, LOGE, FL(" %s: session %d not found "), __func__, - sessionId); + sme_err("session %d not found", sessionId); return false; } if (!CSR_IS_SESSION_VALID(pMac, sessionId)) { - sms_log(pMac, LOGE, FL(" %s: Inactive session"), __func__); + sme_err("Inactive session_id: %d", sessionId); return false; } if (eCSR_BSS_TYPE_INFRASTRUCTURE != pSession->connectedProfile.BSSType) { @@ -19183,8 +19038,8 @@ QDF_STATUS csr_handoff_request(tpAniSirGlobal pMac, tAniHandoffReq *pMsg; pMsg = qdf_mem_malloc(sizeof(tAniHandoffReq)); if (NULL == pMsg) { - sms_log(pMac, LOGE, - " csr_handoff_request: failed to allocate mem for req "); + sme_err( + "csr_handoff_request: failed to allocate mem for req "); return QDF_STATUS_E_NOMEM; } pMsg->msgType = eWNI_SME_HANDOFF_REQ; @@ -19198,8 +19053,7 @@ QDF_STATUS csr_handoff_request(tpAniSirGlobal pMac, msg.reserved = 0; if (QDF_STATUS_SUCCESS != scheduler_post_msg(QDF_MODULE_ID_SME, &msg)) { - sms_log(pMac, LOGE, - " csr_handoff_request failed to post msg to self "); + sme_err("scheduler_post_msg failed to post msg to self"); qdf_mem_free((void *)pMsg); status = QDF_STATUS_E_FAILURE; } @@ -19313,13 +19167,13 @@ csr_roam_modify_add_ies(tpAniSirGlobal pMac, pLocalBuffer = qdf_mem_malloc(pModifyIE->ieBufferlength); if (NULL == pLocalBuffer) { - sms_log(pMac, LOGE, FL("Memory Allocation Failure!!!")); + sme_err("Memory Allocation Failure!!!"); return QDF_STATUS_E_NOMEM; } pModifyAddIEInd = qdf_mem_malloc(sizeof(tSirModifyIEsInd)); if (NULL == pModifyAddIEInd) { - sms_log(pMac, LOGE, FL("Memory Allocation Failure!!!")); + sme_err("Memory Allocation Failure!!!"); qdf_mem_free(pLocalBuffer); return QDF_STATUS_E_NOMEM; } @@ -19346,9 +19200,9 @@ csr_roam_modify_add_ies(tpAniSirGlobal pMac, status = umac_send_mb_message_to_mac(pModifyAddIEInd); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL("Failed to send eWNI_SME_UPDATE_ADDTIONAL_IES msg" - "!!! status %d"), status); + sme_err( + "Failed to send eWNI_SME_UPDATE_ADDTIONAL_IES msg" + "!!! status %d", status); qdf_mem_free(pLocalBuffer); } return status; @@ -19378,7 +19232,7 @@ csr_roam_update_add_ies(tpAniSirGlobal pMac, /* Following buffer will be freed by consumer (PE) */ pLocalBuffer = qdf_mem_malloc(pUpdateIE->ieBufferlength); if (NULL == pLocalBuffer) { - sms_log(pMac, LOGE, FL("Memory Allocation Failure!!!")); + sme_err("Memory Allocation Failure!!!"); return QDF_STATUS_E_NOMEM; } qdf_mem_copy(pLocalBuffer, pUpdateIE->pAdditionIEBuffer, @@ -19387,7 +19241,7 @@ csr_roam_update_add_ies(tpAniSirGlobal pMac, pUpdateAddIEs = qdf_mem_malloc(sizeof(tSirUpdateIEsInd)); if (NULL == pUpdateAddIEs) { - sms_log(pMac, LOGE, FL("Memory Allocation Failure!!!")); + sme_err("Memory Allocation Failure!!!"); if (pLocalBuffer != NULL) { qdf_mem_free(pLocalBuffer); } @@ -19409,9 +19263,9 @@ csr_roam_update_add_ies(tpAniSirGlobal pMac, status = umac_send_mb_message_to_mac(pUpdateAddIEs); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL("Failed to send eWNI_SME_UPDATE_ADDTIONAL_IES msg" - "!!! status %d"), status); + sme_err( + "Failed to send eWNI_SME_UPDATE_ADDTIONAL_IES msg" + "!!! status %d", status); qdf_mem_free(pLocalBuffer); } return status; @@ -19523,8 +19377,8 @@ void csr_roaming_report_diag_event(tpAniSirGlobal mac_ctx, roam_connection.eventId = eCSR_WLAN_STATUS_DISCONNECT; break; default: - sms_log(mac_ctx, LOGE, - FL("LFR3: Unsupported reason %d"), reason); + sme_err( + "LFR3: Unsupported reason %d", reason); return; } roam_connection.reason = reason; @@ -19597,8 +19451,7 @@ csr_update_op_class_array(tpAniSirGlobal mac_ctx, uint8_t num_channels = channel_info->numChannels; uint8_t ch_bandwidth; - sms_log(mac_ctx, LOGD, - FL("Num of %s channels, %d"), + sme_debug("Num of %s channels, %d", ch_name, num_channels); for (idx = 0; idx < num_channels @@ -19609,7 +19462,7 @@ csr_update_op_class_array(tpAniSirGlobal mac_ctx, mac_ctx->scan.countryCodeCurrent, channel_info->channelList[idx], ch_bandwidth); - sms_log(mac_ctx, LOG4, FL("for chan %d, op class: %d"), + sme_debug("for chan %d, op class: %d", channel_info->channelList[idx], class); found = false; @@ -19644,7 +19497,7 @@ void csr_init_operating_classes(tHalHandle hHal) uint8_t opClasses[CDS_MAX_SUPP_OPER_CLASSES] = {0,}; tpAniSirGlobal pMac = PMAC_STRUCT(hHal); - sms_log(pMac, LOGD, FL("Current Country = %c%c"), + sme_debug("Current Country = %c%c", pMac->scan.countryCodeCurrent[0], pMac->scan.countryCodeCurrent[1]); @@ -19666,11 +19519,10 @@ void csr_init_operating_classes(tHalHandle hHal) } } - sms_log(pMac, LOGD, FL("Number of unique supported op classes %d"), + sme_debug("Number of unique supported op classes %d", numClasses); for (i = 0; i < numClasses; i++) { - sms_log(pMac, LOGD, FL("supported opClasses[%d] = %d"), i, - opClasses[i]); + sme_debug("supported opClasses[%d] = %d", i, opClasses[i]); } /* Set the ordered list of op classes in regdomain @@ -19724,7 +19576,7 @@ static bool csr_is_conn_allow_2g_band(tpAniSirGlobal mac_ctx, uint32_t chnl) if (0 == chnl) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("channel is zero, connection not allowed")); + FL("channel is zero, connection not allowed")); return false; } @@ -19736,8 +19588,7 @@ static bool csr_is_conn_allow_2g_band(tpAniSirGlobal mac_ctx, uint32_t chnl) (sap_session->bssParams.operationChn != chnl)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL - ("Can't allow STA to connect, chnls not same")); + FL("Can't allow STA to connect, chnls not same")); return false; } } @@ -19764,8 +19615,7 @@ static bool csr_is_conn_allow_5g_band(tpAniSirGlobal mac_ctx, uint32_t chnl) if (0 == chnl) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL - ("channel is zero, connection not allowed")); + FL("channel is zero, connection not allowed")); return false; } @@ -19779,8 +19629,7 @@ static bool csr_is_conn_allow_5g_band(tpAniSirGlobal mac_ctx, uint32_t chnl) chnl)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL - ("Can't allow STA to connect, chnls not same")); + FL("Can't allow STA to connect, chnls not same")); return false; } } @@ -19940,14 +19789,14 @@ void csr_process_set_hw_mode(tpAniSirGlobal mac, tSmeCmd *command) */ if (!command) { - sms_log(mac, LOGE, FL("Set HW mode param is NULL")); + sme_err("Set HW mode param is NULL"); goto fail; } len = sizeof(*cmd); cmd = qdf_mem_malloc(len); if (!cmd) { - sms_log(mac, LOGE, FL("Memory allocation failed")); + sme_err("Memory allocation failed"); /* Probably the fail response will also fail during malloc. * Still proceeding to send response! */ @@ -19959,11 +19808,11 @@ void csr_process_set_hw_mode(tpAniSirGlobal mac, tSmeCmd *command) */ if (command->u.set_hw_mode_cmd.reason == POLICY_MGR_UPDATE_REASON_HIDDEN_STA) { - sms_log(mac, LOGE, FL("clear any pending scan command")); + sme_err("clear any pending scan command"); status = csr_scan_abort_mac_scan_not_for_connect(mac, command->u.set_hw_mode_cmd.session_id); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac, LOGE, FL("Failed to clear scan cmd")); + sme_err("Failed to clear scan cmd"); goto fail; } } @@ -19971,7 +19820,7 @@ void csr_process_set_hw_mode(tpAniSirGlobal mac, tSmeCmd *command) if ((POLICY_MGR_UPDATE_REASON_OPPORTUNISTIC == command->u.set_hw_mode_cmd.reason) && (true == mac->sme.get_connection_info_cb(NULL, NULL))) { - sms_log(mac, LOGE, FL("Set HW mode refused: conn in progress")); + sme_err("Set HW mode refused: conn in progress"); policy_mgr_restart_opportunistic_timer(mac->psoc, false); goto fail; } @@ -19996,8 +19845,8 @@ void csr_process_set_hw_mode(tpAniSirGlobal mac, tSmeCmd *command) */ cmd->set_hw.set_hw_mode_cb = command->u.set_hw_mode_cmd.set_hw_mode_cb; - sms_log(mac, LOGD, - FL("Posting set hw mode req to PE session:%d reason:%d"), + sme_debug( + "Posting set hw mode req to PE session:%d reason:%d", command->u.set_hw_mode_cmd.session_id, command->u.set_hw_mode_cmd.reason); @@ -20005,7 +19854,7 @@ void csr_process_set_hw_mode(tpAniSirGlobal mac, tSmeCmd *command) if (QDF_STATUS_SUCCESS != status) { policy_mgr_set_hw_mode_change_in_progress(mac->psoc, POLICY_MGR_HW_MODE_NOT_IN_PROGRESS); - sms_log(mac, LOGE, FL("Posting to PE failed")); + sme_err("Posting to PE failed"); return; } return; @@ -20014,11 +19863,11 @@ fail: qdf_mem_free(cmd); param = qdf_mem_malloc(sizeof(*param)); if (!param) { - sms_log(mac, LOGE, - FL("Malloc fail: Fail to send response to SME")); + sme_err( + "Malloc fail: Fail to send response to SME"); return; } - sms_log(mac, LOGE, FL("Sending set HW fail response to SME")); + sme_err("Sending set HW fail response to SME"); param->status = SET_HW_MODE_STATUS_ECANCELED; param->cfgd_hw_mode_index = 0; param->num_vdev_mac_entries = 0; @@ -20050,14 +19899,14 @@ void csr_process_set_dual_mac_config(tpAniSirGlobal mac, tSmeCmd *command) */ if (!command) { - sms_log(mac, LOGE, FL("Set HW mode param is NULL")); + sme_err("Set HW mode param is NULL"); goto fail; } len = sizeof(*cmd); cmd = qdf_mem_malloc(len); if (!cmd) { - sms_log(mac, LOGE, FL("Memory allocation failed")); + sme_err("Memory allocation failed"); /* Probably the fail response will also fail during malloc. * Still proceeding to send response! */ @@ -20076,25 +19925,25 @@ void csr_process_set_dual_mac_config(tpAniSirGlobal mac, tSmeCmd *command) cmd->set_dual_mac.set_dual_mac_cb = command->u.set_dual_mac_cmd.set_dual_mac_cb; - sms_log(mac, LOGD, - FL("Posting eWNI_SME_SET_DUAL_MAC_CFG_REQ to PE: %x %x"), + sme_debug( + "Posting eWNI_SME_SET_DUAL_MAC_CFG_REQ to PE: %x %x", cmd->set_dual_mac.scan_config, cmd->set_dual_mac.fw_mode_config); status = umac_send_mb_message_to_mac(cmd); if (QDF_STATUS_SUCCESS != status) { - sms_log(mac, LOGE, FL("Posting to PE failed")); + sme_err("Posting to PE failed"); return; } return; fail: param = qdf_mem_malloc(sizeof(*param)); if (!param) { - sms_log(mac, LOGE, - FL("Malloc fail: Fail to send response to SME")); + sme_err( + "Malloc fail: Fail to send response to SME"); return; } - sms_log(mac, LOGE, FL("Sending set dual mac fail response to SME")); + sme_err("Sending set dual mac fail response to SME"); param->status = SET_HW_MODE_STATUS_ECANCELED; msg.type = eWNI_SME_SET_DUAL_MAC_CFG_RESP; msg.bodyptr = param; @@ -20125,14 +19974,14 @@ void csr_process_set_antenna_mode(tpAniSirGlobal mac, tSmeCmd *command) */ if (!command) { - sms_log(mac, LOGE, FL("Set antenna mode param is NULL")); + sme_err("Set antenna mode param is NULL"); goto fail; } len = sizeof(*cmd); cmd = qdf_mem_malloc(len); if (!cmd) { - sms_log(mac, LOGE, FL("Memory allocation failed")); + sme_err("Memory allocation failed"); goto fail; } @@ -20140,14 +19989,14 @@ void csr_process_set_antenna_mode(tpAniSirGlobal mac, tSmeCmd *command) cmd->length = len; cmd->set_antenna_mode = command->u.set_antenna_mode_cmd; - sms_log(mac, LOGD, - FL("Posting eWNI_SME_SET_ANTENNA_MODE_REQ to PE: %d %d"), + sme_debug( + "Posting eWNI_SME_SET_ANTENNA_MODE_REQ to PE: %d %d", cmd->set_antenna_mode.num_rx_chains, cmd->set_antenna_mode.num_tx_chains); status = umac_send_mb_message_to_mac(cmd); if (QDF_STATUS_SUCCESS != status) { - sms_log(mac, LOGE, FL("Posting to PE failed")); + sme_err("Posting to PE failed"); /* * umac_send_mb_message_to_mac would've released the mem * allocated by cmd. @@ -20159,11 +20008,11 @@ void csr_process_set_antenna_mode(tpAniSirGlobal mac, tSmeCmd *command) fail: param = qdf_mem_malloc(sizeof(*param)); if (!param) { - sms_log(mac, LOGE, - FL("Malloc fail: Fail to send response to SME")); + sme_err( + "Malloc fail: Fail to send response to SME"); return; } - sms_log(mac, LOGE, FL("Sending set dual mac fail response to SME")); + sme_err("Sending set dual mac fail response to SME"); param->status = SET_ANTENNA_MODE_STATUS_ECANCELED; msg.type = eWNI_SME_SET_ANTENNA_MODE_RESP; msg.bodyptr = param; @@ -20191,12 +20040,12 @@ void csr_process_nss_update_req(tpAniSirGlobal mac, tSmeCmd *command) tCsrRoamSession *session; if (!command) { - sms_log(mac, LOGE, FL("nss update param is NULL")); + sme_err("nss update param is NULL"); return; } if (!CSR_IS_SESSION_VALID(mac, command->sessionId)) { - sms_log(mac, LOGE, FL("Invalid session id %d"), + sme_err("Invalid session id %d", command->sessionId); return; } @@ -20205,7 +20054,7 @@ void csr_process_nss_update_req(tpAniSirGlobal mac, tSmeCmd *command) len = sizeof(*msg); msg = qdf_mem_malloc(len); if (!msg) { - sms_log(mac, LOGE, FL("Memory allocation failed")); + sme_err("Memory allocation failed"); /* Probably the fail response is also fail during malloc. * Still proceeding to send response! */ @@ -20218,23 +20067,22 @@ void csr_process_nss_update_req(tpAniSirGlobal mac, tSmeCmd *command) msg->new_nss = command->u.nss_update_cmd.new_nss; msg->vdev_id = command->u.nss_update_cmd.session_id; - sms_log(mac, LOGD, - FL("Posting eWNI_SME_NSS_UPDATE_REQ to PE")); + sme_debug("Posting eWNI_SME_NSS_UPDATE_REQ to PE"); status = umac_send_mb_message_to_mac(msg); if (QDF_STATUS_SUCCESS != status) { - sms_log(mac, LOGE, FL("Posting to PE failed")); + sme_err("Posting to PE failed"); return; } return; fail: param = qdf_mem_malloc(sizeof(*param)); if (!param) { - sms_log(mac, LOGE, - FL("Malloc fail: Fail to send response to SME")); + sme_err( + "Malloc fail: Fail to send response to SME"); return; } - sms_log(mac, LOGE, FL("Sending nss update fail response to SME")); + sme_err("Sending nss update fail response to SME"); param->tx_status = QDF_STATUS_E_FAILURE; param->session_id = command->u.nss_update_cmd.session_id; msg_return.type = eWNI_SME_NSS_UPDATE_RSP; @@ -20256,8 +20104,8 @@ void csr_roam_fill_tdls_info(tpAniSirGlobal mac_ctx, tCsrRoamInfo *roam_info, roam_info->tdls_prohibited = join_rsp->tdls_prohibited; roam_info->tdls_chan_swit_prohibited = join_rsp->tdls_chan_swit_prohibited; - sms_log(mac_ctx, LOGD, - FL("tdls:prohibit: %d, chan_swit_prohibit: %d"), + sme_debug( + "tdls:prohibit: %d, chan_swit_prohibit: %d", roam_info->tdls_prohibited, roam_info->tdls_chan_swit_prohibited); } @@ -20300,16 +20148,16 @@ QDF_STATUS csr_roam_synch_callback(tpAniSirGlobal mac_ctx, status = sme_acquire_global_lock(&mac_ctx->sme); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, FL("LFR3: Locking failed, bailing out")); + sme_err("LFR3: Locking failed, bailing out"); return status; } if (!session) { - sms_log(mac_ctx, LOGE, FL("LFR3: Session not found")); + sme_err("LFR3: Session not found"); sme_release_global_lock(&mac_ctx->sme); return QDF_STATUS_E_FAILURE; } - sms_log(mac_ctx, LOGD, FL("LFR3: reason: %d"), reason); + sme_debug("LFR3: reason: %d", reason); switch (reason) { case SIR_ROAMING_DEREGISTER_STA: /* @@ -20361,7 +20209,7 @@ QDF_STATUS csr_roam_synch_callback(tpAniSirGlobal mac_ctx, /* first update connection info from wma interface */ policy_mgr_update_connection_info(mac_ctx->psoc, session_id); /* then update remaining parameters from roam sync ctx */ - sms_log(mac_ctx, LOGE, FL("Update DBS hw mode")); + sme_err("Update DBS hw mode"); policy_mgr_hw_mode_transition_cb( roam_synch_data->hw_mode_trans_ind.old_hw_mode_index, roam_synch_data->hw_mode_trans_ind.new_hw_mode_index, @@ -20374,7 +20222,7 @@ QDF_STATUS csr_roam_synch_callback(tpAniSirGlobal mac_ctx, sme_release_global_lock(&mac_ctx->sme); return status; default: - sms_log(mac_ctx, LOGE, FL("LFR3: callback reason %d"), reason); + sme_err("LFR3: callback reason %d", reason); sme_release_global_lock(&mac_ctx->sme); return QDF_STATUS_E_FAILURE; } @@ -20383,7 +20231,7 @@ QDF_STATUS csr_roam_synch_callback(tpAniSirGlobal mac_ctx, status = csr_get_parsed_bss_description_ies( mac_ctx, bss_desc, &ies_local); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, FL("LFR3: fail to parse IEs")); + sme_err("LFR3: fail to parse IEs"); session->roam_synch_in_progress = false; sme_release_global_lock(&mac_ctx->sme); return status; @@ -20455,8 +20303,7 @@ QDF_STATUS csr_roam_synch_callback(tpAniSirGlobal mac_ctx, if (!QDF_IS_STATUS_SUCCESS(csr_roam_start_wait_for_key_timer( mac_ctx, CSR_WAIT_FOR_KEY_TIMEOUT_PERIOD)) ) { - sms_log(mac_ctx, LOGE, FL - ("Failed wait for key timer start")); + sme_err("Failed wait for key timer start"); csr_roam_substate_change(mac_ctx, eCSR_ROAM_SUBSTATE_NONE, session_id); @@ -20470,7 +20317,7 @@ QDF_STATUS csr_roam_synch_callback(tpAniSirGlobal mac_ctx, roam_info->pbFrames = qdf_mem_malloc(roam_info->nBeaconLength + roam_info->nAssocReqLength + roam_info->nAssocRspLength); if (NULL == roam_info->pbFrames) { - sms_log(mac_ctx, LOGE, FL("no memory available")); + sme_err("no memory available"); session->roam_synch_in_progress = false; if (roam_info) qdf_mem_free(roam_info); @@ -20565,7 +20412,7 @@ QDF_STATUS csr_roam_synch_callback(tpAniSirGlobal mac_ctx, conn_profile->acm_mask = sme_qos_get_acm_mask(mac_ctx, bss_desc, NULL); if (conn_profile->modifyProfileFields.uapsd_mask) { - sms_log(mac_ctx, LOGD, + sme_debug( " uapsd_mask (0x%X) set, request UAPSD now", conn_profile->modifyProfileFields.uapsd_mask); sme_ps_start_uapsd(mac_ctx, session_id, @@ -20574,8 +20421,8 @@ QDF_STATUS csr_roam_synch_callback(tpAniSirGlobal mac_ctx, conn_profile->dot11Mode = session->bssParams.uCfgDot11Mode; roam_info->u.pConnectedProfile = conn_profile; - sms_log(mac_ctx, LOGD, - FL("vht ch width %d staId %d nss %d rate_flag %d dot11Mode %d"), + sme_debug( + "vht ch width %d staId %d nss %d rate_flag %d dot11Mode %d", conn_profile->vht_channel_width, roam_info->staId, roam_info->chan_info.nss,