瀏覽代碼

qcacld-3.0: Add scan_complete and scan_result_found diag events

Current implementation doesn't have diag events for SCAN_COMPLETE and
SCAN_RESULT_FOUND.

Fix to add SCAN_COMPLETE and SCAN_RESULT_FOUND diag events in PE

Change-Id: I8f3526eac5e1c323f62b0a4cff329db2dd8ef6b8
CRs-Fixed: 1096548
Sreelakshmi Konamki 8 年之前
父節點
當前提交
1bb6f31562

+ 1 - 0
core/mac/inc/ani_global.h

@@ -824,6 +824,7 @@ typedef struct sAniSirLim {
 		uint32_t scan_id, uint32_t flags);
 	uint8_t retry_packet_cnt;
 	uint8_t scan_disabled;
+	uint8_t beacon_probe_rsp_cnt_per_scan;
 } tAniSirLim, *tpAniSirLim;
 
 struct mgmt_frm_reg_info {

+ 12 - 1
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -3294,8 +3294,19 @@ void lim_process_rx_scan_event(tpAniSirGlobal pMac, void *buf)
 	switch (pScanEvent->event) {
 	case SIR_SCAN_EVENT_STARTED:
 		break;
-	case SIR_SCAN_EVENT_START_FAILED:
 	case SIR_SCAN_EVENT_COMPLETED:
+	lim_log(pMac, LOG1, FL("No.of beacons and probe response received per scan %d"),
+		pMac->lim.beacon_probe_rsp_cnt_per_scan);
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
+	lim_diag_event_report(pMac, WLAN_PE_DIAG_SCAN_COMPLETE_EVENT, NULL,
+			      eSIR_SUCCESS, eSIR_SUCCESS);
+	if (pMac->lim.beacon_probe_rsp_cnt_per_scan)
+		lim_diag_event_report(pMac,
+				      WLAN_PE_DIAG_SCAN_RESULT_FOUND_EVENT,
+				      NULL, eSIR_SUCCESS, eSIR_SUCCESS);
+#endif
+	/* Fall through */
+	case SIR_SCAN_EVENT_START_FAILED:
 		if (ROC_SCAN_REQUESTOR_ID == pScanEvent->requestor) {
 			lim_send_sme_roc_rsp(pMac, eWNI_SME_REMAIN_ON_CHN_RSP,
 					 QDF_STATUS_SUCCESS,

+ 1 - 0
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -1359,6 +1359,7 @@ static void __lim_process_sme_scan_req(tpAniSirGlobal mac_ctx,
 	lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_SCAN_REQ_EVENT, NULL,
 			      eSIR_SUCCESS, eSIR_SUCCESS);
 #endif
+	mac_ctx->lim.beacon_probe_rsp_cnt_per_scan = 0;
 
 	scan_req = (tpSirSmeScanReq) msg_buf;
 	lim_log(mac_ctx, LOG1,

+ 1 - 0
core/mac/src/pe/lim/lim_scan_result_utils.c

@@ -228,6 +228,7 @@ lim_collect_bss_description(tpAniSirGlobal pMac,
 	lim_log(pMac, LOG3,
 		FL("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;
 } /*** end lim_collect_bss_description() ***/

+ 2 - 2
core/mac/src/pe/lim/lim_utils.h

@@ -539,8 +539,8 @@ typedef enum {
 	WLAN_PE_DIAG_ROAM_AUTH_COMP_EVENT,
 	WLAN_PE_DIAG_ROAM_ASSOC_START_EVENT = 70,
 	WLAN_PE_DIAG_ROAM_ASSOC_COMP_EVENT,
-	RESERVED1, /* = 72 for SCAN_COMPLETE */
-	RESERVED2, /* = 73 for SCAN_RES_FOUND */
+	WLAN_PE_DIAG_SCAN_COMPLETE_EVENT,
+	WLAN_PE_DIAG_SCAN_RESULT_FOUND_EVENT,
 	WLAN_PE_DIAG_ASSOC_TIMEOUT,
 	WLAN_PE_DIAG_AUTH_TIMEOUT,
 } WLAN_PE_DIAG_EVENT_TYPE;