summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNishank Aggarwal <naggar@codeaurora.org>2017-03-11 14:17:49 +0530
committerSandeep Puligilla <spuligil@codeaurora.org>2017-03-15 03:50:23 -0700
commita9edd385586688e7a7029ae010c5431fa8ba0a03 (patch)
treefb5400df8f19865829c0f467aba6220758851b4c
parentec3f547f1e7c552168f2eae412adecbacbe95025 (diff)
qcacld-3.0: Reduce the log spam in lim
Move the logs to appropriate log levels to reduce the log spam in lim_process_assoc_req_frame.c, lim_process_mlm_host_roam.c and lim_reassoc_utils.c Change-Id: Ie38bd037fa1533459c2825c998acb240dd8f7b25 CRs-Fixed: 1093093
-rw-r--r--core/mac/src/pe/lim/lim_process_assoc_req_frame.c51
-rw-r--r--core/mac/src/pe/lim/lim_process_mlm_host_roam.c26
-rw-r--r--core/mac/src/pe/lim/lim_reassoc_utils.c4
3 files changed, 38 insertions, 43 deletions
diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
index 3da58bc5b369..0d78e34397ac 100644
--- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
+++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
@@ -74,7 +74,7 @@ static void lim_convert_supported_channels(tpAniSirGlobal mac_ctx,
if (assoc_req->supportedChannels.length >=
SIR_MAX_SUPPORTED_CHANNEL_LIST) {
- lim_log(mac_ctx, LOG1,
+ lim_log(mac_ctx, LOGE,
FL("Number of supported channels:%d is more than MAX"),
assoc_req->supportedChannels.length);
assoc_ind->supportedChannels.numChnl = 0;
@@ -90,7 +90,7 @@ static void lim_convert_supported_channels(tpAniSirGlobal mac_ctx,
/* Get Number of Channels in a Subband */
chn_count = assoc_req->supportedChannels.supportedChannels[i];
- lim_log(mac_ctx, LOG2,
+ lim_log(mac_ctx, LOGD,
FL("Rcv assoc_req: chnl=%d, numOfChnl=%d "),
first_ch_no, chn_count);
if (index >= SIR_MAX_SUPPORTED_CHANNEL_LIST) {
@@ -126,7 +126,7 @@ static void lim_convert_supported_channels(tpAniSirGlobal mac_ctx,
}
assoc_ind->supportedChannels.numChnl = (uint8_t) index;
- lim_log(mac_ctx, LOG2,
+ lim_log(mac_ctx, LOGD,
FL("Send AssocInd to WSM: minPwr %d, maxPwr %d, numChnl %d"),
assoc_ind->powerCap.minTxPower,
assoc_ind->powerCap.maxTxPower,
@@ -308,7 +308,7 @@ static bool lim_chk_capab(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
uint16_t temp;
if (cfg_get_capability_info(mac_ctx, &temp, session) != eSIR_SUCCESS) {
- lim_log(mac_ctx, LOGP, FL("could not retrieve Capabilities"));
+ lim_log(mac_ctx, LOGE, FL("could not retrieve Capabilities"));
return false;
}
@@ -559,7 +559,7 @@ lim_process_for_spectrum_mgmt(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
* missing, log the peers error
*/
if (!assoc_req->powerCapabilityPresent) {
- lim_log(mac_ctx, LOG1,
+ lim_log(mac_ctx, LOGW,
FL("LIM Info: Missing Power capability IE in %s Req from "
MAC_ADDRESS_STR),
(LIM_ASSOC == sub_type) ?
@@ -679,7 +679,7 @@ static bool lim_chk_is_11b_sta_supported(tpAniSirGlobal mac_ctx,
if (phy_mode == WNI_CFG_PHY_MODE_11G) {
if (wlan_cfg_get_int(mac_ctx, WNI_CFG_11G_ONLY_POLICY,
&cfg_11g_only) != eSIR_SUCCESS) {
- lim_log(mac_ctx, LOGP,
+ lim_log(mac_ctx, LOGE,
FL("couldn't get 11g-only flag"));
return false;
}
@@ -928,7 +928,7 @@ static bool lim_chk_n_process_wpa_rsn_ie(tpAniSirGlobal mac_ctx,
*/
} /* end of if( ! assoc_req->wscInfo.present ) */
else {
- lim_log(mac_ctx, LOG1, FL("Assoc req WSE IE is present"));
+ lim_log(mac_ctx, LOGD, FL("Assoc req WSE IE is present"));
}
return true;
}
@@ -1032,19 +1032,19 @@ static bool lim_process_assoc_req_sta_ctx(tpAniSirGlobal mac_ctx,
#ifdef WLAN_DEBUG
mac_ctx->lim.gLimNumAssocReqDropInvldState++;
#endif
- lim_log(mac_ctx, LOG1,
+ lim_log(mac_ctx, LOGD,
FL("received Assoc req in state %X from "),
sta_ds->mlmStaContext.mlmState);
} else {
#ifdef WLAN_DEBUG
mac_ctx->lim.gLimNumReassocReqDropInvldState++;
#endif
- lim_log(mac_ctx, LOG1,
+ lim_log(mac_ctx, LOGD,
FL("received ReAssoc req in state %X from "),
sta_ds->mlmStaContext.mlmState);
}
- lim_print_mac_addr(mac_ctx, hdr->sa, LOG1);
- lim_print_mlm_state(mac_ctx, LOG1,
+ lim_print_mac_addr(mac_ctx, hdr->sa, LOGD);
+ lim_print_mlm_state(mac_ctx, LOGD,
(tLimMlmStates) sta_ds->mlmStaContext.mlmState);
return false;
}
@@ -1052,9 +1052,9 @@ static bool lim_process_assoc_req_sta_ctx(tpAniSirGlobal mac_ctx,
/* STA sent assoc req frame while already in 'associated' state */
#ifdef WLAN_FEATURE_11W
- lim_log(mac_ctx, LOG1,
+ lim_log(mac_ctx, LOGD,
FL("Re/Assoc request from station that is already associated"));
- lim_log(mac_ctx, LOG1, FL("PMF enabled %d, SA Query state %d"),
+ lim_log(mac_ctx, LOGD, FL("PMF enabled %d, SA Query state %d"),
sta_ds->rmfEnabled, sta_ds->pmfSaQueryState);
if (sta_ds->rmfEnabled) {
switch (sta_ds->pmfSaQueryState) {
@@ -1124,7 +1124,7 @@ static bool lim_process_assoc_req_sta_ctx(tpAniSirGlobal mac_ctx,
* 'associated' state. Update STA capabilities and send
* Association response frame with same AID
*/
- lim_log(mac_ctx, LOG1,
+ lim_log(mac_ctx, LOGD,
FL("Rcvd Assoc req from STA already connected"));
sta_ds->mlmStaContext.capabilityInfo =
assoc_req->capabilityInfo;
@@ -1547,7 +1547,7 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
(struct s_ext_cap *) assoc_req->ExtCap.bytes, mac_ctx);
} else {
sta_ds->timingMeasCap = 0;
- PELOG1(lim_log(mac_ctx, LOG1, FL("ExtCap not present"));)
+ lim_log(mac_ctx, LOGD, FL("ExtCap not present"));
}
return true;
}
@@ -1758,7 +1758,7 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);
- lim_log(mac_ctx, LOG1,
+ lim_log(mac_ctx, LOGD,
FL("Rcvd %s Req Frame, sessionid: %d systemrole %d MlmState %d from: "
MAC_ADDRESS_STR),
(LIM_ASSOC == sub_type) ? "Assoc" : "ReAssoc",
@@ -1772,7 +1772,7 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
session->peSessionId, sub_type,
GET_LIM_SYSTEM_ROLE(session),
MAC_ADDR_ARRAY(hdr->sa));
- sir_dump_buf(mac_ctx, SIR_LIM_MODULE_ID, LOG3,
+ sir_dump_buf(mac_ctx, SIR_LIM_MODULE_ID, LOGD,
WMA_GET_RX_MPDU_DATA(rx_pkt_info), frame_len);
return;
}
@@ -1842,9 +1842,6 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
return;
}
- sir_dump_buf(mac_ctx, SIR_LIM_MODULE_ID, LOG2,
- (uint8_t *) frm_body, frame_len);
-
if (false == lim_chk_sa_da(mac_ctx, hdr, session, sub_type))
return;
@@ -1870,7 +1867,7 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
/* Allocate memory for the Assoc Request frame */
assoc_req = qdf_mem_malloc(sizeof(*assoc_req));
if (NULL == assoc_req) {
- lim_log(mac_ctx, LOGP,
+ lim_log(mac_ctx, LOGE,
FL("Allocate Memory failed in assoc_req"));
return;
}
@@ -2067,7 +2064,7 @@ static void lim_fill_assoc_ind_wapi_info(tpAniSirGlobal mac_ctx,
uint8_t *wpsie)
{
if (assoc_req->wapiPresent && (NULL == wpsie)) {
- lim_log(mac_ctx, LOG2,
+ lim_log(mac_ctx, LOGD,
FL("Received WAPI IE length in Assoc Req is %d"),
assoc_req->wapi.length);
assoc_ind->wapiIE.wapiIEdata[0] = SIR_MAC_WAPI_EID;
@@ -2191,7 +2188,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
else
sub_type = LIM_ASSOC;
- lim_log(mac_ctx, LOG1,
+ lim_log(mac_ctx, LOGD,
FL("Sessionid %d ssid %s sub_type %d Associd %d staAddr "
MAC_ADDRESS_STR), session_entry->peSessionId,
assoc_req->ssId.ssId, sub_type, sta_ds->assocId,
@@ -2204,7 +2201,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
if (NULL == assoc_ind) {
lim_release_peer_idx(mac_ctx, sta_ds->assocId,
session_entry);
- lim_log(mac_ctx, LOGP,
+ lim_log(mac_ctx, LOGE,
FL("AllocateMemory failed for assoc_ind"));
return;
}
@@ -2227,7 +2224,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
assoc_req->addIE.length);
}
if (assoc_req->rsnPresent && (NULL == wpsie)) {
- lim_log(mac_ctx, LOG2, FL("Assoc Req RSN IE len = %d"),
+ lim_log(mac_ctx, LOGD, FL("Assoc Req RSN IE len = %d"),
assoc_req->rsn.length);
assoc_ind->rsnIE.length = 2 + assoc_req->rsn.length;
assoc_ind->rsnIE.rsnIEdata[0] = SIR_MAC_RSN_EID;
@@ -2302,7 +2299,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
assoc_ind->addIE.length +=
2 + DOT11F_IE_HTCAPS_MIN_LEN;
} else {
- lim_log(mac_ctx, LOGP,
+ lim_log(mac_ctx, LOGE,
FL("Fail:HT capabilities IE to addIE"));
}
}
@@ -2311,7 +2308,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
if (wlan_cfg_get_int (mac_ctx,
(uint16_t) WNI_CFG_WME_ENABLED, &tmp)
!= eSIR_SUCCESS)
- lim_log(mac_ctx, LOGP,
+ lim_log(mac_ctx, LOGE,
FL("wlan_cfg_get_int failed for id %d"),
WNI_CFG_WME_ENABLED);
diff --git a/core/mac/src/pe/lim/lim_process_mlm_host_roam.c b/core/mac/src/pe/lim/lim_process_mlm_host_roam.c
index 383d99506000..973ea1ca2b13 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_host_roam.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_host_roam.c
@@ -82,7 +82,7 @@ void lim_process_mlm_reassoc_req(tpAniSirGlobal mac_ctx, uint32_t *msg)
return;
}
- lim_log(mac_ctx, LOG1,
+ lim_log(mac_ctx, LOGD,
FL("ReAssoc Req on session %d role %d mlm %d " MAC_ADDRESS_STR),
reassoc_req->sessionId, GET_LIM_SYSTEM_ROLE(session),
session->limMlmState, MAC_ADDR_ARRAY(reassoc_req->peerMacAddr));
@@ -193,7 +193,7 @@ static void lim_handle_sme_reaasoc_result(tpAniSirGlobal pMac,
uint16_t smetransactionId;
if (psessionEntry == NULL) {
- PELOGE(lim_log(pMac, LOGE, FL("psessionEntry is NULL "));)
+ lim_log(pMac, LOGE, FL("psessionEntry is NULL "));
return;
}
smesessionId = psessionEntry->smeSessionId;
@@ -282,7 +282,7 @@ void lim_process_mlm_reassoc_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
* HT params.
*/
if (session->ftPEContext.pFTPreAuthReq) {
- lim_log(mac_ctx, LOG1, FL("Freeing pFTPreAuthReq= %p"),
+ lim_log(mac_ctx, LOGD, FL("Freeing pFTPreAuthReq= %p"),
session->ftPEContext.pFTPreAuthReq);
if (session->ftPEContext.pFTPreAuthReq->pbssDescription) {
qdf_mem_free(
@@ -303,7 +303,7 @@ void lim_process_mlm_reassoc_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
}
#endif
- lim_log(mac_ctx, LOG1, FL("Rcv MLM_REASSOC_CNF with result code %d"),
+ lim_log(mac_ctx, LOGD, FL("Rcv MLM_REASSOC_CNF with result code %d"),
lim_mlm_reassoc_cnf->resultCode);
if (lim_mlm_reassoc_cnf->resultCode == eSIR_SME_SUCCESS) {
/* Successful Reassociation */
@@ -373,7 +373,7 @@ void lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac,
/* Sanity Checks */
if (pAddBssParams == NULL) {
- PELOGE(lim_log(pMac, LOGE, FL("Invalid parameters"));)
+ lim_log(pMac, LOGE, FL("Invalid parameters"));
goto end;
}
if (eLIM_MLM_WT_ADD_BSS_RSP_FT_REASSOC_STATE !=
@@ -407,7 +407,7 @@ void lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac,
!= TX_SUCCESS) {
/* / Could not start reassoc failure timer. */
/* Log error */
- lim_log(pMac, LOGP,
+ lim_log(pMac, LOGE,
FL("could not start Reassoc failure timer"));
/* Return Reassoc confirm with */
/* Resources Unavailable */
@@ -446,10 +446,8 @@ void lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac,
MTRACE(mac_trace
(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId,
eLIM_MLM_WT_FT_REASSOC_RSP_STATE));
- PELOGE(lim_log
- (pMac, LOG1, FL("Set the mlm state to %d session=%d"),
+ lim_log(pMac, LOGD, FL("Set the mlm state to %d session=%d"),
psessionEntry->limMlmState, psessionEntry->peSessionId);
- )
psessionEntry->bssIdx = (uint8_t) pAddBssParams->bssIdx;
@@ -465,7 +463,7 @@ void lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac,
pAddStaParams = qdf_mem_malloc(sizeof(tAddStaParams));
if (NULL == pAddStaParams) {
- lim_log(pMac, LOGP,
+ lim_log(pMac, LOGE,
FL("Unable to allocate memory during ADD_STA"));
goto end;
}
@@ -539,7 +537,7 @@ void lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac,
if (wlan_cfg_get_int(pMac, WNI_CFG_LISTEN_INTERVAL, &listenInterval) !=
eSIR_SUCCESS)
- lim_log(pMac, LOGP, FL("Couldn't get LISTEN_INTERVAL"));
+ lim_log(pMac, LOGE, FL("Couldn't get LISTEN_INTERVAL"));
pAddStaParams->listenInterval = (uint16_t) listenInterval;
wlan_cfg_get_int(pMac, WNI_CFG_DOT11_MODE, &selfStaDot11Mode);
@@ -670,7 +668,7 @@ void lim_process_mlm_ft_reassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf,
lim_update_caps_info_for_bss(pMac, &caps,
psessionEntry->pLimReAssocReq->bssDescription.capabilityInfo);
- lim_log(pMac, LOG1, FL("Capabilities info FT Reassoc: 0x%X"), caps);
+ lim_log(pMac, LOGD, FL("Capabilities info FT Reassoc: 0x%X"), caps);
pMlmReassocReq->capabilityInfo = caps;
@@ -682,7 +680,7 @@ void lim_process_mlm_ft_reassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf,
*/
if (wlan_cfg_get_int(pMac, WNI_CFG_TELE_BCN_WAKEUP_EN, &teleBcnEn) !=
eSIR_SUCCESS) {
- lim_log(pMac, LOGP,
+ lim_log(pMac, LOGE,
FL("Couldn't get WNI_CFG_TELE_BCN_WAKEUP_EN"));
qdf_mem_free(pMlmReassocReq);
return;
@@ -731,7 +729,7 @@ void lim_process_mlm_ft_reassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf,
msgQ.bodyptr = psessionEntry->ftPEContext.pAddBssReq;
msgQ.bodyval = 0;
- lim_log(pMac, LOG1, FL("Sending SIR_HAL_ADD_BSS_REQ..."));
+ lim_log(pMac, LOGD, FL("Sending SIR_HAL_ADD_BSS_REQ..."));
MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, msgQ.type));
retCode = wma_post_ctrl_msg(pMac, &msgQ);
if (eSIR_SUCCESS != retCode) {
diff --git a/core/mac/src/pe/lim/lim_reassoc_utils.c b/core/mac/src/pe/lim/lim_reassoc_utils.c
index d9d4024b6371..d9163fa55462 100644
--- a/core/mac/src/pe/lim/lim_reassoc_utils.c
+++ b/core/mac/src/pe/lim/lim_reassoc_utils.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -500,7 +500,7 @@ lim_restore_pre_reassoc_state(tpAniSirGlobal pMac,
{
tLimMlmReassocCnf mlmReassocCnf;
- lim_log(pMac, LOG1,
+ lim_log(pMac, LOGD,
FL("sessionid: %d protStatusCode: %d resultCode: %d"),
psessionEntry->smeSessionId, protStatusCode, resultCode);