mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
qcacmn: Extend wmi interface command to support other connectivity stats
Extend wmi interface command to support other connectivity check stats(ICMPv4 and tcp). Change-Id: I881aaeab6e3e1f36b7153630b87a07019660d896 CRs-Fixed: 2168412
This commit is contained in:
parent
c50c2280ff
commit
a7bed4f56d
2 changed files with 49 additions and 0 deletions
|
|
@ -8083,12 +8083,22 @@ struct wmi_btm_config {
|
|||
* @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 {
|
||||
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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -21400,6 +21400,10 @@ static QDF_STATUS send_set_arp_stats_req_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
wmi_vdev_set_arp_stats_cmd_fixed_param *wmi_set_arp;
|
||||
|
||||
len = sizeof(wmi_vdev_set_arp_stats_cmd_fixed_param);
|
||||
if (req_buf->pkt_type_bitmap) {
|
||||
len += WMI_TLV_HDR_SIZE;
|
||||
len += sizeof(wmi_vdev_set_connectivity_check_stats);
|
||||
}
|
||||
buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!buf) {
|
||||
WMI_LOGE("%s : wmi_buf_alloc failed", __func__);
|
||||
|
|
@ -21421,6 +21425,41 @@ static QDF_STATUS send_set_arp_stats_req_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
wmi_set_arp->pkt_type = req_buf->pkt_type;
|
||||
wmi_set_arp->ipv4 = req_buf->ip_addr;
|
||||
|
||||
WMI_LOGD("NUD Stats: vdev_id %u set_clr %u pkt_type:%u ipv4 %u",
|
||||
wmi_set_arp->vdev_id, wmi_set_arp->set_clr,
|
||||
wmi_set_arp->pkt_type, wmi_set_arp->ipv4);
|
||||
|
||||
/*
|
||||
* pkt_type_bitmap should be non-zero to ensure
|
||||
* presence of additional stats.
|
||||
*/
|
||||
if (req_buf->pkt_type_bitmap) {
|
||||
wmi_vdev_set_connectivity_check_stats *wmi_set_connect_stats;
|
||||
|
||||
buf_ptr += sizeof(wmi_vdev_set_arp_stats_cmd_fixed_param);
|
||||
WMITLV_SET_HDR(buf_ptr,
|
||||
WMITLV_TAG_ARRAY_STRUC,
|
||||
sizeof(wmi_vdev_set_connectivity_check_stats));
|
||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
||||
wmi_set_connect_stats =
|
||||
(wmi_vdev_set_connectivity_check_stats *)buf_ptr;
|
||||
WMITLV_SET_HDR(&wmi_set_connect_stats->tlv_header,
|
||||
WMITLV_TAG_STRUC_wmi_vdev_set_connectivity_check_stats,
|
||||
WMITLV_GET_STRUCT_TLVLEN(
|
||||
wmi_vdev_set_connectivity_check_stats));
|
||||
wmi_set_connect_stats->pkt_type_bitmap =
|
||||
req_buf->pkt_type_bitmap;
|
||||
wmi_set_connect_stats->tcp_src_port = req_buf->tcp_src_port;
|
||||
wmi_set_connect_stats->tcp_dst_port = req_buf->tcp_dst_port;
|
||||
wmi_set_connect_stats->icmp_ipv4 = req_buf->icmp_ipv4;
|
||||
|
||||
WMI_LOGD("Connectivity Stats: pkt_type_bitmap %u tcp_src_port:%u tcp_dst_port %u icmp_ipv4 %u",
|
||||
wmi_set_connect_stats->pkt_type_bitmap,
|
||||
wmi_set_connect_stats->tcp_src_port,
|
||||
wmi_set_connect_stats->tcp_dst_port,
|
||||
wmi_set_connect_stats->icmp_ipv4);
|
||||
}
|
||||
|
||||
/* Send per roam config parameters */
|
||||
status = wmi_unified_cmd_send(wmi_handle, buf,
|
||||
len, WMI_VDEV_SET_ARP_STAT_CMDID);
|
||||
|
|
|
|||
Loading…
Reference in a new issue