summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoddar, Siddarth <siddpodd@codeaurora.org>2018-01-08 18:23:54 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2018-01-12 21:45:36 -0800
commitfebc5230fecf53d81b2d3ba65e3f650bc32af94b (patch)
tree4dcb5b8b2fcab66be462f1189b6bc9bfc09e3c99
parentac0701739ee2c881ae621a33366c82efe2747796 (diff)
qcacld-3.0: Extend wma arp handler to support other stats
Extend wma ARP stats handler function to handle other connectivity stats data for TCP and IPv4. Change-Id: Ibf14212eee3f7eff3841426d30b0728da04eb124 CRs-Fixed: 2161889
-rw-r--r--core/mac/inc/sir_api.h16
-rw-r--r--core/wma/src/wma_features.c19
2 files changed, 35 insertions, 0 deletions
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index bac8f600d91a..17313fe4c320 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -8057,6 +8057,9 @@ struct sme_rcpi_req {
* @dad_detected: dad detected
* @connect_status: connection status
* @ba_session_establishment_status: BA session status
+ * @connect_stats_present: connectivity stats present or not
+ * @tcp_ack_recvd: tcp syn ack's count
+ * @icmpv4_rsp_recvd: icmpv4 responses count
*/
struct rsp_stats {
uint32_t vdev_id;
@@ -8068,6 +8071,9 @@ struct rsp_stats {
uint32_t dad_detected;
uint32_t connect_status;
uint32_t ba_session_establishment_status;
+ bool connect_stats_present;
+ uint32_t tcp_ack_recvd;
+ uint32_t icmpv4_rsp_recvd;
};
/**
@@ -8076,12 +8082,22 @@ struct rsp_stats {
* @flag: enable/disable stats
* @pkt_type: type of packet(1 - arp)
* @ip_addr: subnet ipv4 address in case of encrypted packets
+ * @pkt_type_bitmap: pkt bitmap
+ * @tcp_src_port: tcp src port for pkt tracking
+ * @tcp_dst_port: tcp dst port for pkt tracking
+ * @icmp_ipv4: target ipv4 address to track ping packets
+ * @reserved: reserved
*/
struct set_arp_stats_params {
uint32_t vdev_id;
uint8_t flag;
uint8_t pkt_type;
uint32_t ip_addr;
+ uint32_t pkt_type_bitmap;
+ uint32_t tcp_src_port;
+ uint32_t tcp_dst_port;
+ uint32_t icmp_ipv4;
+ uint32_t reserved;
};
/**
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 48bad4493bb8..e922c9a521ae 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -86,6 +86,8 @@
* MCL platform.
*/
#define WMA_SET_VDEV_IE_SOURCE_HOST 0x0
+#define WMI_TLV_HEADER_MASK 0xFFFF0000
+
static const uint8_t arp_ptrn[] = {0x08, 0x06};
static const uint8_t arp_mask[] = {0xff, 0xff};
@@ -10598,6 +10600,8 @@ int wma_get_arp_stats_handler(void *handle, uint8_t *data,
{
WMI_VDEV_GET_ARP_STAT_EVENTID_param_tlvs *param_buf;
wmi_vdev_get_arp_stats_event_fixed_param *data_event;
+ wmi_vdev_get_connectivity_check_stats *connect_stats_event;
+ uint8_t *buf_ptr;
struct rsp_stats rsp;
tpAniSirGlobal mac = cds_get_context(QDF_MODULE_ID_PE);
@@ -10639,6 +10643,21 @@ int wma_get_arp_stats_handler(void *handle, uint8_t *data,
rsp.ba_session_establishment_status =
data_event->ba_session_establishment_status;
+ buf_ptr = (uint8_t *)data_event;
+ buf_ptr = buf_ptr + sizeof(wmi_vdev_get_arp_stats_event_fixed_param) +
+ WMI_TLV_HDR_SIZE;
+ connect_stats_event = (wmi_vdev_get_connectivity_check_stats *)buf_ptr;
+
+ if (((connect_stats_event->tlv_header & WMI_TLV_HEADER_MASK) >> 16 ==
+ WMITLV_TAG_STRUC_wmi_vdev_get_connectivity_check_stats)) {
+ rsp.connect_stats_present = true;
+ rsp.tcp_ack_recvd = connect_stats_event->tcp_ack_recvd;
+ rsp.icmpv4_rsp_recvd = connect_stats_event->icmpv4_rsp_recvd;
+ WMA_LOGD("tcp_ack_recvd %d icmpv4_rsp_recvd %d",
+ connect_stats_event->tcp_ack_recvd,
+ connect_stats_event->icmpv4_rsp_recvd);
+ }
+
mac->sme.get_arp_stats_cb(mac->hHdd, &rsp);
EXIT();