From 1b27cd093c80b8ed5619dd39a71d2aeffcd12844 Mon Sep 17 00:00:00 2001 From: "Poddar, Siddarth" Date: Mon, 4 Sep 2017 15:46:43 +0530 Subject: [PATCH] qcacld-3.0: Send data stall status diag event Add support in data stall detection event to send diag event to QXDM. CRs-Fixed: 2086176 Change-Id: Ifad03e0882ccce09a7bf90c8e560f24146690895 --- core/hdd/src/wlan_hdd_data_stall_detection.c | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/core/hdd/src/wlan_hdd_data_stall_detection.c b/core/hdd/src/wlan_hdd_data_stall_detection.c index 31dbd3fd76dd..b7f391795236 100644 --- a/core/hdd/src/wlan_hdd_data_stall_detection.c +++ b/core/hdd/src/wlan_hdd_data_stall_detection.c @@ -27,6 +27,29 @@ #include "cdp_txrx_misc.h" #include "ol_txrx_types.h" +#ifdef FEATURE_WLAN_DIAG_SUPPORT + +/** + * hdd_data_stall_send_event()- send data stall information + * @reason: data stall event subtype + * This Function sends data stall status diag event + * + * Return: void. + */ +static void hdd_data_stall_send_event(uint32_t reason) +{ + WLAN_HOST_DIAG_EVENT_DEF(sta_data_stall, + struct host_event_wlan_datastall); + qdf_mem_zero(&sta_data_stall, sizeof(sta_data_stall)); + sta_data_stall.reason = reason; + WLAN_HOST_DIAG_EVENT_REPORT(&sta_data_stall, EVENT_WLAN_STA_DATASTALL); +} +#else +static inline void hdd_data_stall_send_event(uint32_t reason) +{ +} +#endif + /** * hdd_data_stall_process_cb() - Process data stall message * @message: data stall message @@ -38,6 +61,7 @@ static void hdd_data_stall_process_cb( struct data_stall_event_info *data_stall_info) { + hdd_data_stall_send_event(data_stall_info->data_stall_type); } int hdd_register_data_stall_detect_cb(void)