From: Zhang Qian Date: Mon, 5 Sep 2016 08:22:38 +0000 (+0800) Subject: QCA vendor subcommand for LL_STATS extension X-Git-Tag: hostap_2_6~69 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.git;a=commitdiff_plain;h=22950d0568fddd9fcd11562d5a38c8e595ab5c99 QCA vendor subcommand for LL_STATS extension Some user space monitor wants to offload link layer statistics to firmware. A new command QCA_NL80211_VENDOR_SUBCMD_LL_STATS_EXT and associcated attributes are added. The monitor will use this new command to configure monitoring paramters and get link layer statistics. Attributes added in this change: 1. Parameters for FW to trigger the statistics report 2. Peer STA power state 3. TX failure statistics Signed-off-by: Zhang Qian --- diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h index 2312b22..6d92b51 100644 --- a/src/common/qca-vendor.h +++ b/src/common/qca-vendor.h @@ -124,6 +124,10 @@ enum qca_radiotap_vendor_ids { * capabilities are to be fetched and other * enum qca_wlan_vendor_attr_get_hw_capability attributes to return the * requested capabilities. + * + * @QCA_NL80211_VENDOR_SUBCMD_LL_STATS_EXT: Link layer statistics extension. + * enum qca_wlan_vendor_attr_ll_stats_ext attributes are used with this + * command and event. */ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0, @@ -211,6 +215,7 @@ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_SAP_CONDITIONAL_CHAN_SWITCH = 124, QCA_NL80211_VENDOR_SUBCMD_GPIO_CONFIG_COMMAND = 125, QCA_NL80211_VENDOR_SUBCMD_GET_HW_CAPABILITY = 126, + QCA_NL80211_VENDOR_SUBCMD_LL_STATS_EXT = 127, }; @@ -832,4 +837,45 @@ enum qca_wlan_vendor_attr_get_hw_capability { QCA_WLAN_VENDOR_ATTR_HW_CAPABILITY_AFTER_LAST - 1, }; +/** + * enum qca_wlan_vendor_attr_ll_stats_ext - Attributes for MAC layer monitoring + * offload which is an extension for LL_STATS. + * @QCA_WLAN_VENDOR_ATTR_LL_STATS_CFG_PERIOD: Monitoring period. Unit in ms. + * If MAC counters do not exceed the threshold, FW will report monitored + * link layer counters periodically as this setting. The first report is + * always triggered by this timer. + * @QCA_WLAN_VENDOR_ATTR_LL_STATS_CFG_THRESHOLD: It is a percentage (1-99). + * For each MAC layer counter, FW holds two copies. One is the current value. + * The other is the last report. Once a current counter's increment is larger + * than the threshold, FW will indicate that counter to host even if the + * monitoring timer does not expire. + * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_PS_CHG: Peer STA power state change + * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TID: TID of MSDU + * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_NUM_MSDU: Count of MSDU with the same + * failure code. + * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_STATUS: TX failure code + * 1: TX packet discarded + * 2: No ACK + * 3: Postpone + */ +enum qca_wlan_vendor_attr_ll_stats_ext { + QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_INVALID = 0, + + /* Attributes for configurations */ + QCA_WLAN_VENDOR_ATTR_LL_STATS_CFG_PERIOD, + QCA_WLAN_VENDOR_ATTR_LL_STATS_CFG_THRESHOLD, + + /* Attributes for events */ + QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_PS_CHG, + + /* TX failure event */ + QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TID, + QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_NUM_MSDU, + QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_STATUS, + + QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_LAST, + QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_MAX = + QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_LAST - 1 +}; + #endif /* QCA_VENDOR_H */