Jelajahi Sumber

qcacld-3.0: Log optimization for beacon report

Currently there are unnecessary/duplicate logging. Identify and
reduce those logs that are not necessary.

Change-Id: I5473db8cf2406aa6aa2f8531cf5a0cc8b7bd2188
CRs-Fixed: 2614121
sheenam monga 5 tahun lalu
induk
melakukan
724306fbed

+ 2 - 2
core/mac/src/pe/lim/lim_process_action_frame.c

@@ -1317,8 +1317,8 @@ __lim_process_radio_measure_request(struct mac_context *mac, uint8_t *pRxPacketI
 				   pBody, frameLen);
 		goto err;
 	} else if (DOT11F_WARNED(nStatus)) {
-		pe_debug("There were warnings while unpacking a Radio Measure request (0x%08x, %d bytes):",
-			nStatus, frameLen);
+		pe_debug("Warnings while unpacking a Radio Measure request (0x%08x, %d bytes):",
+			 nStatus, frameLen);
 	}
 	/* Call rrm function to handle the request. */
 

+ 10 - 15
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -4523,7 +4523,7 @@ lim_send_radio_measure_report_action_frame(struct mac_context *mac,
 		return QDF_STATUS_E_NOMEM;
 
 	if (!pe_session) {
-		pe_err("(!psession) in Request to send Beacon Report action frame");
+		pe_err("session not found");
 		qdf_mem_free(frm);
 		return QDF_STATUS_E_FAILURE;
 	}
@@ -4586,7 +4586,7 @@ lim_send_radio_measure_report_action_frame(struct mac_context *mac,
 		qdf_mem_free(frm);
 		return QDF_STATUS_E_FAILURE;
 	} else if (DOT11F_WARNED(nStatus)) {
-		pe_warn("There were warnings while calculating the packed size for a Radio Measure Report (0x%08x)",
+		pe_warn("Warnings while calculating the size for Radio Measure Report (0x%08x)",
 			nStatus);
 	}
 
@@ -4630,22 +4630,17 @@ lim_send_radio_measure_report_action_frame(struct mac_context *mac,
 		status_code = QDF_STATUS_E_FAILURE;
 		goto returnAfterError;
 	} else if (DOT11F_WARNED(nStatus)) {
-		pe_warn("There were warnings while packing Radio Measure Report (0x%08x)",
+		pe_warn("Warnings while packing Radio Measure Report (0x%08x)",
 			nStatus);
 	}
 
-	pe_debug("Sending Radio Measure Report to %pM", peer);
-	if (frm->MeasurementReport[0].type == SIR_MAC_RRM_BEACON_TYPE)
-		pe_nofl_info("TX: [802.11 BCN_RPT] seq_no:%d dialog_token:%d no. of APs:%d is_last_rpt:%d",
-			     (pMacHdr->seqControl.seqNumHi << HIGH_SEQ_NUM_OFFSET |
-			      pMacHdr->seqControl.seqNumLo),
-			     dialog_token, frm->num_MeasurementReport,
-			     is_last_report);
-	else
-		pe_nofl_info("TX: [802.11 RRM] seq_no:%d dialog_token %d num_report %d is_last_frm %d",
-			     (pMacHdr->seqControl.seqNumHi << HIGH_SEQ_NUM_OFFSET |
-			      pMacHdr->seqControl.seqNumLo),
-			     dialog_token, num_report, is_last_frame);
+	pe_nofl_info("TX: %s seq_no:%d dialog_token:%d no. of APs:%d is_last_rpt:%d num_report: %d peer:%pM",
+		     frm->MeasurementReport[0].type == SIR_MAC_RRM_BEACON_TYPE ?
+		     "[802.11 BCN_RPT]" : "[802.11 RRM]",
+		     (pMacHdr->seqControl.seqNumHi << HIGH_SEQ_NUM_OFFSET |
+		     pMacHdr->seqControl.seqNumLo),
+		     dialog_token, frm->num_MeasurementReport,
+		     is_last_report, num_report, peer);
 
 	if (wlan_reg_is_5ghz_ch_freq(pe_session->curr_op_freq) ||
 	    pe_session->opmode == QDF_P2P_CLIENT_MODE ||

+ 8 - 29
core/mac/src/pe/rrm/rrm_api.c

@@ -540,16 +540,13 @@ rrm_process_beacon_report_req(struct mac_context *mac,
 		qdf_snprintf(req_ssid, WLAN_SSID_MAX_LEN, "%s",
 			     pBeaconReq->measurement_request.Beacon.SSID.ssid);
 
-	pe_nofl_info("RX: [802.11 BCN_RPT] SSID:%s BSSID:%pM Token:%d op_class:%d ch:%d meas_mode:%d meas_duration:%d",
+	pe_nofl_info("RX: [802.11 BCN_RPT] SSID:%s BSSID:%pM Token:%d op_class:%d ch:%d meas_mode:%d meas_duration:%d max_dur: %d sign: %d max_meas_dur: %d",
 		     req_ssid, pBeaconReq->measurement_request.Beacon.BSSID,
 		     pBeaconReq->measurement_token,
 		     pBeaconReq->measurement_request.Beacon.regClass,
 		     pBeaconReq->measurement_request.Beacon.channel,
 		     pBeaconReq->measurement_request.Beacon.meas_mode,
-		     measDuration);
-
-	pe_debug("RX: [802.11 BCN_RPT] max_dur: %d sign: %d max_meas_dur: %d",
-		 maxDuration, sign, maxMeasduration);
+		     measDuration, maxDuration, sign, maxMeasduration);
 
 	if (measDuration == 0 &&
 	    pBeaconReq->measurement_request.Beacon.meas_mode !=
@@ -603,11 +600,6 @@ rrm_process_beacon_report_req(struct mac_context *mac,
 			     pBeaconReq->measurement_request.Beacon.
 			     RequestedInfo.requested_eids,
 			     pCurrentReq->request.Beacon.reqIes.num);
-		pe_debug("RX: [802.11 BCN_RPT] Requested EIDs:[%d]",
-			 pCurrentReq->request.Beacon.reqIes.num);
-		QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
-			   pCurrentReq->request.Beacon.reqIes.pElementIds,
-			   pCurrentReq->request.Beacon.reqIes.num);
 	}
 
 	/* Prepare the request to send to SME. */
@@ -778,24 +770,16 @@ rrm_fill_beacon_ies(struct mac_context *mac, uint8_t *pIes,
 		pe_debug("EID = %d, len = %d total = %d",
 			*pBcnIes, *(pBcnIes + 1), len);
 
-		if (BcnNumIes < len) {
+		if (BcnNumIes < len || len <= 2) {
 			pe_err("RRM: Invalid IE len:%d exp_len:%d",
 			       len, BcnNumIes);
 			break;
 		}
 
-		if (len <= 2) {
-			pe_err("RRM: Invalid IE");
-			break;
-		}
-
 		i = 0;
 		do {
 			if ((!eids) || (*pBcnIes == eids[i])) {
 				if (((*pNumIes) + len) < pIesMaxSize) {
-					pe_debug("Adding Eid %d, len=%d",
-						 *pBcnIes, len);
-
 					qdf_mem_copy(pIes, pBcnIes, len);
 					pIes += len;
 					*pNumIes += len;
@@ -938,15 +922,14 @@ rrm_process_beacon_report_xmit(struct mac_context *mac_ctx,
 					bss_desc->bssId, sizeof(tSirMacAddr));
 			}
 
+			pe_debug("TX: [802.11 BCN_RPT] reporting detail requested %d",
+				 curr_req->request.Beacon.reportingDetail);
 			switch (curr_req->request.Beacon.reportingDetail) {
 			case BEACON_REPORTING_DETAIL_NO_FF_IE:
 				/* 0: No need to include any elements. */
-				pe_debug("TX: [802.11 BCN_RPT] No reporting detail requested");
 				break;
 			case BEACON_REPORTING_DETAIL_ALL_FF_REQ_IE:
 				/* 1: Include all FFs and Requested Ies. */
-				pe_debug("TX: [802.11 BCN_RPT] Only requested IEs in reporting detail requested");
-
 				if (!bss_desc)
 					break;
 
@@ -962,7 +945,6 @@ rrm_process_beacon_report_xmit(struct mac_context *mac_ctx,
 			case BEACON_REPORTING_DETAIL_ALL_FF_IE:
 				/* 2: default - Include all FFs and all Ies. */
 			default:
-				pe_debug("TX: [802.11 BCN_RPT] Default all IEs and FFs");
 				if (!bss_desc)
 					break;
 
@@ -1020,9 +1002,6 @@ rrm_process_beacon_report_xmit(struct mac_context *mac_ctx,
 		for (j = 0; j < num_frames; j++) {
 			num_reports_in_frame = QDF_MIN((i - report_index),
 						RADIO_REPORTS_MAX_IN_A_FRAME);
-
-			pe_debug("TX: [802.11 BCN_RPT] Sending Action frame number %d",
-				 num_reports_in_frame);
 			lim_send_radio_measure_report_action_frame(mac_ctx,
 				curr_req->dialog_token, num_reports_in_frame,
 				(j == num_frames - 1) ? true : false,
@@ -1038,7 +1017,7 @@ end:
 		qdf_mem_free(beacon_xmit_ind->pBssDescription[counter]);
 
 	if (beacon_xmit_ind->fMeasureDone) {
-		pe_debug("Measurement done....cleanup the context");
+		pe_debug("Measurement done.");
 		rrm_cleanup(mac_ctx);
 	}
 
@@ -1072,8 +1051,7 @@ static void rrm_process_beacon_request_failure(struct mac_context *mac,
 		pReport->incapable = 1;
 		break;
 	default:
-		pe_err("RX [802.11 BCN_RPT] Beacon request processing failed no report sent with status %d",
-		       status);
+		pe_err("RX [802.11 BCN_RPT] Beacon request processing failed no report sent");
 		qdf_mem_free(pReport);
 		return;
 	}
@@ -1154,6 +1132,7 @@ QDF_STATUS rrm_process_beacon_req(struct mac_context *mac_ctx, tSirMacAddr peer,
 			rrm_cleanup(mac_ctx);
 		}
 	}
+
 	return QDF_STATUS_SUCCESS;
 }
 

+ 8 - 10
core/sme/src/rrm/sme_rrm.c

@@ -1058,11 +1058,10 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(struct mac_context *mac,
 	else
 		country[2] = OP_CLASS_GLOBAL;
 
-	sme_debug("Channel = %d", beacon_req->channel_info.chan_num);
-
-	sme_debug("Request Reg class %d, AP's country code %c%c 0x%x",
+	sme_debug("Request Reg class %d, AP's country code %c%c 0x%x, channel = %d",
 		  beacon_req->channel_info.reg_class,
-		  country[0], country[1], country[2]);
+		  country[0], country[1], country[2],
+		  beacon_req->channel_info.chan_num);
 
 	if (beacon_req->channel_list.num_channels > SIR_ESE_MAX_MEAS_IE_REQS) {
 		sme_err("Beacon report request numChannels:%u exceeds max num channels",
@@ -1185,12 +1184,11 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(struct mac_context *mac,
 		     (uint8_t *)&beacon_req->measurementDuration,
 		     SIR_ESE_MAX_MEAS_IE_REQS);
 
-	sme_debug("token: %d regClass: %d randnIntvl: %d msgSource: %d measurementduration %d, rrm_ctx duration %d Meas_mode: %s",
-		sme_rrm_ctx->token, sme_rrm_ctx->regClass,
-		sme_rrm_ctx->randnIntvl, sme_rrm_ctx->msgSource,
-		beacon_req->measurementDuration[0],
-		sme_rrm_ctx->duration[0],
-		sme_rrm_get_meas_mode_string(sme_rrm_ctx->measMode[0]));
+	sme_debug("token: %d randnIntvl: %d msgSource: %d measurementduration %d, rrm_ctx duration %d Meas_mode: %s",
+		  sme_rrm_ctx->token, sme_rrm_ctx->randnIntvl,
+		  sme_rrm_ctx->msgSource, beacon_req->measurementDuration[0],
+		  sme_rrm_ctx->duration[0],
+		  sme_rrm_get_meas_mode_string(sme_rrm_ctx->measMode[0]));
 
 	return sme_rrm_issue_scan_req(mac);