qcacmn: Add new attibutes to NUD vendor subcommand
Add new attributes to vendor subcmd
QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_SET.
This carry the requisite information to
start / stop the connectivity stats collection.
CRs-Fixed: 2168412
Change-Id: Ie8a60754780433f40ed4d103b737c5e8d4e59c28
diff --git a/os_if/linux/qca_vendor.h b/os_if/linux/qca_vendor.h
index bdc3d7f..81dfa7d 100644
--- a/os_if/linux/qca_vendor.h
+++ b/os_if/linux/qca_vendor.h
@@ -2678,7 +2678,14 @@
QCA_ATTR_NUD_STATS_SET_START = 1,
/* IPv4 address of the default gateway (in network byte order) */
QCA_ATTR_NUD_STATS_GW_IPV4 = 2,
-
+ /*
+ * Represents the data packet type to be monitored.
+ * Host driver tracks the stats corresponding to each data frame
+ * represented by these flags.
+ * These data packets are represented by
+ * enum qca_wlan_vendor_nud_stats_set_data_pkt_info.
+ */
+ QCA_ATTR_NUD_STATS_SET_DATA_PKT_INFO = 3,
/* keep last */
QCA_ATTR_NUD_STATS_SET_LAST,
QCA_ATTR_NUD_STATS_SET_MAX =
@@ -2686,6 +2693,105 @@
};
/**
+ * enum qca_attr_connectivity_check_stats_set - attribute to vendor subcmd
+ * QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_SET. This carry the requisite
+ * information to start / stop the NUD stats collection.
+ * @QCA_ATTR_CONNECTIVITY_CHECK_STATS_STATS_PKT_INFO_TYPE: set pkt info stats
+ * Bitmap to Flag to Start / Stop the NUD stats collection
+ * Start - If included , Stop - If not included
+ * @QCA_ATTR_CONNECTIVITY_CHECK_STATS_DNS_DOMAIN_NAME: set gatway ipv4 address
+ * IPv4 address of Default Gateway (in network byte order)
+ * QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_SET. This carry the requisite
+ * information to start / stop the NUD stats collection.
+ * @QCA_ATTR_CONNECTIVITY_CHECK_STATS_SRC_PORT: set nud debug stats
+ * Flag to Start / Stop the NUD stats collection
+ * Start - If included , Stop - If not included
+ * @QCA_ATTR_CONNECTIVITY_CHECK_STATS_DEST_PORT: set gatway ipv4 address
+ * IPv4 address of Default Gateway (in network byte order)
+ * QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_SET. This carry the requisite
+ * information to start / stop the NUD stats collection.
+ * @QCA_ATTR_CONNECTIVITY_CHECK_STATS_DEST_IPV4: set nud debug stats
+ * Flag to Start / Stop the NUD stats collection
+ * Start - If included , Stop - If not included
+ * @QCA_ATTR_CONNECTIVITY_CHECK_STATS_DEST_IPV6: set gatway ipv4 address
+ * IPv4 address of Default Gateway (in network byte order)
+ */
+enum qca_attr_connectivity_check_stats_set {
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_SET_INVALID = 0,
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_STATS_PKT_INFO_TYPE = 1,
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_DNS_DOMAIN_NAME = 2,
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_SRC_PORT = 3,
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_DEST_PORT = 4,
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_DEST_IPV4 = 5,
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_DEST_IPV6 = 6,
+ /* keep last */
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_SET_LAST,
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_SET_MAX =
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_SET_LAST - 1,
+};
+
+/**
+ * qca_wlan_vendor_nud_stats_data_pkt_flags: Flag representing the various
+ * data types for which the stats have to get collected.
+ */
+enum qca_wlan_vendor_connectivity_check_pkt_flags {
+ QCA_WLAN_VENDOR_CONNECTIVITY_CHECK_SET_ARP = 1 << 0,
+ QCA_WLAN_VENDOR_CONNECTIVITY_CHECK_SET_DNS = 1 << 1,
+ QCA_WLAN_VENDOR_CONNECTIVITY_CHECK_SET_TCP_HANDSHAKE = 1 << 2,
+ QCA_WLAN_VENDOR_CONNECTIVITY_CHECK_SET_ICMPV4 = 1 << 3,
+ QCA_WLAN_VENDOR_CONNECTIVITY_CHECK_SET_ICMPV6 = 1 << 4,
+ /* Used by QCA_ATTR_NUD_STATS_PKT_TYPE only in nud stats get
+ * to represent the stats of respective data type.
+ */
+ QCA_WLAN_VENDOR_CONNECTIVITY_CHECK_SET_TCP_SYN = 1 << 5,
+ QCA_WLAN_VENDOR_CONNECTIVITY_CHECK_SET_TCP_SYN_ACK = 1 << 6,
+ QCA_WLAN_VENDOR_CONNECTIVITY_CHECK_SET_TCP_ACK = 1 << 7,
+};
+
+enum qca_attr_connectivity_check_stats {
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_INVALID = 0,
+ /* Data packet type for which the stats are collected.
+ * Represented by enum qca_wlan_vendor_nud_stats_data_pkt_flags
+ */
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_PKT_TYPE = 1,
+ /* ID corresponding to the DNS frame for which the respective DNS stats
+ * are monitored (u32).
+ */
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_PKT_DNS_DOMAIN_NAME = 2,
+ /* source / destination port on which the respective proto stats are
+ * collected (u32).
+ */
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_PKT_SRC_PORT = 3,
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_PKT_DEST_PORT = 4,
+ /* IPv4/IPv6 address for which the destined data packets are
+ * monitored. (in network byte order)
+ */
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_PKT_DEST_IPV4 = 5,
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_PKT_DEST_IPV6 = 6,
+ /* Data packet Request count received from netdev */
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_PKT_REQ_COUNT_FROM_NETDEV = 7,
+ /* Data packet Request count sent to lower MAC from upper MAC */
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_PKT_REQ_COUNT_TO_LOWER_MAC = 8,
+ /* Data packet Request count received by lower MAC from upper MAC */
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_PKT_REQ_RX_COUNT_BY_LOWER_MAC = 9,
+ /* Data packet Request count successfully transmitted by the device */
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_PKT_REQ_COUNT_TX_SUCCESS = 10,
+ /* Data packet Response count received by lower MAC */
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_PKT_RSP_RX_COUNT_BY_LOWER_MAC = 11,
+ /* Data packet Response count received by upper MAC */
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_PKT_RSP_RX_COUNT_BY_UPPER_MAC = 12,
+ /* Data packet Response count delivered to netdev */
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_PKT_RSP_COUNT_TO_NETDEV = 13,
+ /* Data Packet Response count that are dropped out of order */
+ QCA_ATTR_CONNECTIVITY_CHECK_STATS_PKT_RSP_COUNT_OUT_OF_ORDER_DROP = 14,
+
+ /* keep last */
+ QCA_ATTR_CONNECTIVITY_CHECK_DATA_STATS_LAST,
+ QCA_ATTR_CONNECTIVITY_CHECK_DATA_STATS_MAX =
+ QCA_ATTR_CONNECTIVITY_CHECK_DATA_STATS_LAST - 1,
+};
+
+/**
* qca_attr_nud_stats_get: Attributes to vendor subcmd
* QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_GET. This carries the requisite
* NUD statistics collected when queried.
@@ -2718,7 +2824,12 @@
* Yes - If detected, No - If not detected.
*/
QCA_ATTR_NUD_STATS_IS_DAD = 10,
-
+ /*
+ * List of Data types for which the stats are requested.
+ * This list does not carry ARP stats as they are done by the
+ * above attributes. Represented by enum qca_attr_nud_data_stats.
+ */
+ QCA_ATTR_NUD_STATS_DATA_PKT_STATS = 11,
/* keep last */
QCA_ATTR_NUD_STATS_GET_LAST,
QCA_ATTR_NUD_STATS_GET_MAX =