summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Girigowda <sgirigow@codeaurora.org>2017-03-17 11:49:51 -0700
committerSandeep Puligilla <spuligil@codeaurora.org>2017-03-21 09:41:12 -0700
commit8b77dda78f5e09896ad8a8ae73176fd1da7150b9 (patch)
treeb0597fb350e402fd36668784fe010332112672db
parent5c8a68696e83aa0959c6c932762f01fc21f21a59 (diff)
qcacld-3.0: Replace sms_log() with sme_* log levels in csr_neighbor_roam.c
Replace sms_log() with sme_* appropriate log levels in csr_neighbor_roam.c. Change-Id: I99eb443b7b65e0a45d4111fe21d40ed27eaf5a7c CRs-Fixed: 2020798
-rw-r--r--core/sme/src/csr/csr_neighbor_roam.c138
1 files changed, 53 insertions, 85 deletions
diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c
index 7f938b5a7857..bc4dc0c18b92 100644
--- a/core/sme/src/csr/csr_neighbor_roam.c
+++ b/core/sme/src/csr/csr_neighbor_roam.c
@@ -48,7 +48,6 @@
#include "mac_trace.h"
#include "cds_concurrency.h"
-#define NEIGHBOR_ROAM_DEBUG sms_log
static const char *lfr_get_config_item_string(uint8_t reason)
{
switch (reason) {
@@ -121,7 +120,7 @@ void csr_neighbor_roam_send_lfr_metric_event(
roam_info = qdf_mem_malloc(sizeof(tCsrRoamInfo));
if (NULL == roam_info) {
- sms_log(mac_ctx, LOGE, FL("Memory allocation failed!"));
+ sme_err("Memory allocation failed!");
} else {
qdf_mem_copy((void *)roam_info->bssid,
(void *)bssid, sizeof(*roam_info));
@@ -163,16 +162,12 @@ QDF_STATUS csr_neighbor_roam_update_fast_roaming_enabled(tpAniSirGlobal mac_ctx,
}
break;
case eCSR_NEIGHBOR_ROAM_STATE_INIT:
- NEIGHBOR_ROAM_DEBUG(mac_ctx, LOGD,
- FL
- ("Currently in INIT state, Nothing to do"));
+ sme_debug("Currently in INIT state, Nothing to do");
break;
default:
- NEIGHBOR_ROAM_DEBUG(mac_ctx, LOGE,
- FL
- ("Unexpected state %s, returning failure"),
- mac_trace_get_neighbour_roam_state
- (neighbor_roam_info->neighborRoamState));
+ sme_err("Unexpected state %s, returning failure",
+ mac_trace_get_neighbour_roam_state
+ (neighbor_roam_info->neighborRoamState));
qdf_status = QDF_STATUS_E_FAILURE;
break;
}
@@ -188,7 +183,7 @@ QDF_STATUS csr_neighbor_roam_update_config(tpAniSirGlobal mac_ctx,
uint8_t old_value;
if (NULL == pNeighborRoamInfo) {
- sms_log(mac_ctx, LOGE, FL("Invalid Session ID %d"), session_id);
+ sme_err("Invalid Session ID %d", session_id);
return QDF_STATUS_E_FAILURE;
}
cfg_params = &pNeighborRoamInfo->cfgParams;
@@ -229,20 +224,20 @@ QDF_STATUS csr_neighbor_roam_update_config(tpAniSirGlobal mac_ctx,
pNeighborRoamInfo->currentRoamBeaconRssiWeight = value;
break;
default:
- sms_log(mac_ctx, LOGD, FL("Unknown update cfg reason"));
+ sme_debug("Unknown update cfg reason");
return QDF_STATUS_E_FAILURE;
}
} else {
- sms_log(mac_ctx, LOGE, FL("Unexpected state %s, return fail"),
+ sme_err("Unexpected state %s, return fail",
mac_trace_get_neighbour_roam_state(state));
return QDF_STATUS_E_FAILURE;
}
if (state == eCSR_NEIGHBOR_ROAM_STATE_CONNECTED) {
- sms_log(mac_ctx, LOGD, FL("CONNECTED, send update cfg cmd"));
+ sme_debug("CONNECTED, send update cfg cmd");
csr_roam_offload_scan(mac_ctx, session_id,
ROAM_SCAN_OFFLOAD_UPDATE_CFG, reason);
}
- sms_log(mac_ctx, LOGD, FL("LFR config for %s changed from %d to %d"),
+ sme_debug("LFR config for %s changed from %d to %d",
lfr_get_config_item_string(reason), old_value, value);
return QDF_STATUS_SUCCESS;
}
@@ -389,8 +384,7 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac,
qdf_mem_malloc(sizeof(tSirMacAddr) *
pScanFilter->BSSIDs.numOfBSSIDs);
if (NULL == pScanFilter->BSSIDs.bssid) {
- sms_log(pMac, LOGE,
- FL("Scan Filter BSSID mem alloc failed"));
+ sme_err("Scan Filter BSSID mem alloc failed");
return QDF_STATUS_E_NOMEM;
}
@@ -410,8 +404,7 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac,
qdf_mem_malloc(sizeof(tCsrSSIDInfo) *
pScanFilter->SSIDs.numOfSSIDs);
if (NULL == pScanFilter->SSIDs.SSIDList) {
- sms_log(pMac, LOGE,
- FL("Scan Filter SSID mem alloc failed"));
+ sme_err("Scan Filter SSID mem alloc failed");
return QDF_STATUS_E_NOMEM;
}
for (i = 0; i < roam_params->num_ssid_allowed_list; i++) {
@@ -430,8 +423,7 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac,
pScanFilter->SSIDs.SSIDList =
qdf_mem_malloc(sizeof(tCsrSSIDInfo));
if (NULL == pScanFilter->SSIDs.SSIDList) {
- sms_log(pMac, LOGE,
- FL("Scan Filter SSID mem alloc failed"));
+ sme_err("Scan Filter SSID mem alloc failed");
return QDF_STATUS_E_NOMEM;
}
pScanFilter->SSIDs.SSIDList->handoffPermitted = 1;
@@ -442,8 +434,7 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac,
(void *)pCurProfile->SSID.ssId,
pCurProfile->SSID.length);
- NEIGHBOR_ROAM_DEBUG(pMac, LOGD,
- FL("Filtering for SSID %.*s,length of SSID = %u"),
+ sme_debug("Filtering for SSID %.*s,length of SSID = %u",
pScanFilter->SSIDs.SSIDList->SSID.length,
pScanFilter->SSIDs.SSIDList->SSID.ssId,
pScanFilter->SSIDs.SSIDList->SSID.length);
@@ -472,8 +463,7 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac,
pScanFilter->ChannelInfo.ChannelList =
qdf_mem_malloc(num_ch * sizeof(uint8_t));
if (NULL == pScanFilter->ChannelInfo.ChannelList) {
- sms_log(pMac, LOGE,
- FL("Scan Filter Ch list mem alloc failed"));
+ sme_err("Scan Filter Ch list mem alloc failed");
qdf_mem_free(pScanFilter->SSIDs.SSIDList);
pScanFilter->SSIDs.SSIDList = NULL;
return QDF_STATUS_E_NOMEM;
@@ -759,7 +749,7 @@ bool csr_neighbor_roam_is_new_connected_profile(tpAniSirGlobal pMac,
}
}
- sms_log(pMac, LOGD, FL("roam profile match: %d"), !fNew);
+ sme_debug("roam profile match: %d", !fNew);
return fNew;
}
@@ -835,7 +825,7 @@ QDF_STATUS csr_neighbor_roam_indicate_disconnect(tpAniSirGlobal pMac,
tCsrRoamSession *roam_session = NULL;
if (NULL == pSession) {
- sms_log(pMac, LOGE, FL("pSession is NULL"));
+ sme_err("pSession is NULL");
return QDF_STATUS_E_FAILURE;
}
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
@@ -859,9 +849,8 @@ QDF_STATUS csr_neighbor_roam_indicate_disconnect(tpAniSirGlobal pMac,
roam_session = &pMac->roam.roamSession[sessionId];
if (NULL != pSession->pCurRoamProfile && (QDF_STA_MODE !=
roam_session->pCurRoamProfile->csrPersona)) {
- sms_log(pMac, LOGE,
- FL("Ignore disconn ind rcvd from nonSTA persona"
- "sessionId: %d, csrPersonna %d"),
+ sme_err("Ignore disconn ind rcvd from nonSTA persona"
+ "sessionId: %d, csrPersonna %d",
sessionId,
(int)roam_session->pCurRoamProfile->csrPersona);
return QDF_STATUS_SUCCESS;
@@ -934,11 +923,10 @@ QDF_STATUS csr_neighbor_roam_indicate_disconnect(tpAniSirGlobal pMac,
sessionId);
break;
default:
- NEIGHBOR_ROAM_DEBUG(pMac, LOGD, FL("Received disconnect event"
- "in state %s "),
- mac_trace_get_neighbour_roam_state(
- pNeighborRoamInfo->neighborRoamState));
- NEIGHBOR_ROAM_DEBUG(pMac, LOGD, FL("Transit to INIT state"));
+ sme_debug("Received disconnect event in state %s",
+ mac_trace_get_neighbour_roam_state(
+ pNeighborRoamInfo->neighborRoamState));
+ sme_debug("Transit to INIT state");
csr_neighbor_roam_state_transition(pMac,
eCSR_NEIGHBOR_ROAM_STATE_INIT, sessionId);
pNeighborRoamInfo->roamChannelInfo.
@@ -1100,17 +1088,15 @@ QDF_STATUS csr_neighbor_roam_indicate_connect(
return QDF_STATUS_E_FAILURE;
}
- sms_log(pMac, LOGD,
- FL("Connect ind. received with session id %d in state %s"),
+ sme_debug("Connect ind. received with session id %d in state %s",
session_id, mac_trace_get_neighbour_roam_state(
ngbr_roam_info->neighborRoamState));
/* Bail out if this is NOT a STA persona */
if (pMac->roam.roamSession[session_id].pCurRoamProfile->csrPersona !=
QDF_STA_MODE) {
- sms_log(pMac, LOGE,
- FL("Ignoring Connect ind received from a non STA."
- "session_id: %d, csrPersonna %d"), session_id,
+ sme_err("Ignoring Connect ind received from a non STA."
+ "session_id: %d, csrPersonna %d", session_id,
(int)session->pCurRoamProfile->csrPersona);
return QDF_STATUS_SUCCESS;
}
@@ -1118,8 +1104,7 @@ QDF_STATUS csr_neighbor_roam_indicate_connect(
if ((false ==
CSR_IS_FASTROAM_IN_CONCURRENCY_INI_FEATURE_ENABLED(pMac)) &&
(csr_is_concurrent_session_running(pMac))) {
- sms_log(pMac, LOGE,
- FL("Ignoring Connect ind. received in multisession %d"),
+ sme_err("Ignoring Connect ind. received in multisession %d",
csr_is_concurrent_session_running(pMac));
return QDF_STATUS_SUCCESS;
}
@@ -1178,8 +1163,7 @@ QDF_STATUS csr_neighbor_roam_indicate_connect(
csr_neighbor_roam_info_ctx_init(pMac, session_id);
break;
default:
- sms_log(pMac, LOGE,
- FL("Connect evt received in invalid state %s Ignoring"),
+ sme_err("Connect evt received in invalid state %s Ignoring",
mac_trace_get_neighbour_roam_state(
ngbr_roam_info->neighborRoamState));
break;
@@ -1231,8 +1215,7 @@ static QDF_STATUS csr_neighbor_roam_init11r_assoc_info(tpAniSirGlobal pMac)
status = csr_ll_open(pMac->hHdd, &pFTRoamInfo->preAuthDoneList);
if (QDF_STATUS_SUCCESS != status) {
- sms_log(pMac, LOGE,
- FL("LL Open of preauth done AP List failed"));
+ sme_err("LL Open of preauth done AP List failed");
return QDF_STATUS_E_RESOURCES;
}
}
@@ -1301,8 +1284,7 @@ QDF_STATUS csr_neighbor_roam_init(tpAniSirGlobal pMac, uint8_t sessionId)
neighborScanChanList.numChannels);
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");
return QDF_STATUS_E_NOMEM;
}
} else {
@@ -1346,7 +1328,7 @@ QDF_STATUS csr_neighbor_roam_init(tpAniSirGlobal pMac, uint8_t sessionId)
status = csr_ll_open(pMac->hHdd, &pNeighborRoamInfo->roamableAPList);
if (QDF_STATUS_SUCCESS != status) {
- sms_log(pMac, LOGE, FL("LL Open of roam able AP List failed"));
+ sme_err("LL Open of roam able AP List failed");
qdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo.
ChannelList);
pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL;
@@ -1363,7 +1345,7 @@ QDF_STATUS csr_neighbor_roam_init(tpAniSirGlobal pMac, uint8_t sessionId)
status = csr_neighbor_roam_init11r_assoc_info(pMac);
if (QDF_STATUS_SUCCESS != status) {
- sms_log(pMac, LOGE, FL("LL Open of roam able AP List failed"));
+ sme_err("LL Open of roam able AP List failed");
qdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo.
ChannelList);
pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL;
@@ -1398,8 +1380,7 @@ void csr_neighbor_roam_close(tpAniSirGlobal pMac, uint8_t sessionId)
if (eCSR_NEIGHBOR_ROAM_STATE_CLOSED ==
pNeighborRoamInfo->neighborRoamState) {
- sms_log(pMac, LOGW,
- FL("Neighbor Roam Algorithm Already Closed"));
+ sme_warn("Neighbor Roam Algorithm Already Closed");
return;
}
@@ -1509,21 +1490,21 @@ static QDF_STATUS csr_neighbor_roam_process_handoff_req(
tScanResultHandle scan_result;
if (NULL == session) {
- sms_log(mac_ctx, LOGE, FL("session is NULL "));
+ sme_err("session is NULL");
return QDF_STATUS_E_FAILURE;
}
roam_id = GET_NEXT_ROAM_ID(&mac_ctx->roam);
profile = qdf_mem_malloc(sizeof(tCsrRoamProfile));
if (NULL == profile) {
- sms_log(mac_ctx, LOGE, FL("Memory alloc failed"));
+ sme_err("Memory alloc failed");
return QDF_STATUS_E_NOMEM;
}
status =
csr_roam_copy_profile(mac_ctx, profile,
session->pCurRoamProfile);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- sms_log(mac_ctx, LOGE, FL("Profile copy failed"));
+ sme_err("Profile copy failed");
goto end;
}
/* Add the BSSID & Channel */
@@ -1533,7 +1514,7 @@ static QDF_STATUS csr_neighbor_roam_process_handoff_req(
qdf_mem_malloc(sizeof(tSirMacAddr) *
profile->BSSIDs.numOfBSSIDs);
if (NULL == profile->BSSIDs.bssid) {
- sms_log(mac_ctx, LOGE, FL("mem alloc failed for BSSID"));
+ sme_err("mem alloc failed for BSSID");
status = QDF_STATUS_E_NOMEM;
goto end;
}
@@ -1552,8 +1533,7 @@ static QDF_STATUS csr_neighbor_roam_process_handoff_req(
ChannelInfo.ChannelList) *
profile->ChannelInfo.numOfChannels);
if (NULL == profile->ChannelInfo.ChannelList) {
- sms_log(mac_ctx, LOGE,
- FL("mem alloc failed for ChannelList"));
+ sme_err("mem alloc failed for ChannelList");
status = QDF_STATUS_E_NOMEM;
goto end;
}
@@ -1567,13 +1547,11 @@ static QDF_STATUS csr_neighbor_roam_process_handoff_req(
* proceed with the handoff instead of a redundant scan again.
*/
if (roam_ctrl_info->handoffReqInfo.src == CONNECT_CMD_USERSPACE) {
- sms_log(mac_ctx, LOGD,
- FL("Connect cmd with bssid within same ESS"));
+ sme_debug("Connect cmd with bssid within same ESS");
status = csr_neighbor_roam_prepare_scan_profile_filter(mac_ctx,
&scan_filter,
session_id);
- sms_log(mac_ctx, LOGD, FL("Filter creation status = %d"),
- status);
+ sme_debug("Filter creation status: %d", status);
status = csr_scan_get_result(mac_ctx, &scan_filter,
&scan_result);
csr_neighbor_roam_process_scan_results(mac_ctx, session_id,
@@ -1581,7 +1559,7 @@ static QDF_STATUS csr_neighbor_roam_process_handoff_req(
roamable_ap_count = csr_ll_count(
&roam_ctrl_info->roamableAPList);
csr_free_scan_filter(mac_ctx, &scan_filter);
- sms_log(mac_ctx, LOGD, FL("roam_now=%d, roamable_ap_count=%d"),
+ sme_debug("roam_now=%d, roamable_ap_count=%d",
roam_now, roamable_ap_count);
}
if (roam_now && roamable_ap_count) {
@@ -1590,7 +1568,7 @@ static QDF_STATUS csr_neighbor_roam_process_handoff_req(
status = csr_scan_for_ssid(mac_ctx, session_id, profile,
roam_id, false);
if (status != QDF_STATUS_SUCCESS)
- sms_log(mac_ctx, LOGE, FL("SSID scan failed"));
+ sme_err("SSID scan failed");
}
end:
@@ -1622,27 +1600,23 @@ QDF_STATUS csr_neighbor_roam_sssid_scan_done(tpAniSirGlobal pMac,
&pMac->roam.neighborRoamInfo[sessionId];
QDF_STATUS hstatus;
- sms_log(pMac, LOGE, FL("called "));
-
/* we must be in connected state, if not ignore it */
if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED !=
pNeighborRoamInfo->neighborRoamState) {
- sms_log(pMac, LOGE,
- FL("Received in not CONNECTED state. Ignore it"));
+ sme_err("Received in not CONNECTED state. Ignore it");
return QDF_STATUS_E_FAILURE;
}
/* if SSID scan failed to find our candidate add an entry to csr scan cache ourself */
if (!QDF_IS_STATUS_SUCCESS(status)) {
- sms_log(pMac, LOGE, FL("Add an entry to csr scan cache"));
+ sme_err("Add an entry to csr scan cache");
hstatus = csr_scan_create_entry_in_scan_cache(pMac, sessionId,
pNeighborRoamInfo->
handoffReqInfo.bssid,
pNeighborRoamInfo->
handoffReqInfo.channel);
if (QDF_STATUS_SUCCESS != hstatus) {
- sms_log(pMac, LOGE,
- FL
- ("csr_scan_create_entry_in_scan_cache failed with status %d"),
+ sme_err(
+ "csr_scan_create_entry_in_scan_cache failed with status %d",
hstatus);
return QDF_STATUS_E_FAILURE;
}
@@ -1652,9 +1626,7 @@ QDF_STATUS csr_neighbor_roam_sssid_scan_done(tpAniSirGlobal pMac,
hstatus = csr_neighbor_roam_process_scan_complete(pMac, sessionId);
if (QDF_STATUS_SUCCESS != hstatus) {
- sms_log(pMac, LOGE,
- FL
- ("Neighbor scan process complete failed with status %d"),
+ sme_err("Neighbor scan process complete failed with status %d",
hstatus);
return QDF_STATUS_E_FAILURE;
}
@@ -1684,15 +1656,14 @@ QDF_STATUS csr_neighbor_roam_handoff_req_hdlr(
/* we must be in connected state, if not ignore it */
if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED !=
roam_ctrl_info->neighborRoamState) {
- sms_log(mac_ctx, LOGE,
- FL("Received in not CONNECTED state. Ignore it"));
+ sme_err("Received in not CONNECTED state. Ignore it");
return QDF_STATUS_E_FAILURE;
}
/* save the handoff info came from HDD as part of the reassoc req */
handoff_req = (tAniHandoffReq *) msg;
if (NULL == handoff_req) {
- sms_log(mac_ctx, LOGE, FL("Received msg is NULL"));
+ sme_err("Received msg is NULL");
return QDF_STATUS_E_FAILURE;
}
@@ -1700,9 +1671,7 @@ QDF_STATUS csr_neighbor_roam_handoff_req_hdlr(
if (!qdf_mem_cmp(handoff_req->bssid,
roam_ctrl_info->currAPbssid.bytes,
sizeof(tSirMacAddr))) {
- sms_log(mac_ctx, LOGE,
- FL
- ("Received req has same BSSID as current AP!!"));
+ sme_err("Received req has same BSSID as current AP!!");
return QDF_STATUS_E_FAILURE;
}
roam_ctrl_info->handoffReqInfo.channel =
@@ -1716,8 +1685,7 @@ QDF_STATUS csr_neighbor_roam_handoff_req_hdlr(
ROAM_SCAN_OFFLOAD_STOP,
REASON_OS_REQUESTED_ROAMING_NOW);
if (QDF_STATUS_SUCCESS != status) {
- sms_log(mac_ctx, LOGE,
- FL("csr_roam_offload_scan failed"));
+ sme_err("csr_roam_offload_scan failed");
roam_ctrl_info->uOsRequestedHandoff = 0;
}
return status;
@@ -1744,8 +1712,8 @@ QDF_STATUS csr_neighbor_roam_proceed_with_handoff_req(tpAniSirGlobal pMac,
if ((eCSR_NEIGHBOR_ROAM_STATE_CONNECTED !=
pNeighborRoamInfo->neighborRoamState)
|| (!pNeighborRoamInfo->uOsRequestedHandoff)) {
- sms_log(pMac, LOGE,
- FL("Received in not CONNECTED state(%d) or uOsRequestedHandoff(%d) is not set. Ignore it"),
+ sme_err(
+ "Received in not CONNECTED state(%d) or uOsRequestedHandoff(%d) is not set. Ignore it",
pNeighborRoamInfo->neighborRoamState,
pNeighborRoamInfo->uOsRequestedHandoff);
status = QDF_STATUS_E_FAILURE;