summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSen, Devendra <dsen@codeaurora.org>2016-11-09 13:32:05 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-12-07 22:02:30 -0800
commit452fbc7454da85cc055cb00b3c20a0cbf021516b (patch)
treea170434b46d6c130fdaabf50ec7360964c1f868f
parent828e43c976d9d81c05612349d9258833b101c80d (diff)
qcacld-2.0: Add host diag events for wow stats
Add diag event for wow packet counters stats. The event EVENT_WLAN_POWERSAVE_WOW_STATS will be used to inform the wow stats packet counters. Change-Id: I143f55ef26803fe060831458cee854e4e00e7870 CRs-Fixed: 1087714
-rw-r--r--CORE/SERVICES/WMA/wma.c46
-rw-r--r--CORE/VOSS/inc/event_defs.h2
-rw-r--r--CORE/VOSS/inc/vos_diag_core_event.h26
3 files changed, 74 insertions, 0 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index a534a25bc5b8..f20e3e6b7b69 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -222,6 +222,51 @@ static int wma_nlo_scan_cmp_evt_handler(void *handle, u_int8_t *event,
#endif
static enum powersave_qpower_mode wma_get_qpower_config(tp_wma_handle wma);
+
+#ifdef FEATURE_WLAN_DIAG_SUPPORT
+/**
+ * wma_wow_wakeup_stats_event()- send wow wakeup stats
+ * tp_wma_handle wma: WOW wakeup packet counter
+ *
+ * This function sends wow wakeup stats diag event
+ *
+ * Return: void.
+ */
+static void wma_wow_wakeup_stats_event(tp_wma_handle wma)
+{
+ WLAN_VOS_DIAG_EVENT_DEF(WowStats,
+ vos_event_wlan_powersave_wow_stats);
+ vos_mem_zero(&WowStats, sizeof(WowStats));
+
+ WowStats.wow_ucast_wake_up_count = wma->wow_ucast_wake_up_count;
+ WowStats.wow_bcast_wake_up_count = wma->wow_bcast_wake_up_count;
+ WowStats.wow_ipv4_mcast_wake_up_count =
+ wma->wow_ipv4_mcast_wake_up_count;
+ WowStats.wow_ipv6_mcast_wake_up_count =
+ wma->wow_ipv6_mcast_wake_up_count;
+ WowStats.wow_ipv6_mcast_ra_stats = wma->wow_ipv6_mcast_ra_stats;
+ WowStats.wow_ipv6_mcast_ns_stats = wma->wow_ipv6_mcast_ns_stats;
+ WowStats.wow_ipv6_mcast_na_stats = wma->wow_ipv6_mcast_na_stats;
+ WowStats.wow_pno_match_wake_up_count = wma->wow_pno_match_wake_up_count;
+ WowStats.wow_pno_complete_wake_up_count =
+ wma->wow_pno_complete_wake_up_count;
+ WowStats.wow_gscan_wake_up_count = wma->wow_gscan_wake_up_count;
+ WowStats.wow_low_rssi_wake_up_count = wma->wow_low_rssi_wake_up_count;
+ WowStats.wow_rssi_breach_wake_up_count =
+ wma->wow_rssi_breach_wake_up_count;
+ WowStats.wow_icmpv4_count = wma->wow_icmpv4_count;
+ WowStats.wow_icmpv6_count = wma->wow_icmpv6_count;
+ WowStats.wow_oem_response_wake_up_count =
+ wma->wow_oem_response_wake_up_count;
+ WLAN_VOS_DIAG_EVENT_REPORT(&WowStats, EVENT_WLAN_POWERSAVE_WOW_STATS);
+}
+#else
+static void wma_wow_wakeup_stats_event(tp_wma_handle wma)
+{
+ return;
+}
+#endif
+
#ifdef FEATURE_WLAN_EXTSCAN
/**
* enum extscan_report_events_type - extscan report events type
@@ -22627,6 +22672,7 @@ static int wma_wow_wakeup_host_event(void *handle, u_int8_t *event,
wake_info->wake_reason,
wake_info->vdev_id);
vos_wow_wakeup_host_event(wake_info->wake_reason);
+ wma_wow_wakeup_stats_event(wma);
}
vos_event_set(&wma->wma_resume_event);
diff --git a/CORE/VOSS/inc/event_defs.h b/CORE/VOSS/inc/event_defs.h
index ca570d8e9d1b..a140ff587305 100644
--- a/CORE/VOSS/inc/event_defs.h
+++ b/CORE/VOSS/inc/event_defs.h
@@ -1913,6 +1913,8 @@ typedef enum
EVENT_TDLS_SCAN_BLOCK = 0xAB9,
EVENT_WLAN_TDLS_TX_RX_MGMT = 0xABA,
EVENT_WLAN_LOW_RESOURCE_FAILURE = 0xABB,
+ EVENT_WLAN_POWERSAVE_WOW_STATS = 0xB33,
+
EVENT_NEXT_UNUSED_EVENT,
EVENT_RSVD_START = 0x0800,
diff --git a/CORE/VOSS/inc/vos_diag_core_event.h b/CORE/VOSS/inc/vos_diag_core_event.h
index 529b09c74199..7525abb95334 100644
--- a/CORE/VOSS/inc/vos_diag_core_event.h
+++ b/CORE/VOSS/inc/vos_diag_core_event.h
@@ -231,6 +231,32 @@ typedef struct
} vos_event_wlan_powersave_wow_payload_type;
/*-------------------------------------------------------------------------
+ Event ID: EVENT_WLAN_POWERSAVE_WOW_STATS
+ ------------------------------------------------------------------------*/
+typedef struct
+{
+ uint32_t wow_ucast_wake_up_count;
+ uint32_t wow_bcast_wake_up_count;
+ uint32_t wow_ipv4_mcast_wake_up_count;
+ uint32_t wow_ipv6_mcast_wake_up_count;
+ uint32_t wow_ipv6_mcast_ra_stats;
+ uint32_t wow_ipv6_mcast_ns_stats;
+ uint32_t wow_ipv6_mcast_na_stats;
+ uint32_t wow_pno_match_wake_up_count;
+ uint32_t wow_pno_complete_wake_up_count;
+ uint32_t wow_gscan_wake_up_count;
+ uint32_t wow_low_rssi_wake_up_count;
+ uint32_t wow_rssi_breach_wake_up_count;
+ uint32_t wow_icmpv4_count;
+ uint32_t wow_icmpv6_count;
+ uint32_t wow_oem_response_wake_up_count;
+ uint32_t Reserved_1;
+ uint32_t Reserved_2;
+ uint32_t Reserved_3;
+ uint32_t Reserved_4;
+} vos_event_wlan_powersave_wow_stats;
+
+/*-------------------------------------------------------------------------
Event ID: EVENT_WLAN_BTC
------------------------------------------------------------------------*/
typedef struct