diff options
| author | Nishank Aggarwal <naggar@codeaurora.org> | 2017-03-10 14:54:39 +0530 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-03-15 03:50:12 -0700 |
| commit | bbc7dc3768c006caeca03598a822aa30d055355a (patch) | |
| tree | 37e62e86945650ed300b1c87dba6ebe843db10eb | |
| parent | 9e42de9ab8fc0b7001e392d3d7e3504ee3826d83 (diff) | |
qcacld-3.0: Reduce the log spam in lim
Move the logs to appropriate log levels to reduce
the log spam in lim_link_monitoring_algo.c and
lim_process_disassoc_frame.c
Change-Id: Ie1de4d2815130eb22704adddb1389f21e7ce54bb
CRs-Fixed: 1093093
| -rw-r--r-- | core/mac/src/pe/lim/lim_link_monitoring_algo.c | 26 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_disassoc_frame.c | 97 |
2 files changed, 47 insertions, 76 deletions
diff --git a/core/mac/src/pe/lim/lim_link_monitoring_algo.c b/core/mac/src/pe/lim/lim_link_monitoring_algo.c index fe2c2fc2e30b..8daced50e450 100644 --- a/core/mac/src/pe/lim/lim_link_monitoring_algo.c +++ b/core/mac/src/pe/lim/lim_link_monitoring_algo.c @@ -71,7 +71,7 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg, { tpDphHashNode stads; - lim_log(mac_ctx, LOGE, + lim_log(mac_ctx, LOGD, FL("Deleting station: staId = %d, reasonCode = %d"), msg->staId, msg->reasonCode); @@ -100,7 +100,7 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg, } if (LIM_IS_AP_ROLE(session_entry)) { - lim_log(mac_ctx, LOG1, + lim_log(mac_ctx, LOGD, FL("Delete Station staId: %d, assocId: %d"), msg->staId, msg->assocId); /* @@ -142,7 +142,7 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg, #endif /* TearDownLink with AP */ tLimMlmDeauthInd mlm_deauth_ind; - lim_log(mac_ctx, LOGW, + lim_log(mac_ctx, LOGD, FL("Delete Station (staId: %d, assocId: %d) "), msg->staId, msg->assocId); @@ -159,7 +159,7 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg, * does not have context or in some transit state. * Log error */ - lim_log(mac_ctx, LOGE, + lim_log(mac_ctx, LOGD, FL("Received SIR_LIM_DELETE_STA_CONTEXT_IND for " "STA that either has no context or " "in some transit state, Addr = " @@ -302,7 +302,7 @@ lim_trigger_sta_deletion(tpAniSirGlobal mac_ctx, tpDphHashNode sta_ds, eLIM_MLM_WT_DEL_BSS_RSP_STATE) || sta_ds->sta_deletion_in_progress) { /* Already in the process of deleting context for the peer */ - lim_log(mac_ctx, LOG1, + lim_log(mac_ctx, LOGD, FL("Deletion is in progress (%d) for peer:%p in mlmState %d"), sta_ds->sta_deletion_in_progress, sta_ds->staAddr, sta_ds->mlmStaContext.mlmState); @@ -355,7 +355,7 @@ lim_tear_down_link_with_ap(tpAniSirGlobal pMac, uint8_t sessionId, psessionEntry = pe_find_session_by_session_id(pMac, sessionId); if (psessionEntry == NULL) { - lim_log(pMac, LOGP, + lim_log(pMac, LOGE, FL("Session Does not exist for given sessionID")); return; } @@ -366,7 +366,7 @@ lim_tear_down_link_with_ap(tpAniSirGlobal pMac, uint8_t sessionId, */ psessionEntry->pmmOffloadInfo.bcnmiss = false; - lim_log(pMac, LOGW, + lim_log(pMac, LOG1, FL("No ProbeRsp from AP after HB failure. Tearing down link")); /* Announce loss of link to Roaming algorithm */ @@ -406,7 +406,7 @@ lim_tear_down_link_with_ap(tpAniSirGlobal pMac, uint8_t sessionId, else pMac->lim.gLimHeartBeatApMacIndex = 1; - lim_log(pMac, LOGE, FL("HB Failure on MAC " + lim_log(pMac, LOG1, FL("HB Failure on MAC " MAC_ADDRESS_STR" Store it on Index %d"), MAC_ADDR_ARRAY(pStaDs->staAddr), apCount); @@ -470,7 +470,7 @@ void lim_handle_heart_beat_failure(tpAniSirGlobal mac_ctx, /* Ignore HB if channel switch is in progress */ if (session->gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING) { - lim_log(mac_ctx, LOGE, + lim_log(mac_ctx, LOGD, FL("Ignore Heartbeat failure as Channel switch is in progress")); session->pmmOffloadInfo.bcnmiss = false; return; @@ -496,7 +496,7 @@ void lim_handle_heart_beat_failure(tpAniSirGlobal mac_ctx, * it is still around. Wait until certain * timeout for Probe Response from AP. */ - lim_log(mac_ctx, LOGW, + lim_log(mac_ctx, LOGD, FL("HB missed from AP. Sending Probe Req")); /* for searching AP, we don't include any more IE */ if (session->pLimJoinReq != NULL) { @@ -515,7 +515,7 @@ void lim_handle_heart_beat_failure(tpAniSirGlobal mac_ctx, session->dot11mode, 0, NULL); } } else { - lim_log(mac_ctx, LOGW, + lim_log(mac_ctx, LOGD, FL("HB missed from AP on DFS chanel moving to passive")); if (curr_chan < SIR_MAX_24G_5G_CHANNEL_RANGE) { lim_covert_channel_scan_type(mac_ctx, curr_chan, @@ -538,10 +538,10 @@ void lim_handle_heart_beat_failure(tpAniSirGlobal mac_ctx, * or in states other than link-established state. * Log error. */ - lim_log(mac_ctx, LOG1, + lim_log(mac_ctx, LOGD, FL("received heartbeat timeout in state %X"), session->limMlmState); - lim_print_mlm_state(mac_ctx, LOG1, session->limMlmState); + lim_print_mlm_state(mac_ctx, LOGD, session->limMlmState); mac_ctx->lim.gLimHBfailureCntInOtherStates++; } } diff --git a/core/mac/src/pe/lim/lim_process_disassoc_frame.c b/core/mac/src/pe/lim/lim_process_disassoc_frame.c index 1cef599f9007..7a59bf2592d4 100644 --- a/core/mac/src/pe/lim/lim_process_disassoc_frame.c +++ b/core/mac/src/pe/lim/lim_process_disassoc_frame.c @@ -91,21 +91,16 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, if (lim_is_group_addr(pHdr->sa)) { /* Received Disassoc frame from a BC/MC address */ /* Log error and ignore it */ - PELOGE(lim_log(pMac, LOGE, - FL - ("received Disassoc frame from a BC/MC address")); - ) - + lim_log(pMac, LOGE, + FL("received Disassoc frame from a BC/MC address")); return; } if (lim_is_group_addr(pHdr->da) && !lim_is_addr_bc(pHdr->da)) { /* Received Disassoc frame for a MC address */ /* Log error and ignore it */ - PELOGE(lim_log(pMac, LOGE, - FL("received Disassoc frame for a MC address")); - ) - + lim_log(pMac, LOGE, + FL("received Disassoc frame for a MC address")); return; } if (!lim_validate_received_frame_a1_addr(pMac, @@ -133,11 +128,8 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, if (psessionEntry->limRmfEnabled && (WMA_GET_RX_DPU_FEEDBACK(pRxPacketInfo) & DPU_FEEDBACK_UNPROTECTED_ERROR)) { - PELOGE(lim_log - (pMac, LOGE, - FL("received an unprotected disassoc from AP")); - ) - + lim_log(pMac, LOGE, + FL("received an unprotected disassoc from AP")); /* * When 11w offload is enabled then * firmware should not fwd this frame @@ -166,15 +158,14 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, /* Get reasonCode from Disassociation frame body */ reasonCode = sir_read_u16(pBody); - PELOG2(lim_log(pMac, LOGE, - FL("Received Disassoc frame for Addr: " MAC_ADDRESS_STR + lim_log(pMac, LOG1, + FL("Received Disassoc frame for Addr: " MAC_ADDRESS_STR "(mlm state=%s, sme state=%d RSSI=%d)," "with reason code %d [%s] from " MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->da), lim_mlm_state_str(psessionEntry->limMlmState), psessionEntry->limSmeState, frame_rssi, reasonCode, lim_dot11_reason_str(reasonCode), MAC_ADDR_ARRAY(pHdr->sa)); - ) lim_diag_event_report(pMac, WLAN_PE_DIAG_DISASSOC_FRAME_EVENT, psessionEntry, 0, reasonCode); /** @@ -190,21 +181,17 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, * Disassociating STA is not associated. * Log error. */ - PELOGE(lim_log(pMac, LOGE, - FL - ("received Disassoc frame from STA that does not have context " - "reasonCode=%d, addr " MAC_ADDRESS_STR), - reasonCode, MAC_ADDR_ARRAY(pHdr->sa)); - ) - + lim_log(pMac, LOGE, + FL("received Disassoc frame from STA that does not have context " + "reasonCode=%d, addr " MAC_ADDRESS_STR), + reasonCode, MAC_ADDR_ARRAY(pHdr->sa)); return; } if (lim_check_disassoc_deauth_ack_pending(pMac, (uint8_t *) pHdr->sa)) { - PELOGE(lim_log(pMac, LOGE, - FL("Ignore the DisAssoc received, while waiting " - "for ack of disassoc/deauth")); - ) + lim_log(pMac, LOGE, + FL("Ignore the DisAssoc received, while waiting " + "for ack of disassoc/deauth")); lim_clean_up_disassoc_deauth_req(pMac, (uint8_t *) pHdr->sa, 1); return; } @@ -217,22 +204,17 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, * drop/ignore the DisAssoc received */ if (!IS_REASSOC_BSSID(pMac, pHdr->sa, psessionEntry)) { - PELOGE(lim_log - (pMac, LOGE, - FL("Ignore the DisAssoc received, while " - "Processing ReAssoc with different/unknown AP")); - ) + lim_log(pMac, LOGE, + FL("Ignore the DisAssoc received, while " + "Processing ReAssoc with different/unknown AP")); return; } /** If the Disassoc is received from the new AP to which we tried to ReAssociate * Drop ReAssoc and Restore the Previous context( current connected AP). */ if (!IS_CURRENT_BSSID(pMac, pHdr->sa, psessionEntry)) { - PELOGW(lim_log - (pMac, LOGW, - FL - ("received Disassoc from the New AP to which ReAssoc is sent ")); - ) + lim_log(pMac, LOGW, + FL("received Disassoc from the New AP to which ReAssoc is sent ")); lim_restore_pre_reassoc_state(pMac, eSIR_SME_REASSOC_REFUSED, reasonCode, @@ -256,12 +238,10 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, default: /* Invalid reasonCode in received Disassociation frame */ - PELOGE(lim_log(pMac, LOGE, - FL - ("received Disassoc frame with invalid reasonCode " - "%d from " MAC_ADDRESS_STR), reasonCode, + lim_log(pMac, LOGE, + FL("received Disassoc frame with invalid reasonCode " + "%d from " MAC_ADDRESS_STR), reasonCode, MAC_ADDR_ARRAY(pHdr->sa)); - ) break; } } else if (LIM_IS_STA_ROLE(psessionEntry) && @@ -292,9 +272,8 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, } else { /* Received Disassociation frame in either IBSS */ /* or un-known role. Log and ignore it */ - lim_log(pMac, LOGE, - FL - ("received Disassoc frame with invalid reasonCode %d in role " + lim_log(pMac, LOG1, + FL("received Disassoc frame with invalid reasonCode %d in role " "%d in sme state %d from " MAC_ADDRESS_STR), reasonCode, GET_LIM_SYSTEM_ROLE(psessionEntry), psessionEntry->limSmeState, MAC_ADDR_ARRAY(pHdr->sa)); @@ -308,13 +287,10 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, * Already in the process of deleting context for the peer * and received Disassociation frame. Log and Ignore. */ - PELOGE(lim_log(pMac, LOGE, - FL("received Disassoc frame in state %d from " - MAC_ADDRESS_STR), - pStaDs->mlmStaContext.mlmState, - MAC_ADDR_ARRAY(pHdr->sa)); - ) - + lim_log(pMac, LOG1, + FL("received Disassoc frame in state %d from " + MAC_ADDRESS_STR), pStaDs->mlmStaContext.mlmState, + MAC_ADDR_ARRAY(pHdr->sa)); return; } #ifdef FEATURE_WLAN_TDLS @@ -340,12 +316,10 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, eLIM_MLM_WT_ASSOC_CNF_STATE) pStaDs->mlmStaContext.updateContext = 1; - PELOGE(lim_log(pMac, LOGE, - FL - ("received Disassoc frame from peer that is in state %X, addr " - MAC_ADDRESS_STR), pStaDs->mlmStaContext.mlmState, + lim_log(pMac, LOG1, + FL("received Disassoc frame from peer that is in state %X, addr " + MAC_ADDRESS_STR), pStaDs->mlmStaContext.mlmState, MAC_ADDR_ARRAY(pHdr->sa)); - ) } /* if (pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) */ @@ -369,11 +343,8 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, * failure result code. By design, SME will then issue "Disassoc" * and cleanup will happen at that time. */ - PELOGE(lim_log - (pMac, LOGE, - FL("received Disassoc from AP while waiting " - "for Reassoc Rsp")); - ) + lim_log(pMac, LOGD, + FL("received Disassoc from AP while waiting for Reassoc Rsp")); if (psessionEntry->limAssocResponseData) { qdf_mem_free(psessionEntry->limAssocResponseData); |
