summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSreelakshmi Konamki <skonam@codeaurora.org>2016-12-08 12:32:01 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-12-12 12:24:46 -0800
commitaee79b091c5dc12341cdd5e7551b3e3f2b54780c (patch)
tree7a10188dc372a7ffceaf45b828b5c58160c93d0d
parent6968e25a2c60f6def389f7155806885eabc510ac (diff)
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
-rw-r--r--core/mac/inc/ani_global.h1
-rw-r--r--core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c13
-rw-r--r--core/mac/src/pe/lim/lim_process_sme_req_messages.c1
-rw-r--r--core/mac/src/pe/lim/lim_scan_result_utils.c1
-rw-r--r--core/mac/src/pe/lim/lim_utils.h4
5 files changed, 17 insertions, 3 deletions
diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h
index aeef08462450..b6b0c248d33a 100644
--- a/core/mac/inc/ani_global.h
+++ b/core/mac/inc/ani_global.h
@@ -823,6 +823,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 {
diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
index 5303a9019587..3b6babaaf348 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
+++ b/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,
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index fcf99578396b..d8de662a5611 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -1367,6 +1367,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,
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 81db887c7e91..3cdd1d5d4253 100644
--- a/core/mac/src/pe/lim/lim_scan_result_utils.c
+++ b/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() ***/
diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h
index c8d0942d37fc..9f65755cd3cd 100644
--- a/core/mac/src/pe/lim/lim_utils.h
+++ b/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;