summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoddar, Siddarth <siddpodd@codeaurora.org>2016-12-21 18:36:30 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-01-06 20:49:33 -0800
commitb9177850f0a7f6156761eb4ef8d0f36c25d9212a (patch)
tree95c3250f8fb8dbc33a5ceec2fc15d2bcfaaa87c3
parent6eaf89ec1b2bd72551bb13a8975b4bd3f7d3a39c (diff)
qcacld-3.0: Extend Get wakelock stats
Extend the wakelock stats to include all wakeup reason counters. Included counters are: wow_rssi_breach_wake_up_count wow_low_rssi_wake_up_count wow_gscan_wake_up_count wow_pno_complete_wake_up_count wow_pno_match_wake_up_count propagation from qcacld-2.0 to qcacld-3.0 CRs-Fixed: 1097267 Change-Id: I2b95e294aae21fcf1e11b6b95a083268daa1acbd
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c35
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.h17
-rw-r--r--core/mac/inc/sir_api.h12
-rw-r--r--core/wma/src/wma_features.c10
4 files changed, 70 insertions, 4 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 42fdc7f98300..df3ef783c18b 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -7616,6 +7616,17 @@ static int wlan_hdd_cfg80211_sap_configuration_set(struct wiphy *wiphy,
QCA_WLAN_VENDOR_ATTR_ICMP6_RX_MULTICAST_CNT
#define PARAM_OTHER_RX_MULTICAST_CNT \
QCA_WLAN_VENDOR_ATTR_OTHER_RX_MULTICAST_CNT
+#define PARAM_RSSI_BREACH_CNT \
+ QCA_WLAN_VENDOR_ATTR_RSSI_BREACH_CNT
+#define PARAM_LOW_RSSI_CNT \
+ QCA_WLAN_VENDOR_ATTR_LOW_RSSI_CNT
+#define PARAM_GSCAN_CNT \
+ QCA_WLAN_VENDOR_ATTR_GSCAN_CNT
+#define PARAM_PNO_COMPLETE_CNT \
+ QCA_WLAN_VENDOR_ATTR_PNO_COMPLETE_CNT
+#define PARAM_PNO_MATCH_CNT \
+ QCA_WLAN_VENDOR_ATTR_PNO_MATCH_CNT
+
/**
@@ -7667,6 +7678,16 @@ static uint32_t hdd_send_wakelock_stats(hdd_context_t *hdd_ctx,
hdd_info("wow_icmpv4_count %d", data->wow_icmpv4_count);
hdd_info("wow_icmpv6_count %d",
data->wow_icmpv6_count);
+ hdd_info("wow_rssi_breach_wake_up_count %d",
+ data->wow_rssi_breach_wake_up_count);
+ hdd_info("wow_low_rssi_wake_up_count %d",
+ data->wow_low_rssi_wake_up_count);
+ hdd_info("wow_gscan_wake_up_count %d",
+ data->wow_gscan_wake_up_count);
+ hdd_info("wow_pno_complete_wake_up_count %d",
+ data->wow_pno_complete_wake_up_count);
+ hdd_info("wow_pno_match_wake_up_count %d",
+ data->wow_pno_match_wake_up_count);
ipv6_rx_multicast_addr_cnt =
data->wow_ipv6_mcast_wake_up_count;
@@ -7711,7 +7732,17 @@ static uint32_t hdd_send_wakelock_stats(hdd_context_t *hdd_ctx,
data->wow_ipv4_mcast_wake_up_count) ||
nla_put_u32(skb, PARAM_ICMP6_RX_MULTICAST_CNT,
ipv6_rx_multicast_addr_cnt) ||
- nla_put_u32(skb, PARAM_OTHER_RX_MULTICAST_CNT, 0)) {
+ nla_put_u32(skb, PARAM_OTHER_RX_MULTICAST_CNT, 0) ||
+ nla_put_u32(skb, PARAM_RSSI_BREACH_CNT,
+ data->wow_rssi_breach_wake_up_count) ||
+ nla_put_u32(skb, PARAM_LOW_RSSI_CNT,
+ data->wow_low_rssi_wake_up_count) ||
+ nla_put_u32(skb, PARAM_GSCAN_CNT,
+ data->wow_gscan_wake_up_count) ||
+ nla_put_u32(skb, PARAM_PNO_COMPLETE_CNT,
+ data->wow_pno_complete_wake_up_count) ||
+ nla_put_u32(skb, PARAM_PNO_MATCH_CNT,
+ data->wow_pno_match_wake_up_count)) {
hdd_err("nla put fail");
goto nla_put_failure;
}
diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h
index b02a32527232..c40ec297b9a7 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.h
+++ b/core/hdd/src/wlan_hdd_cfg80211.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -2710,6 +2710,16 @@ enum qca_wlan_vendor_attr_packet_filter {
* Rx wake packet count due to ipv6 multicast
* @QCA_WLAN_VENDOR_ATTR_OTHER_RX_MULTICAST_CNT:
* Rx wake packet count due to non-ipv4 and non-ipv6 packets
+ * @QCA_WLAN_VENDOR_ATTR_RSSI_BREACH_CNT:
+ * wake rssi breach packet count
+ * @QCA_WLAN_VENDOR_ATTR_LOW_RSSI_CNT:
+ * wake low rssi packet count
+ * @QCA_WLAN_VENDOR_ATTR_GSCAN_CNT:
+ * wake gscan packet count
+ * @QCA_WLAN_VENDOR_ATTR_PNO_COMPLETE_CNT:
+ * wake pno complete packet count
+ * @QCA_WLAN_VENDOR_ATTR_PNO_MATCH_CNT:
+ * wake pno match packet count
*/
enum qca_wlan_vendor_attr_wake_stats {
QCA_WLAN_VENDOR_ATTR_GET_WAKE_STATS_INVALID = 0,
@@ -2731,6 +2741,11 @@ enum qca_wlan_vendor_attr_wake_stats {
QCA_WLAN_VENDOR_ATTR_ICMP4_RX_MULTICAST_CNT,
QCA_WLAN_VENDOR_ATTR_ICMP6_RX_MULTICAST_CNT,
QCA_WLAN_VENDOR_ATTR_OTHER_RX_MULTICAST_CNT,
+ QCA_WLAN_VENDOR_ATTR_RSSI_BREACH_CNT,
+ QCA_WLAN_VENDOR_ATTR_LOW_RSSI_CNT,
+ QCA_WLAN_VENDOR_ATTR_GSCAN_CNT,
+ QCA_WLAN_VENDOR_ATTR_PNO_COMPLETE_CNT,
+ QCA_WLAN_VENDOR_ATTR_PNO_MATCH_CNT,
/* keep last */
QCA_WLAN_VENDOR_GET_WAKE_STATS_AFTER_LAST,
QCA_WLAN_VENDOR_GET_WAKE_STATS_MAX =
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index 4fdc3452b89c..4062559b3ba3 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -6185,6 +6185,11 @@ struct sir_bpf_get_offload {
* @wow_ipv6_mcast_na_stats: ipv6 multicast na stats
* @wow_icmpv4_count: ipv4 icmp packet count
* @wow_icmpv6_count: ipv6 icmp packet count
+ * @wow_rssi_breach_wake_up_count: rssi breach wakeup count
+ * @wow_low_rssi_wake_up_count: low rssi wakeup count
+ * @wow_gscan_wake_up_count: gscan wakeup count
+ * @wow_pno_complete_wake_up_count: pno complete wakeup count
+ * @wow_pno_match_wake_up_count: pno match wakeup count
*/
struct sir_wake_lock_stats {
uint32_t wow_ucast_wake_up_count;
@@ -6196,6 +6201,11 @@ struct sir_wake_lock_stats {
uint32_t wow_ipv6_mcast_na_stats;
uint32_t wow_icmpv4_count;
uint32_t wow_icmpv6_count;
+ uint32_t wow_rssi_breach_wake_up_count;
+ uint32_t wow_low_rssi_wake_up_count;
+ uint32_t wow_gscan_wake_up_count;
+ uint32_t wow_pno_complete_wake_up_count;
+ uint32_t wow_pno_match_wake_up_count;
};
/**
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 927898c2db15..406ca237726f 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -8342,6 +8342,16 @@ QDF_STATUS wma_get_wakelock_stats(struct sir_wake_lock_stats *wake_lock_stats)
wake_lock_stats->wow_icmpv4_count = wma_handle->wow_icmpv4_count;
wake_lock_stats->wow_icmpv6_count =
wma_handle->wow_icmpv6_count;
+ wake_lock_stats->wow_rssi_breach_wake_up_count =
+ wma_handle->wow_rssi_breach_wake_up_count;
+ wake_lock_stats->wow_low_rssi_wake_up_count =
+ wma_handle->wow_low_rssi_wake_up_count;
+ wake_lock_stats->wow_gscan_wake_up_count =
+ wma_handle->wow_gscan_wake_up_count;
+ wake_lock_stats->wow_pno_complete_wake_up_count =
+ wma_handle->wow_pno_complete_wake_up_count;
+ wake_lock_stats->wow_pno_match_wake_up_count =
+ wma_handle->wow_pno_match_wake_up_count;
return QDF_STATUS_SUCCESS;
}