diff options
| author | Srinivas Girigowda <sgirigow@codeaurora.org> | 2017-03-17 11:17:28 -0700 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-03-21 09:41:07 -0700 |
| commit | 8fd1bf97f484fdd337598660183353ce56e0b3c2 (patch) | |
| tree | 983668801728d4532bc95add70e5cf6dbcfb437f | |
| parent | 3f63c2c46732940d35fcab39054f63a85278b50c (diff) | |
qcacld-3.0: Replace sms_log() with sme_* log levels in csr_api_scan.c
Replace sms_log() with sme_* appropriate log levels in csr_api_scan.c.
Change-Id: Ideeb7dc929b6f340d78d21ec1ac6195d9c3c8089
CRs-Fixed: 2020798
| -rw-r--r-- | core/sme/src/csr/csr_api_scan.c | 597 |
1 files changed, 256 insertions, 341 deletions
diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index d4d05d226c47..5fe5d6e0c97d 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -123,8 +123,7 @@ static void csr_release_scan_cmd_pending_list(tpAniSirGlobal pMac) if (eSmeCsrCommandMask & pCommand->command) { csr_abort_command(pMac, pCommand, true); } else { - sms_log(pMac, LOGE, FL("Error: Received command : %d"), - pCommand->command); + sme_err("Received command: %d", pCommand->command); } } } @@ -176,8 +175,7 @@ QDF_STATUS csr_scan_open(tpAniSirGlobal mac_ctx) csr_sta_ap_conc_timer_handler, mac_ctx); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("Mem Alloc failed for hTimerStaApConcTimer timer")); + sme_err("Mem Alloc failed for hTimerStaApConcTimer timer"); return status; } #endif @@ -304,23 +302,21 @@ csr_scan_2g_only_request(tpAniSirGlobal mac_ctx, QDF_ASSERT(scan_cmd && scan_req); /* To silence the KW tool null check is added */ if ((scan_cmd == NULL) || (scan_req == NULL)) { - sms_log(mac_ctx, LOGE, - FL(" Scan Cmd or Scan Request is NULL ")); + sme_err("Scan Cmd or Scan Request is NULL"); return QDF_STATUS_E_INVAL; } if (eCSR_SCAN_REQUEST_FULL_SCAN != scan_req->requestType) return QDF_STATUS_SUCCESS; - sms_log(mac_ctx, LOGD, - FL("Scanning only 2G Channels during first scan")); + sme_debug("Scanning only 2G Channels during first scan"); /* Contsruct valid Supported 2.4 GHz Channel List */ if (NULL == scan_req->ChannelInfo.ChannelList) { scan_req->ChannelInfo.ChannelList = qdf_mem_malloc(NUM_24GHZ_CHANNELS); if (NULL == scan_req->ChannelInfo.ChannelList) { - sms_log(mac_ctx, LOGE, FL("Memory allocation failed.")); + sme_err("Memory allocation failed"); return QDF_STATUS_E_NOMEM; } for (idx = 1; idx <= NUM_24GHZ_CHANNELS; idx++) { @@ -384,15 +380,13 @@ csr_issue_11d_scan(tpAniSirGlobal mac_ctx, tSmeCmd *scan_cmd, tCsrRoamSession *csr_session = CSR_GET_SESSION(mac_ctx, session_id); if (csr_session == NULL) { - sms_log(mac_ctx, LOGE, FL("session %d not found"), - session_id); + sme_err("session %d not found", session_id); QDF_ASSERT(0); return QDF_STATUS_E_FAILURE; } if (num_chn > WNI_CFG_VALID_CHANNEL_LIST_LEN) { - sms_log(mac_ctx, LOGE, FL("invalid number of channels: %d"), - num_chn); + sme_err("invalid number of channels: %d", num_chn); return QDF_STATUS_E_FAILURE; } @@ -407,14 +401,14 @@ csr_issue_11d_scan(tpAniSirGlobal mac_ctx, tSmeCmd *scan_cmd, qdf_mem_set(&tmp_rq, sizeof(tCsrScanRequest), 0); scan_11d_cmd = csr_get_command_buffer(mac_ctx); if (!scan_11d_cmd) { - sms_log(mac_ctx, LOGE, FL("scan_11d_cmd failed")); + sme_err("scan_11d_cmd failed"); return QDF_STATUS_E_FAILURE; } qdf_mem_set(&scan_11d_cmd->u.scanCmd, sizeof(tScanCmd), 0); chn_info->ChannelList = qdf_mem_malloc(num_chn); if (NULL == chn_info->ChannelList) { - sms_log(mac_ctx, LOGE, FL("Failed to allocate memory")); + sme_err("Failed to allocate memory"); return QDF_STATUS_E_NOMEM; } qdf_mem_copy(chn_info->ChannelList, @@ -458,7 +452,7 @@ csr_issue_11d_scan(tpAniSirGlobal mac_ctx, tSmeCmd *scan_cmd, } if (mac_ctx->roam.configParam.nInitialDwellTime) { tmp_rq.maxChnTime = mac_ctx->roam.configParam.nInitialDwellTime; - sms_log(mac_ctx, LOGD, FL("11d scan, updating dwell time for first scan %u"), + sme_debug("11d scan, updating dwell time for first scan %u", tmp_rq.maxChnTime); } @@ -468,7 +462,7 @@ csr_issue_11d_scan(tpAniSirGlobal mac_ctx, tSmeCmd *scan_cmd, qdf_mem_free(chn_info->ChannelList); chn_info->ChannelList = NULL; if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, FL("csr_scan_copy_request failed")); + sme_err("csr_scan_copy_request failed"); return QDF_STATUS_E_FAILURE; } @@ -478,7 +472,7 @@ csr_issue_11d_scan(tpAniSirGlobal mac_ctx, tSmeCmd *scan_cmd, status = csr_queue_sme_command(mac_ctx, scan_11d_cmd, false); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, FL("Failed to send message status = %d"), + sme_err("Failed to send message status = %d", status); return QDF_STATUS_E_FAILURE; } @@ -495,7 +489,7 @@ QDF_STATUS csr_scan_request(tpAniSirGlobal pMac, uint16_t sessionId, tCsrConfig *cfg_prm = &pMac->roam.configParam; if (scan_req == NULL) { - sms_log(pMac, LOGE, FL("scan_req is NULL")); + sme_err("scan_req is NULL"); QDF_ASSERT(0); return status; } @@ -513,7 +507,7 @@ QDF_STATUS csr_scan_request(tpAniSirGlobal pMac, uint16_t sessionId, && scan_req->SSIDs.numOfSSIDs && (NULL != scan_req->SSIDs.SSIDList) && (scan_req->SSIDs.SSIDList->SSID.length > DIRECT_SSID_LEN)) { - sms_log(pMac, LOGD, FL("P2P: Increasing the min and max Dwell time to %d for specific SSID scan %.*s"), + sme_debug("P2P: Increasing the min and max Dwell time to %d for specific SSID scan %.*s", MAX_CHN_TIME_TO_FIND_GO, scan_req->SSIDs.SSIDList->SSID.length, scan_req->SSIDs.SSIDList->SSID.ssId); @@ -522,7 +516,7 @@ QDF_STATUS csr_scan_request(tpAniSirGlobal pMac, uint16_t sessionId, } if (!pMac->scan.fScanEnable) { - sms_log(pMac, LOGE, FL("SId: %d Scanning not enabled Scan type=%u, numOfSSIDs=%d P2P search=%d"), + sme_err("SId: %d Scanning not enabled Scan type=%u, numOfSSIDs=%d P2P search=%d", sessionId, scan_req->requestType, scan_req->SSIDs.numOfSSIDs, scan_req->p2pSearch); @@ -531,7 +525,7 @@ QDF_STATUS csr_scan_request(tpAniSirGlobal pMac, uint16_t sessionId, scan_cmd = csr_get_command_buffer(pMac); if (!scan_cmd) { - sms_log(pMac, LOGE, FL("scan_cmd is NULL")); + sme_err("scan_cmd is NULL"); goto release_cmd; } @@ -539,15 +533,14 @@ QDF_STATUS csr_scan_request(tpAniSirGlobal pMac, uint16_t sessionId, scan_cmd->command = eSmeCommandScan; scan_cmd->sessionId = sessionId; if (scan_cmd->sessionId >= CSR_ROAM_SESSION_MAX) - sms_log(pMac, LOGE, FL("Invalid Sme SessionID: %d"), sessionId); + sme_err("Invalid Sme SessionID: %d", sessionId); scan_cmd->u.scanCmd.callback = callback; scan_cmd->u.scanCmd.pContext = pContext; csr_set_scan_reason(scan_cmd, scan_req->requestType); if (scan_req->minChnTime == 0 && scan_req->maxChnTime == 0) { /* The caller doesn't set the time correctly. Set it here */ csr_set_default_scan_timing(pMac, scan_req->scanType, scan_req); - sms_log(pMac, LOGD, - FL("Setting default min %d and max %d ChnTime"), + sme_debug("Setting default min %d and max %d ChnTime", scan_req->minChnTime, scan_req->maxChnTime); } #ifdef WLAN_AP_STA_CONCURRENCY @@ -597,7 +590,7 @@ QDF_STATUS csr_scan_request(tpAniSirGlobal pMac, uint16_t sessionId, if (cfg_prm->nInitialDwellTime) { scan_req->maxChnTime = cfg_prm->nInitialDwellTime; cfg_prm->nInitialDwellTime = 0; - sms_log(pMac, LOGD, FL("updating dwell time for first scan %u"), + sme_debug("updating dwell time for first scan %u", scan_req->maxChnTime); } scan_req->scan_adaptive_dwell_mode = cfg_prm->scan_adaptive_dwell_mode; @@ -612,8 +605,7 @@ QDF_STATUS csr_scan_request(tpAniSirGlobal pMac, uint16_t sessionId, */ cfg_prm->initial_scan_no_dfs_chnl = 0; if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL("fail to copy request status = %d"), status); + sme_err("fail to copy request status: %d", status); goto release_cmd; } @@ -623,8 +615,8 @@ QDF_STATUS csr_scan_request(tpAniSirGlobal pMac, uint16_t sessionId, status = qdf_mc_timer_init(&scan_cmd->u.scanCmd.csr_scan_timer, QDF_TIMER_TYPE_SW, csr_scan_active_list_timeout_handle, scan_cmd); - sms_log(pMac, LOGD, - FL("SId=%d scanId=%d Scan reason=%u numSSIDs=%d numChan=%d P2P search=%d minCT=%d maxCT=%d uIEFieldLen=%d BSSID: " MAC_ADDRESS_STR), + sme_debug( + "SId=%d scanId=%d Scan reason=%u numSSIDs=%d numChan=%d P2P search=%d minCT=%d maxCT=%d uIEFieldLen=%d BSSID: " MAC_ADDRESS_STR, sessionId, scan_cmd->u.scanCmd.scanID, scan_cmd->u.scanCmd.reason, pTempScanReq->SSIDs.numOfSSIDs, pTempScanReq->ChannelInfo.numOfChannels, @@ -634,15 +626,14 @@ QDF_STATUS csr_scan_request(tpAniSirGlobal pMac, uint16_t sessionId, status = csr_queue_sme_command(pMac, scan_cmd, 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); } release_cmd: if (!QDF_IS_STATUS_SUCCESS(status) && scan_cmd) { - sms_log(pMac, LOGE, FL(" SId: %d Failed with status=%d" - " Scan reason=%u numOfSSIDs=%d" - " P2P search=%d scanId=%d"), + sme_err(" SId: %d Failed with status=%d" + " Scan reason=%u numOfSSIDs=%d" + " P2P search=%d scanId=%d", sessionId, status, scan_cmd->u.scanCmd.reason, scan_req->SSIDs.numOfSSIDs, scan_req->p2pSearch, scan_cmd->u.scanCmd.scanID); @@ -664,13 +655,12 @@ static QDF_STATUS csr_issue_roam_after_lostlink_scan(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; } - sms_log(pMac, LOGD, FL("Entry")); if (pSession->fCancelRoaming) { - sms_log(pMac, LOGW, FL("lost link roaming canceled")); + sme_debug("lost link roaming canceled"); status = QDF_STATUS_SUCCESS; goto free_filter; } @@ -739,10 +729,10 @@ QDF_STATUS csr_scan_handle_failed_lostlink1(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; } - sms_log(pMac, LOGW, "Lost link scan 1 failed"); + sme_debug("Lost link scan 1 failed"); if (pSession->fCancelRoaming) return QDF_STATUS_E_FAILURE; if (!pSession->pCurRoamProfile) @@ -769,11 +759,11 @@ QDF_STATUS csr_scan_handle_failed_lostlink2(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; } - sms_log(pMac, LOGW, "Lost link scan 2 failed"); + sme_debug("Lost link scan 2 failed"); if (pSession->fCancelRoaming) return QDF_STATUS_E_FAILURE; @@ -789,7 +779,7 @@ QDF_STATUS csr_scan_handle_failed_lostlink2(tpAniSirGlobal pMac, QDF_STATUS csr_scan_handle_failed_lostlink3(tpAniSirGlobal pMac, uint32_t sessionId) { - sms_log(pMac, LOGD, "Lost link scan 3 failed"); + sme_debug("Lost link scan 3 failed"); return QDF_STATUS_SUCCESS; } @@ -929,11 +919,10 @@ csr_scan_request_lost_link1(tpAniSirGlobal mac_ctx, uint32_t session_id) tCsrRoamSession *session = CSR_GET_SESSION(mac_ctx, session_id); if (!session) { - sms_log(mac_ctx, LOGE, FL("session %d not found"), session_id); + sme_err("session %d not found", session_id); return QDF_STATUS_E_FAILURE; } - sms_log(mac_ctx, LOGD, FL("Entry")); cmd = csr_get_command_buffer(mac_ctx); if (!cmd) { status = QDF_STATUS_E_RESOURCES; @@ -948,13 +937,12 @@ csr_scan_request_lost_link1(tpAniSirGlobal mac_ctx, uint32_t session_id) sizeof(struct qdf_mac_addr), 0xFF); status = csr_queue_sme_command(mac_ctx, cmd, false); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("fail to send message status = %d"), status); + sme_err("fail to send message status: %d", status); } release_lost_link1_cmd: if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGW, FL("failed with status %d"), status); + sme_warn("failed with status %d", status); if (cmd) csr_release_command_scan(mac_ctx, cmd); status = csr_scan_handle_failed_lostlink1(mac_ctx, session_id); @@ -1056,11 +1044,10 @@ csr_scan_request_lost_link2(tpAniSirGlobal mac_ctx, uint32_t session_id) tCsrRoamSession *session = CSR_GET_SESSION(mac_ctx, session_id); if (!session) { - sms_log(mac_ctx, LOGE, FL("session %d not found"), session_id); + sme_err("session %d not found", session_id); return QDF_STATUS_E_FAILURE; } - sms_log(mac_ctx, LOGD, FL(" called")); cmd = csr_get_command_buffer(mac_ctx); if (!cmd) { status = QDF_STATUS_E_RESOURCES; @@ -1076,14 +1063,13 @@ csr_scan_request_lost_link2(tpAniSirGlobal mac_ctx, uint32_t session_id) /* Put to the head in pending queue */ status = csr_queue_sme_command(mac_ctx, cmd, true); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("fail to send message status = %d"), status); + sme_err("fail to send message status: %d", status); goto release_lost_link2_cmd; } release_lost_link2_cmd: if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGW, FL("failed with status %d"), status); + sme_warn("failed with status %d", status); if (cmd) csr_release_command_scan(mac_ctx, cmd); status = csr_scan_handle_failed_lostlink2(mac_ctx, session_id); @@ -1104,7 +1090,6 @@ csr_scan_request_lost_link3(tpAniSirGlobal mac_ctx, uint32_t session_id) QDF_STATUS status = QDF_STATUS_SUCCESS; tSmeCmd *cmd; - sms_log(mac_ctx, LOGD, FL(" called")); do { cmd = csr_get_command_buffer(mac_ctx); if (!cmd) { @@ -1132,13 +1117,12 @@ csr_scan_request_lost_link3(tpAniSirGlobal mac_ctx, uint32_t session_id) /* Put to the head of pending queue */ status = csr_queue_sme_command(mac_ctx, cmd, true); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("fail to send message status = %d"), status); + sme_err("fail to send message status: %d", status); break; } } while (0); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGW, FL("failed with status %d"), status); + sme_warn("failed with status %d", status); if (cmd) csr_release_command_scan(mac_ctx, cmd); } @@ -1172,8 +1156,7 @@ QDF_STATUS csr_scan_handle_search_for_ssid(tpAniSirGlobal pMac, * the newer roam command is the one to execute */ if (csr_is_roam_command_waiting_for_session(pMac, sessionId)) { - sms_log(pMac, LOGW, - FL("aborts because roam command waiting")); + sme_warn("aborts because roam command waiting"); break; } if (pProfile == NULL) @@ -1192,8 +1175,7 @@ QDF_STATUS csr_scan_handle_search_for_ssid(tpAniSirGlobal pMac, break; if (pMac->roam.roamSession[sessionId].connectState == eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTING) { - sms_log(pMac, LOGE, - FL("upper layer issued disconnetion")); + sme_err("upper layer issued disconnetion"); status = QDF_STATUS_E_FAILURE; break; } @@ -1230,7 +1212,7 @@ QDF_STATUS csr_scan_handle_search_for_ssid_failure(tpAniSirGlobal pMac, eCsrRoamResult roam_result; 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 this scan is for LFR */ @@ -1249,7 +1231,7 @@ QDF_STATUS csr_scan_handle_search_for_ssid_failure(tpAniSirGlobal pMac, &pCommand->u.scanCmd.u.scanRequest.SSIDs.SSIDList[0].SSID; qdf_mem_copy(str, ptr_ssid->ssId, ptr_ssid->length); str[ptr_ssid->length] = 0; - sms_log(pMac, LOGD, FL("SSID = %s"), str); + sme_debug("SSID: %s", str); } #endif /* @@ -1261,8 +1243,8 @@ QDF_STATUS csr_scan_handle_search_for_ssid_failure(tpAniSirGlobal pMac, eCsrHddIssued, pCommand->u.scanCmd.roamId, true, true); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, - FL("failed to issue startIBSS, status: 0x%08X"), + sme_err( + "failed to issue startIBSS, status: 0x%08X", status); csr_roam_call_callback(pMac, sessionId, NULL, pCommand->u.scanCmd.roamId, eCSR_ROAM_FAILED, @@ -1347,8 +1329,7 @@ void csr_remove_bssid_from_scan_list(tpAniSirGlobal mac_ctx, entry = csr_ll_next(list, entry, LL_ACCESS_NOLOCK); csr_ll_remove_entry(list, free_elem, LL_ACCESS_NOLOCK); csr_free_scan_result_entry(mac_ctx, bss_desc); - sms_log(mac_ctx, LOGW, FL("Removed BSS entry:%pM"), - bssid); + sme_warn("Removed BSS entry:%pM", bssid); continue; } @@ -1459,8 +1440,7 @@ static int csr_get_altered_rssi(tpAniSirGlobal mac_ctx, int rssi, modified_rssi -= CSR_MAX(roam_params->max_drop_rssi_5g, penalty_factor); } - sms_log(mac_ctx, LOGD, - FL("5G BSSID"MAC_ADDRESS_STR" AR=%d, MR=%d, ch=%d"), + sme_debug("5G BSSID"MAC_ADDRESS_STR" AR=%d, MR=%d, ch=%d", MAC_ADDR_ARRAY(local_bssid.bytes), rssi, modified_rssi, channel_id); } @@ -1477,8 +1457,8 @@ static int csr_get_altered_rssi(tpAniSirGlobal mac_ctx, int rssi, if (!qdf_is_macaddr_equal(&fav_bssid, bssid)) continue; modified_rssi += roam_params->bssid_favored_factor[i]; - sms_log(mac_ctx, LOGD, - FL("Pref"MAC_ADDRESS_STR" AR=%d, MR=%d, ch=%d"), + sme_debug( + "Pref"MAC_ADDRESS_STR" AR=%d, MR=%d, ch=%d", MAC_ADDR_ARRAY(local_bssid.bytes), rssi, modified_rssi, channel_id); } @@ -1660,8 +1640,7 @@ static void csr_scan_add_to_occupied_channels(tpAniSirGlobal pMac, num_occupied_ch, ch); if (QDF_IS_STATUS_SUCCESS(status)) { occupied_ch->numChannels++; - sms_log(pMac, LOGD, - FL("Added channel %d to the list (count=%d)"), + sme_debug("Added channel %d to the list (count=%d)", ch, occupied_ch->numChannels); if (occupied_ch->numChannels > CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN) @@ -1738,10 +1717,10 @@ csr_parser_scan_result_for_5ghz_preference(tpAniSirGlobal pMac, continue; } - sms_log(pMac, LOGD, FL("SSID Matched")); + sme_debug("SSID Matched"); if (pFilter->bOSENAssociation) { fMatch = true; - sms_log(pMac, LOGD, FL("Security Matched")); + sme_debug("Security Matched"); if ((pBssDesc->Result.pvIes == NULL) && pIes) qdf_mem_free(pIes); continue; @@ -1766,14 +1745,13 @@ csr_parser_scan_result_for_5ghz_preference(tpAniSirGlobal pMac, if ((pBssDesc->Result.pvIes == NULL) && pIes) qdf_mem_free(pIes); if (fMatch) - sms_log(pMac, LOGD, FL("Security Matched")); + sme_debug("Security Matched"); } /* for loop ends */ if (fMatch && (pBssDesc->Result.BssDescriptor.rssi > pMac->scan.inScanResultBestAPRssi)) { - sms_log(pMac, LOGD, - FL("Best AP Rssi changed from %d to %d"), + sme_debug("Best AP Rssi changed from %d to %d", pMac->scan.inScanResultBestAPRssi, pBssDesc->Result.BssDescriptor.rssi); pMac->scan.inScanResultBestAPRssi = @@ -1814,7 +1792,7 @@ csr_prefer_5ghz(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter) csr_parser_scan_result_for_5ghz_preference(pMac, pFilter); if (-128 != pMac->scan.inScanResultBestAPRssi || CSR_IS_SELECT_5G_PREFERRED(pMac)) { - sms_log(pMac, LOGD, FL("Best AP Rssi is %d"), + sme_debug("Best AP Rssi is %d", pMac->scan.inScanResultBestAPRssi); /* Modify Rssi category based on best AP Rssi */ if (-128 != pMac->scan.inScanResultBestAPRssi) @@ -1835,7 +1813,7 @@ csr_prefer_5ghz(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter) &pBssDesc->Result.BssDescriptor.bssId, pBssDesc->Result.BssDescriptor.channelId); - sms_log(pMac, LOGD, FL("BSSID("MAC_ADDRESS_STR") Rssi(%d) Chnl(%d) PrefVal(%u) SSID=%.*s"), + sme_debug("BSSID("MAC_ADDRESS_STR") Rssi(%d) Chnl(%d) PrefVal(%u) SSID=%.*s", MAC_ADDR_ARRAY( pBssDesc->Result.BssDescriptor.bssId), pBssDesc->Result.BssDescriptor.rssi, @@ -1894,7 +1872,7 @@ csr_save_ies(tpAniSirGlobal pMac, *pNewIes = qdf_mem_malloc(sizeof(tDot11fBeaconIEs)); if (NULL == *pNewIes) { status = QDF_STATUS_E_NOMEM; - sms_log(pMac, LOGE, FL("fail to allocate memory for IEs")); + sme_err("fail to allocate memory for IEs"); /* Need to free memory allocated by csr_match_bss */ if (!pBssDesc->Result.pvIes) qdf_mem_free(pIes); @@ -1932,8 +1910,8 @@ csr_save_scan_entry(tpAniSirGlobal pMac, pResult = qdf_mem_malloc(allocLen); if (NULL == pResult) { status = QDF_STATUS_E_NOMEM; - sms_log(pMac, LOGE, - FL("fail to allocate memory for scan result, len=%d"), + sme_err( + "fail to allocate memory for scan result, len: %d", allocLen); if (pNewIes) qdf_mem_free(pNewIes); @@ -2025,8 +2003,7 @@ static QDF_STATUS csr_calc_pref_val_by_pcl(tpAniSirGlobal mac_ctx, if (NULL == mac_ctx || NULL == bss_descr) return QDF_STATUS_E_FAILURE; if (filter && (0 != filter->BSSIDs.numOfBSSIDs)) { - sms_log(mac_ctx, LOGW, - FL("filter has specific bssid, no point of boosting")); + sme_warn("filter has specific bssid, no point of boosting"); return QDF_STATUS_SUCCESS; } @@ -2043,8 +2020,8 @@ static QDF_STATUS csr_calc_pref_val_by_pcl(tpAniSirGlobal mac_ctx, new_pref_val = csr_derive_prefer_value_from_rssi(mac_ctx, temp_rssi); - sms_log(mac_ctx, LOGD, - FL("%pM: rssi:%d org pref=%d temp rssi:%d new pref=%d pref=%d updated pref=%d"), + sme_debug( + "%pM: rssi:%d org pref=%d temp rssi:%d new pref=%d pref=%d updated pref=%d", bss_descr->Result.BssDescriptor.bssId, bss_descr->Result.BssDescriptor.rssi, orig_pref_val, temp_rssi, new_pref_val, @@ -2088,8 +2065,8 @@ csr_parse_scan_results(tpAniSirGlobal pMac, } if (QDF_STATUS_E_FAILURE == status) - sms_log(pMac, QDF_TRACE_LEVEL_ERROR, - FL("Retrieving pcl failed from HDD")); + sme_err("Retrieving pcl failed from HDD"); + pEntry = csr_ll_peek_head(&pMac->scan.scanResultList, LL_ACCESS_NOLOCK); while (pEntry) { pBssDesc = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); @@ -2104,8 +2081,7 @@ csr_parse_scan_results(tpAniSirGlobal pMac, status = csr_save_ies(pMac, pFilter, pBssDesc, &pNewIes, &fMatch, &uc, &mc, &auth); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGD, FL("save ies fail %d"), - status); + sme_debug("save ies fail %d", status); break; } /* @@ -2117,8 +2093,7 @@ csr_parse_scan_results(tpAniSirGlobal pMac, pNewIes, pRetList, count, uc, mc, &auth); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGD, FL("save entry fail %d"), - status); + sme_debug("save entry fail %d", status); break; } pEntry = csr_ll_next(&pMac->scan.scanResultList, pEntry, @@ -2143,14 +2118,14 @@ QDF_STATUS csr_scan_get_result(tpAniSirGlobal pMac, pRetList = qdf_mem_malloc(sizeof(tScanResultList)); if (NULL == pRetList) { - sms_log(pMac, LOGE, FL("pRetList is NULL")); + sme_err("pRetList is NULL"); return QDF_STATUS_E_NOMEM; } csr_ll_open(pMac->hHdd, &pRetList->List); pRetList->pCurEntry = NULL; status = csr_parse_scan_results(pMac, pFilter, pRetList, &count); - sms_log(pMac, LOGD, FL("return %d BSS %d"), + sme_debug("return %d BSS %d", status, csr_ll_count(&pRetList->List)); if (!QDF_IS_STATUS_SUCCESS(status) || (phResult == NULL)) { /* Fail or No one wants the result. */ @@ -2191,8 +2166,7 @@ tCsrScanResultInfo *csr_scan_get_result_for_bssid(tpAniSirGlobal mac_ctx, len = sizeof(*scan_info) + bss_len; scan_info = qdf_mem_malloc(len); if (!scan_info) { - sms_log(mac_ctx, LOGE, - FL("Failed to allocate memory for scan info, len = %lu"), + sme_err("Failed to allocate memory for scan info, len = %lu", len); break; } @@ -2248,12 +2222,11 @@ QDF_STATUS csr_scan_flush_result(tpAniSirGlobal pMac) bool isFlushDenied = csr_scan_flush_denied(pMac); if (isFlushDenied) { - sms_log(pMac, LOGW, "%s: scan flush denied in roam state %d", - __func__, isFlushDenied); + sme_warn("scan flush denied in roam state %d", isFlushDenied); return QDF_STATUS_E_FAILURE; } - sms_log(pMac, LOGD, "%s: Flushing all scan results", __func__); + sme_debug("Flushing all scan results"); csr_ll_scan_purge_result(pMac, &pMac->scan.tempScanResults); csr_ll_scan_purge_result(pMac, &pMac->scan.scanResultList); return QDF_STATUS_SUCCESS; @@ -2305,7 +2278,7 @@ void csr_scan_flush_bss_entry(tpAniSirGlobal pMac, pEntry = csr_ll_next(pList, pEntry, LL_ACCESS_NOLOCK); csr_ll_remove_entry(pList, pFreeElem, LL_ACCESS_NOLOCK); csr_free_scan_result_entry(pMac, pBssDesc); - sms_log(pMac, LOGD, FL("Removed BSS entry:%pM"), + sme_debug("Removed BSS entry:%pM", pCsaOffloadInd->bssid.bytes); continue; } @@ -2387,7 +2360,7 @@ QDF_STATUS csr_scan_filter_results(tpAniSirGlobal pMac) pMac->roam. validChannelList, &len))) { - sms_log(pMac, LOGE, "Failed to get Channel list from CFG"); + sme_err("Failed to get Channel list from CFG"); } csr_ll_lock(&pMac->scan.scanResultList); @@ -2404,7 +2377,7 @@ QDF_STATUS csr_scan_filter_results(tpAniSirGlobal pMac) csr_free_scan_result_entry(pMac, pBssDesc); } } else { - sms_log(pMac, LOGD, FL("%d is a Valid channel"), + sme_debug("%d is a Valid channel", pBssDesc->Result.BssDescriptor.channelId); } pEntry = pTempEntry; @@ -2428,7 +2401,7 @@ QDF_STATUS csr_scan_filter_results(tpAniSirGlobal pMac) csr_free_scan_result_entry(pMac, pBssDesc); } } else { - sms_log(pMac, LOGD, FL("%d is a Valid channel"), + sme_debug("%d is a Valid channel", pBssDesc->Result.BssDescriptor.channelId); } pEntry = pTempEntry; @@ -2551,15 +2524,13 @@ QDF_STATUS csr_scanning_state_msg_processor(tpAniSirGlobal pMac, csr_roam_check_for_link_status_change(pMac, (tSirSmeRsp *) pMsgBuf); } else { - sms_log(pMac, LOGW, - FL("Message [0x%04x] received in wrong state"), + sme_warn("Message [0x%04x] received in wrong state", pMsg->type); } return status; } - sms_log(pMac, LOGD, - FL("Scanning: ASSOC cnf can be given to upper layer")); + sme_debug("Scanning: ASSOC cnf can be given to upper layer"); qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); pRoamInfo = &roamInfo; pUpperLayerAssocCnf = (tSirSmeAssocIndToUpperLayerCnf *) pMsgBuf; @@ -2568,7 +2539,7 @@ QDF_STATUS csr_scanning_state_msg_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 QDF_STATUS_E_FAILURE; } @@ -2704,7 +2675,7 @@ static bool csr_remove_dup_bss_description(tpAniSirGlobal pMac, BssDescriptor); csr_free_scan_result_entry(pMac, scan_entry); } else { - sms_log(pMac, LOGW, FL("fail to remove entry")); + sme_warn("fail to remove entry"); } fRC = true; /* @@ -2734,12 +2705,11 @@ static QDF_STATUS csr_add_pmkid_candidate_list(tpAniSirGlobal pMac, host_event_wlan_security_payload_type); #endif /* FEATURE_WLAN_DIAG_SUPPORT_CSR */ 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("NumPmkidCandidate = %d"), - pSession->NumPmkidCandidate); + sme_debug("NumPmkidCandidate: %d", pSession->NumPmkidCandidate); if (!pIes) return status; /* check if this is a RSN BSS */ @@ -2814,8 +2784,7 @@ static QDF_STATUS csr_process_bss_desc_for_pmkid_list(tpAniSirGlobal pMac, status = csr_add_pmkid_candidate_list(pMac, sessionId, pBssDesc, pIesLocal); if (!QDF_IS_STATUS_SUCCESS(status)) - sms_log(pMac, LOGE, - FL("csr_add_pmkid_candidate_list failed")); + sme_err("csr_add_pmkid_candidate_list failed"); else status = QDF_STATUS_SUCCESS; } @@ -2836,11 +2805,11 @@ static QDF_STATUS csr_add_bkid_candidate_list(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; } - sms_log(pMac, LOGD, + sme_debug( "csr_add_bkid_candidate_list called pMac->scan.NumBkidCandidate = %d", pSession->NumBkidCandidate); if (pIes) { @@ -2966,8 +2935,7 @@ static void csr_purge_scan_results(tpAniSirGlobal mac_ctx) /* Free the old BSS Entries */ if (csr_ll_remove_entry(&mac_ctx->scan.scanResultList, &bss_to_remove->Link, LL_ACCESS_NOLOCK)) { - sms_log(mac_ctx, LOGD, - FL("BSSID: "MAC_ADDRESS_STR" Removed, time delta (%llu) RSSI %d"), + sme_debug("BSSID: "MAC_ADDRESS_STR" Removed, time delta (%llu) RSSI %d", MAC_ADDR_ARRAY( bss_to_remove->Result.BssDescriptor.bssId), (curr_time - @@ -2997,8 +2965,8 @@ csr_remove_from_tmp_list(tpAniSirGlobal mac_ctx, while ((entry = csr_ll_remove_tail(&mac_ctx->scan.tempScanResults, LL_ACCESS_LOCK)) != NULL) { bss_dscp = GET_BASE_ADDR(entry, tCsrScanResult, Link); - sms_log(mac_ctx, LOGD, - FL("...Bssid= "MAC_ADDRESS_STR" chan= %d, rssi = -%d"), + sme_debug( + "...Bssid= "MAC_ADDRESS_STR" chan= %d, rssi = -%d", MAC_ADDR_ARRAY(bss_dscp->Result.BssDescriptor. bssId), bss_dscp->Result.BssDescriptor.channelId, @@ -3010,7 +2978,7 @@ csr_remove_from_tmp_list(tpAniSirGlobal mac_ctx, status = csr_get_parsed_bss_description_ies(mac_ctx, &bss_dscp->Result.BssDescriptor, &local_ie); if (!local_ie || !QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, FL("Cannot pared IEs")); + sme_err("Cannot pared IEs"); csr_free_scan_result_entry(mac_ctx, bss_dscp); continue; } @@ -3023,7 +2991,7 @@ csr_remove_from_tmp_list(tpAniSirGlobal mac_ctx, * LFR candidates came from FW */ if (CSR_SCAN_IS_OVER_BSS_LIMIT(mac_ctx)) { - sms_log(mac_ctx, LOGD, FL("BSS Limit reached")); + sme_debug("BSS Limit reached"); csr_purge_scan_results(mac_ctx); } /* check for duplicate scan results */ @@ -3066,9 +3034,9 @@ csr_remove_from_tmp_list(tpAniSirGlobal mac_ctx, && local_ie->Country.present) { csr_add_vote_for_country_info(mac_ctx, local_ie->Country.country); - sms_log(mac_ctx, LOGD, - FL("11d AP Bssid "MAC_ADDRESS_STR - " chan= %d, rssi = -%d, countryCode %c%c"), + sme_debug( + "11d AP Bssid "MAC_ADDRESS_STR + " chan= %d, rssi = -%d, countryCode %c%c", MAC_ADDR_ARRAY( bss_dscp->Result.BssDescriptor.bssId), bss_dscp->Result.BssDescriptor.channelId, @@ -3104,8 +3072,7 @@ static void csr_move_temp_scan_results_to_main_list(tpAniSirGlobal pMac, continue; pSession = CSR_GET_SESSION(pMac, i); if (csr_is_conn_state_connected(pMac, i)) { - sms_log(pMac, LOGD, - FL("No need to update CC in connected state")); + sme_debug("No need to update CC in connected state"); return; } } @@ -3133,8 +3100,8 @@ static tCsrScanResult *csr_scan_save_bss_description(tpAniSirGlobal pMac, if (NULL != pCsrBssDescription) { pCsrBssDescription->AgingCount = (int32_t) pMac->roam.configParam.agingCount; - sms_log(pMac, LOGD, - FL(" Set Aging Count = %d for BSS " MAC_ADDRESS_STR " "), + sme_debug( + "Set Aging Count = %d for BSS " MAC_ADDRESS_STR " ", pCsrBssDescription->AgingCount, MAC_ADDR_ARRAY(pCsrBssDescription->Result.BssDescriptor. bssId)); @@ -3260,8 +3227,7 @@ QDF_STATUS csr_save_to_channel_power2_g_5_g(tpAniSirGlobal pMac, pChannelSet->interChannelOffset = 4; f2GHzInfoFound = false; } else { - sms_log(pMac, LOGW, - FL("Invalid Channel %d Present in Country IE"), + sme_warn("Invalid Channel %d Present in Country IE", pChannelSet->firstChannel); qdf_mem_free(pChannelSet); return QDF_STATUS_E_FAILURE; @@ -3283,8 +3249,8 @@ QDF_STATUS csr_save_to_channel_power2_g_5_g(tpAniSirGlobal pMac, &pChannelSet->link, LL_ACCESS_LOCK); } else { - sms_log(pMac, LOGD, - FL("Adding 11B/G ch in 11A. 1st ch %d"), + sme_debug( + "Adding 11B/G ch in 11A. 1st ch %d", pChannelSet->firstChannel); qdf_mem_free(pChannelSet); } @@ -3304,8 +3270,8 @@ QDF_STATUS csr_save_to_channel_power2_g_5_g(tpAniSirGlobal pMac, &pChannelSet->link, LL_ACCESS_LOCK); } else { - sms_log(pMac, LOGD, - FL("Adding 11A ch in B/G. 1st ch %d"), + sme_debug( + "Adding 11A ch in B/G. 1st ch %d", pChannelSet->firstChannel); qdf_mem_free(pChannelSet); } @@ -3331,7 +3297,7 @@ static void csr_clear_dfs_channel_list(tpAniSirGlobal pMac) void csr_apply_power2_current(tpAniSirGlobal pMac) { - sms_log(pMac, LOGD, FL(" Updating Cfg with power settings")); + sme_debug("Updating Cfg with power settings"); csr_save_tx_power_to_cfg(pMac, &pMac->scan.channelPowerInfoList24, WNI_CFG_MAX_TX_POWER_2_4); csr_save_tx_power_to_cfg(pMac, &pMac->scan.channelPowerInfoList5G, @@ -3368,7 +3334,7 @@ void csr_apply_channel_power_info_to_fw(tpAniSirGlobal mac_ctx, /* Send msg to Lim to clear DFS channel list */ csr_clear_dfs_channel_list(mac_ctx); } else { - sms_log(mac_ctx, LOGE, FL("11D channel list is empty")); + sme_err("11D channel list is empty"); } csr_set_cfg_country_code(mac_ctx, countryCode); } @@ -3677,12 +3643,12 @@ void csr_apply_country_information(tpAniSirGlobal pMac) if (pMac->scan.domainIdCurrent != domainId) return; if (pMac->scan.domainIdCurrent != domainId) { - sms_log(pMac, LOGD, FL("Domain Changed Old %d, new %d"), + sme_debug("Domain Changed Old %d, new %d", pMac->scan.domainIdCurrent, domainId); status = wma_set_reg_domain(pMac, domainId); } if (status != QDF_STATUS_SUCCESS) - sms_log(pMac, LOGE, FL("fail to set regId %d"), domainId); + sme_err("fail to set regId %d", domainId); pMac->scan.domainIdCurrent = domainId; /* switch to active scans using this new channel list */ pMac->scan.curScanType = eSIR_ACTIVE_SCAN; @@ -3717,7 +3683,7 @@ void csr_save_channel_power_for_band(tpAniSirGlobal pMac, bool fill_5f) continue; if (count >= WNI_CFG_VALID_CHANNEL_LIST_LEN) { - sms_log(pMac, LOGW, FL("count(%d) exceeded"), count); + sme_warn("count: %d exceeded", count); break; } @@ -3809,7 +3775,7 @@ bool csr_learn_11dcountry_information(tpAniSirGlobal pMac, status = csr_get_regulatory_domain_for_country(pMac, pCountryCodeSelected, &domainId, SOURCE_11D); if (status != QDF_STATUS_SUCCESS) { - sms_log(pMac, LOGE, FL("fail to get regId %d"), domainId); + sme_err("fail to get regId %d", domainId); fRet = false; goto free_ie; } @@ -3826,7 +3792,7 @@ free_ie: void csr_save_scan_results(tpAniSirGlobal pMac, uint8_t reason, uint8_t sessionId) { - sms_log(pMac, LOGD, "%s: Saving scan results", __func__); + sme_debug("Saving scan results"); /* initialize this to false. profMoveInterimScanResultsToMainList() routine */ /* will set this to the channel where an .11d beacon is seen */ @@ -3900,19 +3866,18 @@ static eCsrScanCompleteNextCommand csr_scan_get_next_command_state( * set hw_mode fail -> csr_scan_handle_search_for_ssid_failure * failure: csr_scan_handle_search_for_ssid_failure */ - sms_log(pMac, LOGD, FL("Resp for eCsrScanForSsid")); + sme_debug("Resp for eCsrScanForSsid"); channel = cds_search_and_check_for_session_conc( pCommand->sessionId, pCommand->u.scanCmd.pToRoamProfile); if ((!channel) || !fSuccess) { NextCommand = eCsrNexteScanForSsidFailure; - sms_log(pMac, LOGD, - FL("next ScanForSsidFailure %d %d"), + sme_debug("next ScanForSsidFailure %d %d", channel, fSuccess); } else { NextCommand = eCsrNextCheckAllowConc; *chan = channel; - sms_log(pMac, LOGD, FL("next CheckAllowConc")); + sme_debug("next CheckAllowConc"); } break; default: @@ -3982,7 +3947,7 @@ csr_diag_scan_complete(tpAniSirGlobal pMac, status = csr_get_parsed_bss_description_ies(pMac, &pScanResult->BssDescriptor, &pIes); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(pMac, LOGE, FL("fail to parse IEs")); + sme_err("fail to parse IEs"); break; } qdf_mem_copy(pScanLog->bssid[n], @@ -4064,7 +4029,7 @@ static QDF_STATUS csr_save_profile(tpAniSirGlobal mac_ctx, save_cmd->u.scanCmd.pToRoamProfile = qdf_mem_malloc(sizeof(tCsrRoamProfile)); if (!save_cmd->u.scanCmd.pToRoamProfile) { - sms_log(mac_ctx, LOGE, FL("pToRoamProfile mem fail")); + sme_err("pToRoamProfile mem fail"); goto error; } @@ -4072,7 +4037,7 @@ static QDF_STATUS csr_save_profile(tpAniSirGlobal mac_ctx, save_cmd->u.scanCmd.pToRoamProfile, command->u.scanCmd.pToRoamProfile); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, FL("csr_roam_copy_profile fail")); + sme_err("csr_roam_copy_profile fail"); goto error; } @@ -4085,7 +4050,7 @@ static QDF_STATUS csr_save_profile(tpAniSirGlobal mac_ctx, save_cmd->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs * sizeof(tCsrSSIDInfo)); if (!save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList) { - sms_log(mac_ctx, LOGE, FL("SSIDList mem fail")); + sme_err("SSIDList mem fail"); goto error; } @@ -4105,7 +4070,7 @@ static QDF_STATUS csr_save_profile(tpAniSirGlobal mac_ctx, temp = qdf_mem_malloc(sizeof(tCsrScanResult) + bss_len); if (!temp) { - sms_log(mac_ctx, LOGE, FL("bss mem fail")); + sme_err("bss mem fail"); goto error; } @@ -4154,8 +4119,8 @@ csr_handle_nxt_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *pCommand, switch (*nxt_cmd) { case eCsrNext11dScan1Success: case eCsrNext11dScan2Success: - sms_log(mac_ctx, LOGD, - FL("11dScan1/3 produced results. Reissue Active scan")); + sme_debug( + "11dScan1/3 produced results. Reissue Active scan"); /* * if we found country information, no need to continue scanning * further, bail out @@ -4212,7 +4177,7 @@ csr_handle_nxt_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *pCommand, ret = cds_current_connections_update(pCommand->sessionId, chan, SIR_UPDATE_REASON_HIDDEN_STA); - sms_log(mac_ctx, LOGD, FL("chan: %d session: %d status: %d"), + sme_debug("chan: %d session: %d status: %d", chan, pCommand->sessionId, ret); saved_scan_cmd = (tSmeCmd *)mac_ctx->sme.saved_scan_cmd; if (saved_scan_cmd) { @@ -4220,21 +4185,17 @@ csr_handle_nxt_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *pCommand, saved_scan_cmd); qdf_mem_free(saved_scan_cmd); saved_scan_cmd = NULL; - sms_log(mac_ctx, LOGE, - FL("memory should have been free. Check!")); } save_cmd = (tSmeCmd *) qdf_mem_malloc(sizeof(*pCommand)); if (!save_cmd) { - sms_log(mac_ctx, LOGE, FL("save_cmd mem fail")); + sme_err("save_cmd mem fail"); goto error; } status = csr_save_profile(mac_ctx, save_cmd, pCommand); if (!QDF_IS_STATUS_SUCCESS(status)) { - /* csr_save_profile should report error */ - sms_log(mac_ctx, LOGE, FL("profile save failed %d"), - status); + sme_err("profile save failed %d", status); qdf_mem_free(save_cmd); return; } @@ -4243,7 +4204,7 @@ csr_handle_nxt_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *pCommand, if (QDF_STATUS_E_FAILURE == ret) { error: - sms_log(mac_ctx, LOGE, FL("conn update fail %d"), chan); + sme_err("conn update fail %d", chan); csr_scan_handle_search_for_ssid_failure(mac_ctx, pCommand); if (mac_ctx->sme.saved_scan_cmd) { @@ -4254,7 +4215,7 @@ error: } } else if ((QDF_STATUS_E_NOSUPPORT == ret) || (QDF_STATUS_E_ALREADY == ret)) { - sms_log(mac_ctx, LOGE, FL("conn update ret %d"), ret); + sme_err("conn update ret %d", ret); csr_scan_handle_search_for_ssid(mac_ctx, pCommand); if (mac_ctx->sme.saved_scan_cmd) { csr_saved_scan_cmd_free_fields(mac_ctx, @@ -4296,8 +4257,7 @@ QDF_STATUS csr_get_active_scan_entry(tpAniSirGlobal mac_ctx, if (csr_ll_is_list_empty(&mac_ctx->sme.smeScanCmdActiveList, LL_ACCESS_NOLOCK)) { - sms_log(mac_ctx, LOGE, - FL(" Active list Empty scanId: %d"), scan_id); + sme_err("Active list Empty scanId: %d", scan_id); csr_ll_unlock(&mac_ctx->sme.smeScanCmdActiveList); return QDF_STATUS_SUCCESS; } @@ -4310,8 +4270,7 @@ QDF_STATUS csr_get_active_scan_entry(tpAniSirGlobal mac_ctx, else if (cmd->command == eSmeCommandRemainOnChannel) cmd_scan_id = cmd->u.remainChlCmd.scan_id; if (cmd_scan_id == scan_id) { - sms_log(mac_ctx, LOGD, FL(" scanId Matched %d"), - scan_id); + sme_debug("scanId Matched %d", scan_id); *entry = localentry; csr_ll_unlock(&mac_ctx->sme.smeScanCmdActiveList); return QDF_STATUS_SUCCESS; @@ -4336,8 +4295,7 @@ bool csr_scan_complete(tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp) csr_get_active_scan_entry(pMac, pScanRsp->scan_id, &pEntry); if (!pEntry) { - sms_log(pMac, LOGE, - FL("Scan Completion called but NO cmd ACTIVE ...")); + sme_err("Scan Completion called but NO cmd ACTIVE"); return false; } @@ -4347,8 +4305,7 @@ bool csr_scan_complete(tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp) * and put this on the Free queue. */ if (eSmeCommandScan != pCommand->command) { - sms_log(pMac, LOGW, - FL("Scan Completion called, but active SCAN cmd")); + sme_warn("Scan Completion called, but active SCAN cmd"); return false; } @@ -4372,11 +4329,10 @@ bool csr_scan_complete(tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp) */ if (pCommand->u.scanCmd.callback != pMac->scan.callback11dScanDone) { - sms_log(pMac, LOGD, FL("Filtering the scan results")); + sme_debug("Filtering the scan results"); csr_scan_filter_results(pMac); } else { - sms_log(pMac, LOGD, - FL("11d_scan_done, flushing the scan results")); + sme_debug("11d_scan_done, flushing the scan results"); } } csr_save_scan_results(pMac, pCommand->u.scanCmd.reason, sessionId); @@ -4406,7 +4362,7 @@ csr_scan_remove_dup_bss_description_from_interim_list(tpAniSirGlobal mac_ctx, * in, then these must be duplicate scan results for this Bss. In that * case, remove the 'old' Bss description from the linked list. */ - sms_log(mac_ctx, LOGD, FL(" for BSS " MAC_ADDRESS_STR " "), + sme_debug("for BSS " MAC_ADDRESS_STR " ", MAC_ADDR_ARRAY(bss_dscp->bssId)); csr_ll_lock(&mac_ctx->scan.tempScanResults); pEntry = csr_ll_peek_head(&mac_ctx->scan.tempScanResults, @@ -4474,7 +4430,7 @@ static tCsrScanResult *csr_scan_save_bss_description_to_interim_list( cbAllocated = sizeof(tCsrScanResult) + cbBSSDesc; - sms_log(pMac, LOGD, FL("new BSS description, length %d, cbBSSDesc %d"), + sme_debug("new BSS description, length %d, cbBSSDesc %d", cbAllocated, cbBSSDesc); pCsrBssDescription = qdf_mem_malloc(cbAllocated); if (NULL != pCsrBssDescription) { @@ -4482,8 +4438,8 @@ static tCsrScanResult *csr_scan_save_bss_description_to_interim_list( pBSSDescription, cbBSSDesc); pCsrBssDescription->AgingCount = (int32_t) pMac->roam.configParam.agingCount; - sms_log(pMac, LOGD, - FL(" Set Aging Count = %d for BSS " MAC_ADDRESS_STR " "), + sme_debug( + "Set Aging Count = %d for BSS " MAC_ADDRESS_STR " ", pCsrBssDescription->AgingCount, MAC_ADDR_ARRAY(pCsrBssDescription->Result.BssDescriptor. bssId)); @@ -4716,7 +4672,7 @@ static bool csr_scan_process_scan_results(tpAniSirGlobal pMac, tSmeCmd *pCommand bool fRet = false, fRemoveCommand = false; QDF_STATUS status; - sms_log(pMac, LOGD, FL("scan reason = %d, response status code = %d"), + sme_debug("scan reason = %d, response status code = %d", pCommand->u.scanCmd.reason, pScanRsp->statusCode); fRemoveCommand = csr_scan_complete(pMac, pScanRsp); fRet = true; @@ -4735,8 +4691,7 @@ static bool csr_scan_process_scan_results(tpAniSirGlobal pMac, tSmeCmd *pCommand if (pMac->scan.defer_update_channel_list) { status = csr_update_channel_list(pMac); if (!QDF_IS_STATUS_SUCCESS(status)) - sms_log(pMac, LOGE, - FL("failed to update the supported channel list")); + sme_err("failed to update the supported channel list"); pMac->scan.defer_update_channel_list = false; } @@ -4791,7 +4746,7 @@ QDF_STATUS csr_scan_process_single_bssdescr(tpAniSirGlobal mac_ctx, tCsrRoamInfo *roam_info; uint8_t session_id; - sms_log(mac_ctx, LOGD, "CSR: Processing single bssdescr"); + sme_debug("CSR: Processing single bssdescr"); if (QDF_IS_STATUS_SUCCESS( csr_get_cfg_valid_channels(mac_ctx, (uint8_t *) mac_ctx->roam.validChannelList, @@ -4799,9 +4754,7 @@ QDF_STATUS csr_scan_process_single_bssdescr(tpAniSirGlobal mac_ctx, chanlist = mac_ctx->roam.validChannelList; cnt_channels = (uint8_t) len; } else { - /* Cannot continue */ - sms_log(mac_ctx, LOGW, - FL("Received results on invalid channel")); + sme_warn("Received results on invalid channel"); return QDF_STATUS_E_INVAL; } @@ -4825,7 +4778,7 @@ QDF_STATUS csr_scan_process_single_bssdescr(tpAniSirGlobal mac_ctx, eCSR_ROAM_RESULT_NONE); qdf_mem_free(roam_info); } else { - sms_log(mac_ctx, LOGE, "qdf_mem_malloc failed"); + sme_err("qdf_mem_malloc failed"); } csr_scan_remove_dup_bss_description_from_interim_list (mac_ctx, bssdescr, ies); @@ -4868,7 +4821,7 @@ QDF_STATUS csr_scan_sme_scan_response(tpAniSirGlobal pMac, if (!pEntry) goto error_handling; - sms_log(pMac, LOGD, FL("Scan completion called:scan_id %d, entry = %p"), + sme_debug("Scan completion called:scan_id %d, entry = %p", pScanRsp->scan_id, pEntry); pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link); @@ -4907,7 +4860,7 @@ QDF_STATUS csr_scan_sme_scan_response(tpAniSirGlobal pMac, error_handling: #ifdef FEATURE_WLAN_SCAN_PNO if (pMac->pnoOffload && pScanRsp->statusCode == eSIR_PNO_SCAN_SUCCESS) { - sms_log(pMac, LOGD, FL("PNO Scan completion called")); + sme_debug("PNO Scan completion called"); csr_save_scan_results(pMac, eCsrScanCandidateFound, pScanRsp->sessionId); return QDF_STATUS_SUCCESS; @@ -4916,12 +4869,11 @@ error_handling: * Scan completion was called, PNO is active, but scan * response was not PNO */ - sms_log(pMac, LOGE, - FL("Scan completion called, scan rsp was not PNO.")); + sme_err("Scan completion called, scan rsp was not PNO"); return QDF_STATUS_E_FAILURE; } #endif - sms_log(pMac, LOGE, FL("Scan completion called, but no active SCAN command.")); + sme_err("Scan completion called, but no active SCAN command"); return QDF_STATUS_E_FAILURE; } @@ -5041,9 +4993,9 @@ static bool csr_scan_age_out_bss(tpAniSirGlobal pMac, tCsrScanResult *pResult) */ pResult->AgingCount = (int32_t) pMac->roam.configParam.agingCount; - sms_log(pMac, LOGD, - FL("Connected BSS, Set Aging Count=%d for BSS " - MAC_ADDRESS_STR), pResult->AgingCount, + sme_debug( + "Connected BSS, Set Aging Count=%d for BSS " + MAC_ADDRESS_STR, pResult->AgingCount, MAC_ADDR_ARRAY(pResult->Result.BssDescriptor.bssId)); pResult->Result.BssDescriptor.received_time = (uint64_t)qdf_mc_timer_get_system_time(); @@ -5058,8 +5010,8 @@ static bool csr_scan_age_out_bss(tpAniSirGlobal pMac, tCsrScanResult *pResult) if (qdf_is_macaddr_equal( (struct qdf_mac_addr *) &pResult->Result.BssDescriptor.bssId, (struct qdf_mac_addr *) &pMac->scan.currentCountryBssid)) { - sms_log(pMac, LOGW, - FL("Aging out 11d BSS " MAC_ADDRESS_STR), + sme_warn( + "Aging out 11d BSS " MAC_ADDRESS_STR, MAC_ADDR_ARRAY( pResult->Result.BssDescriptor.bssId)); pMac->scan.currentCountryRSSI = -128; @@ -5092,15 +5044,13 @@ QDF_STATUS csr_scan_age_results(tpAniSirGlobal pMac, if (pResult->Result.BssDescriptor.channelId == pChnInfo->channelId) { if (pResult->AgingCount <= 0) { - sms_log(pMac, LOGW, - " age out due to ref count"); + sme_warn("age out due to ref count"); csr_scan_age_out_bss(pMac, pResult); } else { pResult->AgingCount--; - sms_log(pMac, LOGW, - FL - ("Decremented AgingCount=%d for BSS " - MAC_ADDRESS_STR ""), + sme_warn( + "Decremented AgingCount=%d for BSS " + MAC_ADDRESS_STR "", pResult->AgingCount, MAC_ADDR_ARRAY(pResult->Result. BssDescriptor. @@ -5137,15 +5087,15 @@ static QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId, pMsg = qdf_mem_malloc(msgLen); if (NULL == pMsg) { - sms_log(pMac, LOGE, FL("memory allocation failed")); - sms_log(pMac, LOGD, FL("Failed: SId: %d FirstMatch = %d" - " UniqueResult = %d freshScan = %d hiddenSsid = %d"), + sme_err("memory allocation failed"); + sme_debug("Failed: SId: %d FirstMatch = %d" + " UniqueResult = %d freshScan = %d hiddenSsid = %d", sessionId, pScanReqParam->bReturnAfter1stMatch, pScanReqParam->fUniqueResult, pScanReqParam->freshScan, pScanReqParam->hiddenSsid); - sms_log(pMac, LOGD, - FL("scanType = %s (%u) BSSType = %s (%u) numOfSSIDs = %d" - " numOfChannels = %d requestType = %s (%d) p2pSearch = %d\n"), + sme_debug( + "scanType = %s (%u) BSSType = %s (%u) numOfSSIDs = %d" + " numOfChannels = %d requestType = %s (%d) p2pSearch = %d", sme_scan_type_to_string(pScanReq->scanType), pScanReq->scanType, sme_bss_type_to_string(pScanReq->BSSType), @@ -5168,7 +5118,7 @@ static QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId, pMsg->sessionId = 0; } if (pMsg->sessionId >= CSR_ROAM_SESSION_MAX) - sms_log(pMac, LOGE, FL(" Invalid Sme Session ID = %d"), + sme_err("Invalid Sme Session ID: %d", pMsg->sessionId); pMsg->transactionId = 0; pMsg->dot11mode = (uint8_t) csr_translate_to_wni_cfg_dot11_mode(pMac, @@ -5197,10 +5147,7 @@ static QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId, selfmac.bytes, &len); if (!QDF_IS_STATUS_SUCCESS(status) || (len < QDF_MAC_ADDR_SIZE)) { - sms_log(pMac, LOGE, - FL("Can't get self MAC address = %d"), - status); - /* Force failed status */ + sme_err("Can't get self MAC address: %d", status); status = QDF_STATUS_E_FAILURE; goto send_scan_req; } @@ -5325,8 +5272,8 @@ static QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId, } send_scan_req: - sms_log(pMac, LOGD, - FL("scanId %d domainIdCurrent %d scanType %s (%d) bssType %s (%d) requestType %s (%d) numChannels %d"), + sme_debug( + "scanId %d domainIdCurrent %d scanType %s (%d) bssType %s (%d) requestType %s (%d) numChannels %d", pMsg->scan_id, pMac->scan.domainIdCurrent, sme_scan_type_to_string(pMsg->scanType), pMsg->scanType, sme_bss_type_to_string(pMsg->bssType), pMsg->bssType, @@ -5334,15 +5281,15 @@ send_scan_req: pScanReq->requestType, pMsg->channelList.numChannels); for (i = 0; i < pMsg->channelList.numChannels; i++) { - sms_log(pMac, LOGD, FL("channelNumber[%d]= %d"), i, + sme_debug("channelNumber[%d]= %d", i, pMsg->channelList.channelNumber[i]); } if (QDF_IS_STATUS_SUCCESS(status)) { status = cds_send_mb_message_to_mac(pMsg); } else { - sms_log(pMac, LOGE, - FL("failed to send down scan req with status = %d"), + sme_err( + "failed to send down scan req with status: %d", status); qdf_mem_free(pMsg); } @@ -5485,10 +5432,9 @@ QDF_STATUS csr_process_scan_command(tpAniSirGlobal pMac, tSmeCmd *pCommand) { QDF_STATUS status = QDF_STATUS_SUCCESS; - sms_log(pMac, LOGD, - FL("starting SCAN cmd in %d state. reason %d"), - pCommand->u.scanCmd.lastRoamState[pCommand->sessionId], - pCommand->u.scanCmd.reason); + sme_debug("starting SCAN cmd in %d state. reason %d", + pCommand->u.scanCmd.lastRoamState[pCommand->sessionId], + pCommand->u.scanCmd.reason); switch (pCommand->u.scanCmd.reason) { case eCsrScanUserRequest: @@ -5562,8 +5508,8 @@ static void csr_scan_copy_request_valid_channels_only(tpAniSirGlobal mac_ctx, ChannelList [index]))) ) { - sms_log(mac_ctx, LOGD, - FL(" reqType= %s (%d), numOfChannels=%d, ignoring DFS channel %d"), + sme_debug( + "reqType= %s (%d), numOfChannels=%d, ignoring DFS channel %d", sme_request_type_to_string( src_req->requestType), src_req->requestType, @@ -5634,14 +5580,12 @@ static bool csr_scan_filter_given_chnl_band(tpAniSirGlobal mac_ctx, uint32_t valid_chnl_len = WNI_CFG_VALID_CHANNEL_LIST_LEN; if (!channel) { - sms_log(mac_ctx, LOGD, - FL("Nothing to filter as no IBSS session")); + sme_debug("Nothing to filter as no IBSS session"); return true; } if (!dst_req) { - sms_log(mac_ctx, LOGE, - FL("No valid scan requests")); + sme_err("No valid scan requests"); return false; } /* @@ -5681,8 +5625,7 @@ static bool csr_scan_filter_given_chnl_band(tpAniSirGlobal mac_ctx, } } if (filter_chnl_len == 0) { - sms_log(mac_ctx, LOGE, - FL("there no channels to scan due to IBSS session")); + sme_err("there no channels to scan due to IBSS session"); return false; } @@ -5697,8 +5640,7 @@ static bool csr_scan_filter_given_chnl_band(tpAniSirGlobal mac_ctx, sizeof(*dst_req->ChannelInfo.ChannelList)); dst_req->ChannelInfo.numOfChannels = filter_chnl_len; if (NULL == dst_req->ChannelInfo.ChannelList) { - sms_log(mac_ctx, LOGE, - FL("Memory allocation failed")); + sme_err("Memory allocation failed"); return false; } qdf_mem_copy(dst_req->ChannelInfo.ChannelList, valid_chnl_list, @@ -5746,8 +5688,7 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, qdf_mem_malloc(src_req->uIEFieldLen); if (NULL == dst_req->pIEField) { status = QDF_STATUS_E_NOMEM; - sms_log(mac_ctx, LOGE, - FL("No memory for scanning IE fields")); + sme_err("No memory for scanning IE fields"); goto complete; } else { status = QDF_STATUS_SUCCESS; @@ -5768,8 +5709,7 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, if (NULL == dst_req->ChannelInfo.ChannelList) { status = QDF_STATUS_E_NOMEM; dst_req->ChannelInfo.numOfChannels = 0; - sms_log(mac_ctx, LOGE, - FL("No memory for scanning Channel List")); + sme_err("No memory for scanning Channel List"); goto complete; } @@ -5807,8 +5747,8 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, dst_req, skip_dfs_chnl, src_req); } else { - sms_log(mac_ctx, LOGE, - FL("Couldn't get the valid Channel List, keeping requester's list")); + sme_err( + "Couldn't get the valid Channel List, keeping requester's list"); new_index = 0; for (index = 0; index < src_req->ChannelInfo. numOfChannels; index++) { @@ -5838,8 +5778,7 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, * SAP+STA concurrency */ if (cds_is_ibss_conn_exist(&channel)) { - sms_log(mac_ctx, LOGD, - FL("Conc IBSS exist, channel list will be modified")); + sme_debug("Conc IBSS exist, channel list will be modified"); } else if (cds_is_any_dfs_beaconing_session_present(&channel)) { /* * 1) if agile & DFS scans are supported @@ -5853,14 +5792,13 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, wma_get_single_mac_scan_with_dfs_config()) channel = 0; else - sms_log(mac_ctx, LOGD, - FL("Conc DFS SAP/GO exist, channel list will be modified")); + sme_debug( + "Conc DFS SAP/GO exist, channel list will be modified"); } if ((channel > 0) && (!csr_scan_filter_given_chnl_band(mac_ctx, channel, dst_req))) { - sms_log(mac_ctx, LOGE, - FL("Can't filter channels due to IBSS/SAP DFS")); + sme_err("Can't filter channels due to IBSS/SAP DFS"); goto complete; } @@ -5884,8 +5822,7 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, sizeof(*dst_req->SSIDs.SSIDList)); } else { dst_req->SSIDs.numOfSSIDs = 0; - sms_log(mac_ctx, LOGE, - FL("No memory for scanning SSID List")); + sme_err("No memory for scanning SSID List"); goto complete; } } /* Allocate memory for SSID List */ @@ -5916,7 +5853,7 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, sizeof(*dst_req->voui)); } else { dst_req->num_vendor_oui = 0; - sms_log(mac_ctx, LOGE, FL("No memory for voui")); + sme_err("No memory for voui"); } } @@ -5969,8 +5906,7 @@ void csr_scan_call_callback(tpAniSirGlobal pMac, tSmeCmd *pCommand, if (pCommand->u.scanCmd.abort_scan_indication) { if ((pCommand->u.scanCmd.reason != eCsrScanForSsid) || (scanStatus != eCSR_SCAN_SUCCESS)) { - sms_log(pMac, LOGD, - FL("scanDone due to abort")); + sme_debug("scanDone due to abort"); scanStatus = eCSR_SCAN_ABORT; } } @@ -5979,8 +5915,7 @@ void csr_scan_call_callback(tpAniSirGlobal pMac, tSmeCmd *pCommand, pCommand->u.scanCmd.scanID, scanStatus); } else { - sms_log(pMac, LOGD, "%s:%d - Callback NULL!!!", __func__, - __LINE__); + sme_debug("Callback NULL!!!"); } } @@ -6061,8 +5996,7 @@ static void csr_sta_ap_conc_timer_handler(void *pv) /* optimize this to use 2 command buffer only */ send_scancmd = csr_get_command_buffer(mac_ctx); if (!send_scancmd) { - sms_log(mac_ctx, LOGE, - FL(" Failed to get Queue command buffer")); + sme_err("Failed to get Queue command buffer"); csr_ll_unlock(&mac_ctx->scan.scanCmdPendingList); return; } @@ -6124,8 +6058,7 @@ static void csr_sta_ap_conc_timer_handler(void *pv) &send_scancmd->u.scanCmd.u. scanRequest, &scan_req); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL(" Failed to get copy csr_scan_request = %d"), + sme_err("csr_scan_copy_request failed status: %d", status); csr_ll_unlock(&mac_ctx->scan.scanCmdPendingList); return; @@ -6147,8 +6080,8 @@ static void csr_sta_ap_conc_timer_handler(void *pv) * got removed by another thread. */ LL_ACCESS_NOLOCK) == NULL) { - sms_log(mac_ctx, LOGE, - FL(" Failed to remove entry from scanCmdPendingList")); + sme_err( + "Failed to remove entry from scanCmdPendingList"); } } @@ -6180,7 +6113,7 @@ static void csr_purge_scan_result_by_age(void *pv) csr_ll_lock(&mac_ctx->scan.scanResultList); entry = csr_ll_peek_head(&mac_ctx->scan.scanResultList, LL_ACCESS_NOLOCK); - sms_log(mac_ctx, LOGD, FL(" Ageout time=%llu"), ageout_time); + sme_debug("Ageout time=%llu", ageout_time); while (entry) { tmp_entry = csr_ll_next(&mac_ctx->scan.scanResultList, entry, LL_ACCESS_NOLOCK); @@ -6189,8 +6122,8 @@ static void csr_purge_scan_result_by_age(void *pv) if ((cur_time - result->Result.BssDescriptor.received_time) > ageout_time) { bssId = result->Result.BssDescriptor.bssId; - sms_log(mac_ctx, LOGW, - FL("age out for BSSID" MAC_ADDRESS_STR" Channel %d"), + sme_warn( + "age out for BSSID" MAC_ADDRESS_STR" Channel %d", MAC_ADDR_ARRAY(bssId), result->Result.BssDescriptor.channelId); csr_scan_age_out_bss(mac_ctx, result); @@ -6210,7 +6143,7 @@ bool csr_scan_remove_fresh_scan_command(tpAniSirGlobal pMac, uint8_t sessionId) qdf_mem_zero(&localList, sizeof(tDblLinkList)); if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) { - sms_log(pMac, LOGE, FL(" failed to open list")); + sme_err("failed to open list"); return fRet; } @@ -6226,8 +6159,7 @@ bool csr_scan_remove_fresh_scan_command(tpAniSirGlobal pMac, uint8_t sessionId) pEntry = pEntryTmp; continue; } - sms_log(pMac, LOGD, - FL("-------- abort scan command reason = %d"), + sme_debug("-------- abort scan command reason = %d", pCommand->u.scanCmd.reason); /* The rest are fresh scan requests */ if (csr_ll_remove_entry(pCmdList, pEntry, @@ -6267,13 +6199,12 @@ void csr_release_scan_command(tpAniSirGlobal pMac, tSmeCmd *pCommand, tDblLinkList *cmd_list = NULL; csr_scan_call_callback(pMac, pCommand, scanStatus); - sms_log(pMac, LOGD, FL("Remove Scan command reason = %d, scan_id %d"), + sme_debug("Remove Scan command reason = %d, scan_id %d", reason, pCommand->u.scanCmd.scanID); cmd_list = &pMac->sme.smeScanCmdActiveList; status = csr_ll_remove_entry(cmd_list, &pCommand->Link, LL_ACCESS_LOCK); if (!status) { - sms_log(pMac, LOGE, - FL("cannot release command reason %d scan_id %d"), + sme_err("cannot release command reason %d scan_id %d", pCommand->u.scanCmd.reason, pCommand->u.scanCmd.scanID); return; @@ -6291,14 +6222,13 @@ tSmeCmd *csr_find_self_reassoc_cmd(tpAniSirGlobal mac_ctx, uint32_t session_id) cmd_list = &mac_ctx->sme.smeCmdActiveList; entry = csr_ll_peek_head(cmd_list, LL_ACCESS_LOCK); if (!entry) { - sms_log(mac_ctx, LOGE, FL("Queue empty")); + sme_err("Queue empty"); return NULL; } temp_cmd = GET_BASE_ADDR(entry, tSmeCmd, Link); if ((temp_cmd->command != e_sme_command_issue_self_reassoc) || (temp_cmd->sessionId != session_id)) { - sms_log(mac_ctx, LOG1, - FL("no self-reassoc cmd active")); + sme_debug("no self-reassoc cmd active"); return NULL; } @@ -6311,15 +6241,14 @@ void csr_remove_same_ap_reassoc_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd) tDblLinkList *cmd_list = NULL; cmd_list = &mac_ctx->sme.smeCmdActiveList; - sms_log(mac_ctx, LOG1, - FL("Remove self reassoc cmd = %d, session_id = %d"), + sme_debug("Remove self reassoc cmd = %d, session_id = %d", sme_cmd->command, sme_cmd->sessionId); status = csr_ll_remove_entry(cmd_list, &sme_cmd->Link, LL_ACCESS_LOCK); if (!status) { - sms_log(mac_ctx, LOGE, - FL("can't del self-reassoc cmd %d session %d"), - sme_cmd->command, sme_cmd->sessionId); + sme_err( + "can't del self-reassoc cmd %d session %d", + sme_cmd->command, sme_cmd->sessionId); QDF_ASSERT(0); } sme_process_pending_queue(mac_ctx); @@ -6351,11 +6280,11 @@ QDF_STATUS csr_scan_get_pmkid_candidate_list(tpAniSirGlobal pMac, uint32_t nItems = *pNumItems; 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("pMac->scan.NumPmkidCandidate = %d"), + sme_debug("pMac->scan.NumPmkidCandidate = %d", pSession->NumPmkidCandidate); csr_reset_pmkid_candidate_list(pMac, sessionId); if (!(csr_is_conn_state_connected(pMac, sessionId) @@ -6421,11 +6350,11 @@ QDF_STATUS csr_scan_get_bkid_candidate_list(tpAniSirGlobal pMac, uint32_t nItems = *pNumItems; 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("pMac->scan.NumBkidCandidate = %d"), + sme_debug("pMac->scan.NumBkidCandidate = %d", pSession->NumBkidCandidate); csr_reset_bkid_candidate_list(pMac, sessionId); if (!(csr_is_conn_state_connected(pMac, sessionId) @@ -6499,8 +6428,7 @@ static void csr_roam_copy_channellist(tpAniSirGlobal mac_ctx, index++) { if (!csr_roam_is_valid_channel(mac_ctx, profile->ChannelInfo.ChannelList[index])) { - sms_log(mac_ctx, LOGW, - FL("process a channel (%d) that is invalid"), + sme_warn("process a channel: %d that is invalid", profile->ChannelInfo.ChannelList[index]); continue; } @@ -6572,11 +6500,9 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id, tCsrSSIDs *ssids = NULL; struct csr_scan_for_ssid_context *context; - sms_log(mac_ctx, LOGD, FL("called")); - if (!(mac_ctx->scan.fScanEnable) && (num_ssid != 1)) { - sms_log(mac_ctx, LOGE, - FL("cannot scan because scanEnable (%d) or numSSID (%d) is invalid"), + sme_err( + "cannot scan because scanEnable (%d) or numSSID (%d) is invalid", mac_ctx->scan.fScanEnable, profile->SSIDs.numOfSSIDs); return status; } @@ -6584,8 +6510,7 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id, scan_cmd = csr_get_command_buffer(mac_ctx); if (!scan_cmd) { - sms_log(mac_ctx, LOGE, - FL("failed to allocate command buffer")); + sme_err("failed to allocate command buffer"); goto error; } @@ -6602,8 +6527,7 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id, context = qdf_mem_malloc(sizeof(*context)); if (NULL == context) { - sms_log(mac_ctx, LOGE, - "Failed to allocate memory for ssid scan context"); + sme_err("Failed to allocate memory for ssid scan context"); goto error; } context->mac_ctx = mac_ctx; @@ -6654,8 +6578,7 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id, profile->nAddIEScanLength); scan_req->uIEFieldLen = profile->nAddIEScanLength; } else { - sms_log(mac_ctx, LOGE, - "No memory for scanning IE fields"); + sme_err("No memory for scanning IE fields"); } } else scan_req->uIEFieldLen = 0; @@ -6741,8 +6664,7 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id, status = csr_queue_sme_command(mac_ctx, scan_cmd, false); error: if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL(" failed to iniate scan with status = %d"), status); + sme_err("failed to initiate scan with status: %d", status); if (scan_cmd) csr_release_command_scan(mac_ctx, scan_cmd); if (notify) @@ -6823,8 +6745,8 @@ void csr_save_tx_power_to_cfg(tpAniSirGlobal pMac, tDblLinkList *pList, * expanding this entry will overflow our * allocation */ - sms_log(pMac, LOGE, - FL("Buffer overflow, start %d, num %d, offset %d"), + sme_err( + "Buffer overflow, start %d, num %d, offset %d", ch_set->firstChannel, ch_set->numChannels, ch_set->interChannelOffset); @@ -6835,15 +6757,15 @@ void csr_save_tx_power_to_cfg(tpAniSirGlobal pMac, tDblLinkList *pList, ch_pwr_set->firstChanNum = (tSirMacChanNum) (ch_set->firstChannel + (idx * ch_set->interChannelOffset)); - sms_log(pMac, LOGD, - FL("Setting Channel Number %d"), + sme_debug( + "Setting Channel Number %d", ch_pwr_set->firstChanNum); ch_pwr_set->numChannels = 1; ch_pwr_set->maxTxPower = QDF_MIN(ch_set->txPower, pMac->roam.configParam.nTxPowerCap); - sms_log(pMac, LOGD, - FL("Setting Max Transmit Power %d"), + sme_debug( + "Setting Max Transmit Power %d", ch_pwr_set->maxTxPower); cbLen += sizeof(tSirMacChanInfo); ch_pwr_set++; @@ -6851,21 +6773,21 @@ void csr_save_tx_power_to_cfg(tpAniSirGlobal pMac, tDblLinkList *pList, } else { if (cbLen >= dataLen) { /* this entry will overflow our allocation */ - sms_log(pMac, LOGE, - FL("Buffer overflow, start %d, num %d, offset %d"), + sme_err( + "Buffer overflow, start %d, num %d, offset %d", ch_set->firstChannel, ch_set->numChannels, ch_set->interChannelOffset); break; } ch_pwr_set->firstChanNum = ch_set->firstChannel; - sms_log(pMac, LOGD, FL("Setting Channel Number %d"), + sme_debug("Setting Channel Number %d", ch_pwr_set->firstChanNum); ch_pwr_set->numChannels = ch_set->numChannels; ch_pwr_set->maxTxPower = QDF_MIN(ch_set->txPower, pMac->roam.configParam.nTxPowerCap); - sms_log(pMac, LOGD, - FL("Setting Max Tx Power %d, nTxPower %d"), + sme_debug( + "Setting Max Tx Power %d, nTxPower %d", ch_pwr_set->maxTxPower, pMac->roam.configParam.nTxPowerCap); cbLen += sizeof(tSirMacChanInfo); @@ -6884,7 +6806,7 @@ void csr_set_cfg_country_code(tpAniSirGlobal pMac, uint8_t *countryCode) uint8_t cc[WNI_CFG_COUNTRY_CODE_LEN]; /* v_REGDOMAIN_t DomainId */ - sms_log(pMac, LOGD, FL("Setting Country Code in Cfg %s"), countryCode); + sme_debug("Setting Country Code in Cfg %s", countryCode); qdf_mem_copy(cc, countryCode, WNI_CFG_COUNTRY_CODE_LEN); /* @@ -7051,7 +6973,7 @@ QDF_STATUS csr_remove_cmd_from_pending_list(tpAniSirGlobal pMac, qdf_mem_zero(&localList, sizeof(tDblLinkList)); if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) { - sms_log(pMac, LOGE, FL("failed to open list")); + sme_err("failed to open list"); return status; } @@ -7084,7 +7006,7 @@ QDF_STATUS csr_remove_cmd_from_pending_list(tpAniSirGlobal pMac, while ((pEntry = csr_ll_remove_head(&localList, LL_ACCESS_NOLOCK))) { pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link); - sms_log(pMac, LOGD, FL("Sending abort for command ID %d"), + sme_debug("Sending abort for command ID %d", (commandType == eSmeCommandScan) ? pCommand->u. scanCmd.scanID : sessionId); csr_abort_command(pMac, pCommand, false); @@ -7119,7 +7041,7 @@ void csr_remove_scan_for_ssid_from_pending_list(tpAniSirGlobal pMac, qdf_mem_zero(&localList, sizeof(tDblLinkList)); if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) { - sms_log(pMac, LOGE, FL(" failed to open list")); + sme_err("failed to open list"); return; } csr_ll_lock(pList); @@ -7176,21 +7098,19 @@ static void csr_send_scan_abort(tpAniSirGlobal mac_ctx, msg_len = (uint16_t)(sizeof(tSirSmeScanAbortReq)); msg = qdf_mem_malloc(msg_len); if (NULL == msg) { - sms_log(mac_ctx, LOGE, - FL("Failed to alloc memory for SmeScanAbortReq")); + sme_err("Failed to alloc memory for SmeScanAbortReq"); return; } msg->type = eWNI_SME_SCAN_ABORT_IND; msg->msgLen = msg_len; msg->sessionId = session_id; msg->scan_id = scan_id; - sms_log(mac_ctx, LOGD, - FL("Abort scan sent to Firmware scan_id %d session %d"), + sme_debug( + "Abort scan sent to Firmware scan_id %d session %d", scan_id, session_id); status = cds_send_mb_message_to_mac(msg); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL("Failed to send abort scan.scan_id %d session %d"), + sme_err("Failed to send abort scan.scan_id %d session %d", scan_id, session_id); } return; @@ -7305,12 +7225,11 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, (tpSirProbeRespBeacon) qdf_mem_malloc(sizeof(tSirProbeRespBeacon)); if (NULL == parsed_frm) { - sms_log(pMac, LOGE, FL("fail to allocate memory for frame")); + sme_err("fail to allocate memory for frame"); return QDF_STATUS_E_NOMEM; } if (pPrefNetworkFoundInd->frameLength <= SIR_MAC_HDR_LEN_3A) { - sms_log(pMac, LOGE, - FL("Incorrect len(%d)"), + sme_err("Incorrect len: %d", pPrefNetworkFoundInd->frameLength); qdf_mem_free(parsed_frm); return QDF_STATUS_E_FAILURE; @@ -7320,7 +7239,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, pPrefNetworkFoundInd->frameLength - SIR_MAC_HDR_LEN_3A, parsed_frm) != eSIR_SUCCESS || !parsed_frm->ssidPresent) { - sms_log(pMac, LOGE, FL("Parse error ProbeResponse, length=%d"), + sme_err("Parse error ProbeResponse, length: %d", pPrefNetworkFoundInd->frameLength); qdf_mem_free(parsed_frm); return QDF_STATUS_E_FAILURE; @@ -7333,7 +7252,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, } pScanResult = qdf_mem_malloc(sizeof(tCsrScanResult) + uLen); if (NULL == pScanResult) { - sms_log(pMac, LOGE, FL("fail to allocate memory for frame")); + sme_err("fail to allocate memory for frame"); qdf_mem_free(parsed_frm); return QDF_STATUS_E_NOMEM; } @@ -7384,8 +7303,8 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, pBssDescr->rssi = -1 * pPrefNetworkFoundInd->rssi; pBssDescr->beaconInterval = parsed_frm->beaconInterval; if (!pBssDescr->beaconInterval) { - sms_log(pMac, LOGW, FL("Bcn Interval is Zero , default to 100" - MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pBssDescr->bssId)); + sme_warn("Bcn Interval is Zero , default to 100" + MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pBssDescr->bssId)); pBssDescr->beaconInterval = 100; } pBssDescr->timeStamp[0] = parsed_frm->timeStamp[0]; @@ -7409,12 +7328,12 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, pBssDescr->mdie[1] = parsed_frm->mdie[1]; pBssDescr->mdie[2] = parsed_frm->mdie[2]; } - sms_log(pMac, LOG1, FL("mdie=%02x%02x%02x"), + sme_debug("mdie=%02x%02x%02x", (unsigned int)pBssDescr->mdie[0], (unsigned int)pBssDescr->mdie[1], (unsigned int)pBssDescr->mdie[2]); - sms_log(pMac, LOGD, FL("Bssid= "MAC_ADDRESS_STR" chan= %d, rssi = %d"), + sme_debug("Bssid= "MAC_ADDRESS_STR" chan= %d, rssi = %d", MAC_ADDR_ARRAY(pBssDescr->bssId), pBssDescr->channelId, pBssDescr->rssi); /* IEs */ @@ -7429,7 +7348,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, &pScanResult->Result.BssDescriptor, &local_ie); if (!(local_ie || QDF_IS_STATUS_SUCCESS(status))) { - sms_log(pMac, LOGE, FL("Cannot parse IEs")); + sme_err("Cannot parse IEs"); csr_free_scan_result_entry(pMac, pScanResult); qdf_mem_free(parsed_frm); return QDF_STATUS_E_RESOURCES; @@ -7442,7 +7361,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, /* Check whether we have reach out limit */ if (CSR_SCAN_IS_OVER_BSS_LIMIT(pMac)) { /* Limit reach */ - sms_log(pMac, LOGE, FL("BSS limit reached")); + sme_err("BSS limit reached"); /* Free the resources */ if ((pScanResult->Result.pvIes == NULL) && local_ie) qdf_mem_free(local_ie); @@ -7479,7 +7398,7 @@ void csr_init_occupied_channels_list(tpAniSirGlobal pMac, uint8_t sessionId) * Ini file contains neighbor scan channel list, hence NO need * to build occupied channel list" */ - sms_log(pMac, LOGD, FL("Ini contains neighbor scan ch list")); + sme_debug("Ini contains neighbor scan ch list"); return; } @@ -7488,7 +7407,7 @@ void csr_init_occupied_channels_list(tpAniSirGlobal pMac, uint8_t sessionId) * Do not flush occupied list since current roam profile matches * previous */ - sms_log(pMac, LOGD, FL("Current roam profile matches prev")); + sme_debug("Current roam profile matches prev"); return; } @@ -7536,28 +7455,28 @@ QDF_STATUS csr_scan_create_entry_in_scan_cache(tpAniSirGlobal pMac, status = QDF_STATUS_E_FAILURE; return status; } - sms_log(pMac, LOGD, FL("Current bssid::"MAC_ADDRESS_STR), + sme_debug("Current bssid::"MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pSession->pConnectBssDesc->bssId)); - sms_log(pMac, LOGD, FL("My bssid::"MAC_ADDRESS_STR" channel %d"), + sme_debug("My bssid::"MAC_ADDRESS_STR" channel %d", MAC_ADDR_ARRAY(bssid.bytes), channel); if (!QDF_IS_STATUS_SUCCESS(csr_get_parsed_bss_description_ies( pMac, pSession->pConnectBssDesc, &pNewIes))) { - sms_log(pMac, LOGE, FL("Failed to parse IEs")); + sme_err("Failed to parse IEs"); status = QDF_STATUS_E_FAILURE; goto free_mem; } size = pSession->pConnectBssDesc->length + sizeof(pSession->pConnectBssDesc->length); if (!size) { - sms_log(pMac, LOGE, FL("length of bss descriptor is 0")); + sme_err("length of bss descriptor is 0"); status = QDF_STATUS_E_FAILURE; goto free_mem; } pNewBssDescriptor = qdf_mem_malloc(size); if (NULL == pNewBssDescriptor) { - sms_log(pMac, LOGE, FL("memory allocation failed")); + sme_err("memory allocation failed"); status = QDF_STATUS_E_FAILURE; goto free_mem; } @@ -7568,12 +7487,11 @@ QDF_STATUS csr_scan_create_entry_in_scan_cache(tpAniSirGlobal pMac, pNewBssDescriptor->channelId = channel; if (NULL == csr_scan_append_bss_description(pMac, pNewBssDescriptor, pNewIes, true, sessionId)) { - sms_log(pMac, LOGE, - FL("csr_scan_append_bss_description failed")); + sme_err("csr_scan_append_bss_description failed"); status = QDF_STATUS_E_FAILURE; goto free_mem; } - sms_log(pMac, LOGE, FL("entry successfully added in scan cache")); + sme_err("entry successfully added in scan cache"); free_mem: if (pNewIes) { @@ -7660,7 +7578,7 @@ QDF_STATUS csr_scan_save_roam_offload_ap_to_scan_cache(tpAniSirGlobal pMac, return QDF_STATUS_E_RESOURCES; } - sms_log(pMac, LOGD, FL("LFR3:Add BSSID to scan cache" MAC_ADDRESS_STR), + sme_debug("LFR3:Add BSSID to scan cache" MAC_ADDRESS_STR, MAC_ADDR_ARRAY(scan_res_ptr->Result.BssDescriptor.bssId)); csr_scan_add_result(pMac, scan_res_ptr, ies_local_ptr, session_id); if ((scan_res_ptr->Result.pvIes == NULL) && ies_local_ptr) @@ -7775,14 +7693,12 @@ void csr_scan_active_list_timeout_handle(void *userData) } mac_ctx = PMAC_STRUCT(hal_ctx); scan_id = scan_cmd->u.scanCmd.scanID; - sms_log(mac_ctx, LOGE, - FL("Scan Timeout:Sending abort to Firmware ID %d session %d "), + sme_err("Scan Timeout:Sending abort to Firmware ID %d session %d", scan_id, scan_cmd->sessionId); msg_len = (uint16_t)(sizeof(tSirSmeScanAbortReq)); msg = qdf_mem_malloc(msg_len); if (NULL == msg) { - sms_log(mac_ctx, LOGE, - FL("Failed to alloc memory for SmeScanAbortReq")); + sme_err("Failed to alloc memory for SmeScanAbortReq"); return; } msg->type = eWNI_SME_SCAN_ABORT_IND; @@ -7791,8 +7707,7 @@ void csr_scan_active_list_timeout_handle(void *userData) msg->scan_id = scan_id; status = cds_send_mb_message_to_mac(msg); if (!QDF_IS_STATUS_SUCCESS(status)) { - sms_log(mac_ctx, LOGE, - FL(" Failed to post message to LIM")); + sme_err("Failed to post message to LIM"); } csr_save_scan_results(mac_ctx, scan_cmd->u.scanCmd.reason, scan_cmd->sessionId); |
