From 5670d365dc26c5b43c9e80294d22b14cedb37fca Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Tue, 16 Jan 2018 17:31:54 +0530 Subject: [PATCH] qcacld-3.0: Fix to reduce QXDM Log Size Currently in SAP cases, logging is huge and hence failure logs are getting overwritten very fast within 2mins itself. Fix it to delete the some irrelevant log prints. Change-Id: I90a77ba9348b84eb7e5c3518391f7c98a04bb39f CRs-Fixed: 2169101 --- core/hdd/src/wlan_hdd_assoc.c | 5 +++-- core/mac/src/pe/lim/lim_api.c | 18 ------------------ .../mac/src/pe/lim/lim_process_message_queue.c | 10 ++++++---- core/mac/src/pe/lim/lim_scan_result_utils.c | 18 ++++++------------ core/mac/src/pe/lim/lim_session.c | 2 -- core/mac/src/pe/lim/lim_utils.c | 2 -- .../src/sys/legacy/src/utils/src/parser_api.c | 6 +----- core/sap/src/sap_api_link_cntl.c | 11 ++++++----- core/sap/src/sap_fsm.c | 1 - core/sme/src/csr/csr_api_roam.c | 2 -- core/wma/src/wma_mgmt.c | 12 ++++++------ 11 files changed, 28 insertions(+), 59 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 96968489feee..00a51cdbc751 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -4438,8 +4438,9 @@ hdd_sme_roam_callback(void *pContext, struct csr_roam_info *roam_info, struct cfg80211_bss *bss_status; struct hdd_context *hdd_ctx; - hdd_debug("CSR Callback: status= %d result= %d roamID=%d", - roamStatus, roamResult, roamId); + if (eCSR_ROAM_UPDATE_SCAN_RESULT != roamStatus) + hdd_debug("CSR Callback: status= %d result= %d roamID=%d", + roamStatus, roamResult, roamId); /* Sanity check */ if ((NULL == adapter) || (WLAN_HDD_ADAPTER_MAGIC != adapter->magic)) { diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 23f50dd286b5..b97fd291f5db 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -1181,24 +1181,6 @@ static QDF_STATUS pe_handle_mgmt_frame(struct wlan_objmgr_psoc *psoc, */ mHdr = WMA_GET_RX_MAC_HEADER(pRxPacketInfo); - if (mHdr->fc.type == SIR_MAC_MGMT_FRAME) { - pe_debug("RxBd: %pK mHdr: %pK Type: %d Subtype: %d SizesFC: %zu Mgmt: %zu", - pRxPacketInfo, mHdr, mHdr->fc.type, mHdr->fc.subType, - sizeof(tSirMacFrameCtl), sizeof(tSirMacMgmtHdr)); - - pe_debug("mpdu_len: %d hdr_len: %d data_len: %d", - WMA_GET_RX_MPDU_LEN(pRxPacketInfo), - WMA_GET_RX_MPDU_HEADER_LEN(pRxPacketInfo), - WMA_GET_RX_PAYLOAD_LEN(pRxPacketInfo)); - - if (WMA_GET_ROAMCANDIDATEIND(pRxPacketInfo)) - pe_debug("roamCandidateInd: %d", - WMA_GET_ROAMCANDIDATEIND(pRxPacketInfo)); - - if (WMA_GET_OFFLOADSCANLEARN(pRxPacketInfo)) - pe_debug("offloadScanLearn: %d", - WMA_GET_OFFLOADSCANLEARN(pRxPacketInfo)); - } if (QDF_STATUS_SUCCESS != pe_drop_pending_rx_mgmt_frames(pMac, mHdr, pVosPkt)) diff --git a/core/mac/src/pe/lim/lim_process_message_queue.c b/core/mac/src/pe/lim/lim_process_message_queue.c index 2887765fb836..b7e3b18552bd 100644 --- a/core/mac/src/pe/lim/lim_process_message_queue.c +++ b/core/mac/src/pe/lim/lim_process_message_queue.c @@ -1444,10 +1444,12 @@ static void lim_process_messages(tpAniSirGlobal mac_ctx, cds_pkt_return_packet(body_ptr); break; } - - pe_debug("roamCandidateInd: %d offloadScanLearn: %d", - WMA_GET_ROAMCANDIDATEIND(new_msg.bodyptr), - WMA_GET_OFFLOADSCANLEARN(new_msg.bodyptr)); + if (WMA_GET_ROAMCANDIDATEIND(new_msg.bodyptr)) + pe_debug("roamCandidateInd: %d", + WMA_GET_ROAMCANDIDATEIND(new_msg.bodyptr)); + if (WMA_GET_OFFLOADSCANLEARN(new_msg.bodyptr)) + pe_debug("offloadScanLearn: %d", + WMA_GET_OFFLOADSCANLEARN(new_msg.bodyptr)); lim_handle80211_frames(mac_ctx, &new_msg, &defer_msg); diff --git a/core/mac/src/pe/lim/lim_scan_result_utils.c b/core/mac/src/pe/lim/lim_scan_result_utils.c index e8839db9cb3d..61fa545a02f1 100644 --- a/core/mac/src/pe/lim/lim_scan_result_utils.c +++ b/core/mac/src/pe/lim/lim_scan_result_utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -172,14 +172,11 @@ lim_collect_bss_description(tpAniSirGlobal pMac, pBssDescr->tsf_delta = WMA_GET_RX_TSF_DELTA(pRxPacketInfo); pBssDescr->seq_ctrl = pHdr->seqControl; - pe_debug("BSSID: "MAC_ADDRESS_STR " tsf_delta: %u ReceivedTime: %llu ssid: %s", - MAC_ADDR_ARRAY(pHdr->bssId), pBssDescr->tsf_delta, - pBssDescr->received_time, - ((pBPR->ssidPresent) ? (char *)pBPR->ssId.ssId : "")); - - pe_debug("Seq Ctrl: Frag Num: %d Seq Num: LO: %02x HI: %02x", - pBssDescr->seq_ctrl.fragNum, pBssDescr->seq_ctrl.seqNumLo, - pBssDescr->seq_ctrl.seqNumHi); + pe_debug("Received %s from BSSID: %pM tsf_delta = %u Seq Num: %x ssid:%.*s, rssi: %d", + pBssDescr->fProbeRsp ? "Probe Rsp" : "Beacon", pHdr->bssId, + pBssDescr->tsf_delta, ((pHdr->seqControl.seqNumHi << + HIGH_SEQ_NUM_OFFSET) | pHdr->seqControl.seqNumLo), + pBPR->ssId.length, pBPR->ssId.ssId, pBssDescr->rssi_raw); if (fScanning) { rrm_get_start_tsf(pMac, pBssDescr->startTSF); @@ -214,9 +211,6 @@ lim_collect_bss_description(tpAniSirGlobal pMac, /*set channel number in beacon in case it is not present */ pBPR->channelNumber = pBssDescr->channelId; - - pe_debug("Collected BSS Description for Channel: %1d length: %u IE Fields: %u", - pBssDescr->channelId, pBssDescr->length, ieLen); pMac->lim.beacon_probe_rsp_cnt_per_scan++; return; diff --git a/core/mac/src/pe/lim/lim_session.c b/core/mac/src/pe/lim/lim_session.c index 9f7460b63221..e30a5ee47822 100644 --- a/core/mac/src/pe/lim/lim_session.c +++ b/core/mac/src/pe/lim/lim_session.c @@ -568,8 +568,6 @@ tpPESession pe_find_session_by_bssid(tpAniSirGlobal pMac, uint8_t *bssid, } } - pe_debug("Session lookup fails for BSSID:"); - lim_print_mac_addr(pMac, bssid, LOGD); return NULL; } diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index e27e91a6c186..45ce7527e11b 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -5260,7 +5260,6 @@ tSirNwType lim_get_nw_type(tpAniSirGlobal pMac, uint8_t channelNum, uint32_t typ } } if (pBeacon->extendedRatesPresent) { - pe_debug("Beacon, nwtype: G"); nwType = eSIR_11G_NW_TYPE; } else if (pBeacon->HTInfo.present || IS_BSS_VHT_CAPABLE(pBeacon->VHTCaps)) { @@ -5268,7 +5267,6 @@ tSirNwType lim_get_nw_type(tpAniSirGlobal pMac, uint8_t channelNum, uint32_t typ } } else { /* 11a packet */ - pe_debug("Beacon, nwtype: A"); nwType = eSIR_11A_NW_TYPE; } } diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c index fe5f1fa84000..370661e95494 100644 --- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c +++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c @@ -4229,7 +4229,7 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac, pBeaconStruct->channelNumber = pBeacon->HTInfo.primaryChannel; } else { pBeaconStruct->channelNumber = mappedRXCh; - pe_debug("Channel info is not present in Beacon"); + pe_debug_rate_limited(30, "In Beacon No Channel info"); } if (pBeacon->RSN.present) { @@ -4330,7 +4330,6 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac, if (pBeacon->vendor_vht_ie.present) { pBeaconStruct->vendor_vht_ie.sub_type = pBeacon->vendor_vht_ie.sub_type; - pe_debug("Vendor Specific VHT caps present in Beacon Frame!"); } if (pBeacon->vendor_vht_ie.VHTCaps.present) { @@ -4345,9 +4344,6 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac, } /* Update HS 2.0 Information Element */ if (pBeacon->hs20vendor_ie.present) { - pe_debug("HS20 Indication Element Present, rel#:%u, id:%u", - pBeacon->hs20vendor_ie.release_num, - pBeacon->hs20vendor_ie.hs_id_present); qdf_mem_copy(&pBeaconStruct->hs20vendor_ie, &pBeacon->hs20vendor_ie, sizeof(tDot11fIEhs20vendor_ie) - diff --git a/core/sap/src/sap_api_link_cntl.c b/core/sap/src/sap_api_link_cntl.c index 08c03548a21c..ef0b0aaa5945 100644 --- a/core/sap/src/sap_api_link_cntl.c +++ b/core/sap/src/sap_api_link_cntl.c @@ -919,8 +919,12 @@ wlansap_roam_callback(void *ctx, struct csr_roam_info *csr_roam_info, } mac_ctx = PMAC_STRUCT(hal); - QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, - FL("Before switch on roam_status = %d"), roam_status); + if (eCSR_ROAM_UPDATE_SCAN_RESULT != roam_status) { + QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, + FL("roam_status = %d, roam_result = %d"), + roam_status, roam_result); + } + switch (roam_status) { case eCSR_ROAM_INFRA_IND: QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, @@ -1097,9 +1101,6 @@ wlansap_roam_callback(void *ctx, struct csr_roam_info *csr_roam_info, break; } - QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, - FL("Before switch on roam_result = %d"), roam_result); - switch (roam_result) { case eCSR_ROAM_RESULT_INFRA_ASSOCIATION_IND: wlansap_roam_process_infra_assoc_ind(sap_ctx, roam_result, diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index bec43406c67a..d45d3165330e 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -2316,7 +2316,6 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx, FL("Invalid MAC context")); return QDF_STATUS_E_FAILURE; } - QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, FL("SAP event callback event = %s"), sap_hdd_event_to_string(sap_hddevent)); diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 20b49b0b2a8b..a254eeb4341b 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -3919,8 +3919,6 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId, return QDF_STATUS_E_FAILURE; } - sme_debug("Received RoamCmdStatus %d with Roam Result %d", u1, u2); - if (eCSR_ROAM_ASSOCIATION_COMPLETION == u1 && eCSR_ROAM_RESULT_ASSOCIATED == u2 && roam_info) { sme_info("Assoc complete result: %d status: %d reason: %d", diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index 8d3c03e32db8..4261386a4b9b 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -3710,16 +3710,16 @@ int wma_form_rx_packet(qdf_nbuf_t buf, rx_pkt->pkt_meta.tsf_delta = mgmt_rx_params->tsf_delta; rx_pkt->pkt_buf = buf; - WMA_LOGD(FL("BSSID: "MAC_ADDRESS_STR" snr = %d, rssi = %d, rssi_raw = %d tsf_delta: %u"), - MAC_ADDR_ARRAY(wh->i_addr3), - mgmt_rx_params->snr, rx_pkt->pkt_meta.rssi, - rx_pkt->pkt_meta.rssi_raw, - mgmt_rx_params->tsf_delta); - /* If it is a beacon/probe response, save it for future use */ mgt_type = (wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK; mgt_subtype = (wh)->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; + WMA_LOGD(FL("BSSID: "MAC_ADDRESS_STR" snr = %d, Type = %x, Subtype = %x, seq_num = %u, rssi = %d, rssi_raw = %d tsf_delta: %u"), + MAC_ADDR_ARRAY(wh->i_addr3), + mgmt_rx_params->snr, mgt_type, mgt_subtype, + *(uint16_t *)wh->i_seq, rx_pkt->pkt_meta.rssi, + rx_pkt->pkt_meta.rssi_raw, mgmt_rx_params->tsf_delta); + if (mgt_type == IEEE80211_FC0_TYPE_MGT && (mgt_subtype == IEEE80211_FC0_SUBTYPE_DISASSOC || mgt_subtype == IEEE80211_FC0_SUBTYPE_DEAUTH ||