summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/utils/host_diag_log/inc/host_diag_core_event.h52
-rw-r--r--core/utils/host_diag_log/inc/host_diag_event_defs.h3
-rw-r--r--core/wma/src/wma_features.c46
3 files changed, 98 insertions, 3 deletions
diff --git a/core/utils/host_diag_log/inc/host_diag_core_event.h b/core/utils/host_diag_log/inc/host_diag_core_event.h
index fcac6fe4a1f6..b51bc27b9b22 100644
--- a/core/utils/host_diag_log/inc/host_diag_core_event.h
+++ b/core/utils/host_diag_log/inc/host_diag_core_event.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -214,6 +214,56 @@ typedef struct {
} host_event_wlan_powersave_wow_payload_type;
/*-------------------------------------------------------------------------
+ Event ID: EVENT_WLAN_POWERSAVE_WOW_STATS
+ ------------------------------------------------------------------------*/
+/**
+ * host_event_wlan_powersave_wow_stats - Structure holding wow stats information
+ * @wow_ucast_wake_up_count: wow unicast packet wakeup count
+ * @wow_bcast_wake_up_count: wow broadcast packet wakeup count
+ * @wow_ipv4_mcast_wake_up_count: wow ipv4 multicast packet wakeup count
+ * @wow_ipv6_mcast_wake_up_count: wow ipv6 multicast packet wakeup count
+ * @wow_ipv6_mcast_ra_stats: wow ipv6 multicast router advertisement
+ * packet wakeup count
+ * @wow_ipv6_mcast_ns_stats: wow ipv6 multicast Neighbor Solicitation
+ * packet wakeup count
+ * @wow_ipv6_mcast_na_stats: wow ipv6 multicast address space
+ * packet wakeup count
+ * @wow_pno_match_wake_up_count: wow preferred network offload match
+ * packet wakeup count
+ * @wow_pno_complete_wake_up_count: wow preferred network offload complete
+ * packet wakeup count
+ * @wow_gscan_wake_up_count: wow external scan packet wakeup count
+ * @wow_low_rssi_wake_up_count: wow low rssi packet wakeup count
+ * @wow_rssi_breach_wake_up_count: wow rssi breach packet wakeup count
+ * @wow_icmpv4_count: wow icmpv4 packet count
+ * @wow_icmpv6_count: wow icmpv6 packet count
+ * @wow_oem_response_wake_up_count: wow oem response packet wakeup count
+ *
+ * This structure contains the wow stats information related to diag event
+ */
+struct host_event_wlan_powersave_wow_stats {
+ 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;
+};
+
+/*-------------------------------------------------------------------------
Event ID: EVENT_WLAN_BTC
------------------------------------------------------------------------*/
typedef struct {
diff --git a/core/utils/host_diag_log/inc/host_diag_event_defs.h b/core/utils/host_diag_log/inc/host_diag_event_defs.h
index 31066ab00460..ab5989f76224 100644
--- a/core/utils/host_diag_log/inc/host_diag_event_defs.h
+++ b/core/utils/host_diag_log/inc/host_diag_event_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -122,6 +122,7 @@ typedef enum {
*/
EVENT_WLAN_TDLS_TX_RX_MGMT = 0xABA,
EVENT_WLAN_LOW_RESOURCE_FAILURE = 0xABB,
+ EVENT_WLAN_POWERSAVE_WOW_STATS = 0xB33,
EVENT_MAX_ID = 0x0FFF
} event_id_enum_type;
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 98dd4fbfef53..f9fd707f4f60 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -114,6 +114,49 @@ static const uint8_t ns_ptrn[] = {0x86, 0xDD};
static const uint8_t discvr_ptrn[] = {0xe0, 0x00, 0x00, 0xf8};
static const uint8_t discvr_mask[] = {0xf0, 0x00, 0x00, 0xf8};
+#ifdef FEATURE_WLAN_DIAG_SUPPORT
+/**
+ * qdf_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 qdf_wma_wow_wakeup_stats_event(tp_wma_handle wma)
+{
+ WLAN_HOST_DIAG_EVENT_DEF(WowStats,
+ struct host_event_wlan_powersave_wow_stats);
+ qdf_mem_zero(&WowStats, sizeof(WowStats));
+
+ 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_HOST_DIAG_EVENT_REPORT(&WowStats, EVENT_WLAN_POWERSAVE_WOW_STATS);
+}
+#else
+static void qdf_wma_wow_wakeup_stats_event(tp_wma_handle wma)
+{
+ return;
+}
+#endif
+
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
/**
* wma_post_auto_shutdown_msg() - to post auto shutdown event to sme
@@ -3177,6 +3220,7 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
wma_wow_wake_reason_str(wake_info->wake_reason),
wake_info->wake_reason, wake_info->vdev_id);
qdf_wow_wakeup_host_event(wake_info->wake_reason);
+ qdf_wma_wow_wakeup_stats_event(wma);
}
qdf_event_set(&wma->wma_resume_event);