QCA vendor subcommand for LL_STATS extension
[mech_eap.git] / src / common / qca-vendor.h
index 6dad369..6d92b51 100644 (file)
@@ -115,6 +115,19 @@ enum qca_radiotap_vendor_ids {
  *     indicated through an event using the same sub command through
  *     @QCA_WLAN_VENDOR_ATTR_SAP_CONDITIONAL_CHAN_SWITCH_STATUS. Attributes are
  *     listed in qca_wlan_vendor_attr_sap_conditional_chan_switch.
+ *
+ * @QCA_NL80211_VENDOR_SUBCMD_GPIO_CONFIG_COMMAND: Set GPIO pins. This uses the
+ *     attributes defined in enum qca_wlan_gpio_attr.
+ *
+ * @QCA_NL80211_VENDOR_SUBCMD_GET_HW_CAPABILITY: Fetch hardware capabilities.
+ *     This uses @QCA_WLAN_VENDOR_ATTR_GET_HW_CAPABILITY to indicate which
+ *     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,
@@ -200,6 +213,9 @@ enum qca_nl80211_vendor_subcmds {
        QCA_NL80211_VENDOR_SUBCMD_P2P_LISTEN_OFFLOAD_START = 122,
        QCA_NL80211_VENDOR_SUBCMD_P2P_LISTEN_OFFLOAD_STOP = 123,
        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,
 };
 
 
@@ -417,6 +433,25 @@ enum qca_set_band {
 };
 
 /**
+ * enum qca_access_policy - Access control policy
+ *
+ * Access control policy is applied on the configured IE
+ * (QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY_IE).
+ * To be set with QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY.
+ *
+ * @QCA_ACCESS_POLICY_ACCEPT_UNLESS_LISTED: Deny Wi-Fi connections which match
+ *     the specific configuration (IE) set, i.e., allow all the
+ *     connections which do not match the configuration.
+ * @QCA_ACCESS_POLICY_DENY_UNLESS_LISTED: Accept Wi-Fi connections which match
+ *     the specific configuration (IE) set, i.e., deny all the
+ *     connections which do not match the configuration.
+ */
+enum qca_access_policy {
+       QCA_ACCESS_POLICY_ACCEPT_UNLESS_LISTED,
+       QCA_ACCESS_POLICY_DENY_UNLESS_LISTED,
+};
+
+/**
  * enum qca_vendor_attr_get_tsf: Vendor attributes for TSF capture
  * @QCA_WLAN_VENDOR_ATTR_TSF_CMD: enum qca_tsf_operation (u32)
  * @QCA_WLAN_VENDOR_ATTR_TSF_TIMER_VALUE: Unsigned 64 bit TSF timer value
@@ -603,8 +638,8 @@ enum qca_vendor_attr_txpower_decr_db {
 };
 
 /* Attributes for data used by
- * QCA_NL80211_VENDOR_SUBCMD_SET_CONFIGURATION and
- * QCA_NL80211_VENDOR_SUBCMD_GET_CONFIGURATION subcommands.
+ * QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION and
+ * QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_CONFIGURATION subcommands.
  */
 enum qca_wlan_vendor_attr_config {
        QCA_WLAN_VENDOR_ATTR_CONFIG_INVALID,
@@ -664,6 +699,49 @@ enum qca_wlan_vendor_attr_config {
        /* 8-bit unsigned value to configure the propagation delay for
         * 2G/5G band (0~63, units in us) */
        QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_DELAY,
+       /* Unsigned 32-bit value to configure the number of unicast TX fail
+        * packet count. The peer is disconnected once this threshold is
+        * reached. */
+       QCA_WLAN_VENDOR_ATTR_CONFIG_TX_FAIL_COUNT,
+       /* Attribute used to set scan default IEs to the driver.
+        *
+        * These IEs can be used by scan operations that will be initiated by
+        * the driver/firmware.
+        *
+        * For further scan requests coming to the driver, these IEs should be
+        * merged with the IEs received along with scan request coming to the
+        * driver. If a particular IE is present in the scan default IEs but not
+        * present in the scan request, then that IE should be added to the IEs
+        * sent in the Probe Request frames for that scan request. */
+       QCA_WLAN_VENDOR_ATTR_CONFIG_SCAN_DEFAULT_IES,
+       /* Unsigned 32-bit attribute for generic commands */
+       QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_COMMAND,
+       /* Unsigned 32-bit value attribute for generic commands */
+       QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_VALUE,
+       /* Unsigned 32-bit data attribute for generic command response */
+       QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_DATA,
+       /* Unsigned 32-bit length attribute for
+        * QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_DATA */
+       QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_LENGTH,
+       /* Unsigned 32-bit flags attribute for
+        * QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_DATA */
+       QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_FLAGS,
+       /* Unsigned 32-bit, defining the access policy.
+        * See enum qca_access_policy. Used with
+        * QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY_IE_LIST. */
+       QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY,
+       /* Sets the list of full set of IEs for which a specific access policy
+        * has to be applied. Used along with
+        * QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY to control the access.
+        * Zero length payload can be used to clear this access constraint. */
+       QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY_IE_LIST,
+       /* Unsigned 32-bit, specifies the interface index (netdev) for which the
+        * corresponding configurations are applied. If the interface index is
+        * not specified, the configurations are attributed to the respective
+        * wiphy. */
+       QCA_WLAN_VENDOR_ATTR_CONFIG_IFINDEX,
+       /* 8-bit unsigned value to trigger QPower: 1-Enable, 0-Disable */
+       QCA_WLAN_VENDOR_ATTR_CONFIG_QPOWER,
 
        /* keep last */
        QCA_WLAN_VENDOR_ATTR_CONFIG_AFTER_LAST,
@@ -709,4 +787,95 @@ enum qca_wlan_vendor_attr_sap_conditional_chan_switch {
        QCA_WLAN_VENDOR_ATTR_SAP_CONDITIONAL_CHAN_SWITCH_AFTER_LAST - 1,
 };
 
+/**
+ * enum qca_wlan_gpio_attr - Parameters for GPIO configuration
+ */
+enum qca_wlan_gpio_attr {
+       QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INVALID = 0,
+       /* Unsigned 32-bit attribute for GPIO command */
+       QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND,
+       /* Unsigned 32-bit attribute for GPIO PIN number to configure */
+       QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PINNUM,
+       /* Unsigned 32-bit attribute for GPIO value to configure */
+       QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_VALUE,
+       /* Unsigned 32-bit attribute for GPIO pull type */
+       QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PULL_TYPE,
+       /* Unsigned 32-bit attribute for GPIO interrupt mode */
+       QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTR_MODE,
+
+       /* keep last */
+       QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_LAST,
+       QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_MAX =
+       QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_LAST - 1
+};
+
+/**
+ * enum qca_wlan_vendor_attr_get_hw_capability - Wi-Fi hardware capability
+ */
+enum qca_wlan_vendor_attr_get_hw_capability {
+       QCA_WLAN_VENDOR_ATTR_HW_CAPABILITY_INVALID,
+       /* Antenna isolation
+        * An attribute used in the response.
+        * The content of this attribute is encoded in a byte array. Each byte
+        * value is an antenna isolation value. The array length is the number
+        * of antennas.
+        */
+       QCA_WLAN_VENDOR_ATTR_ANTENNA_ISOLATION,
+       /* Request HW capability
+        * An attribute used in the request.
+        * The content of this attribute is a u32 array for one or more of
+        * hardware capabilities (attribute IDs) that are being requested. Each
+        * u32 value has a value from this
+        * enum qca_wlan_vendor_attr_get_hw_capability
+        * identifying which capabilities are requested.
+        */
+       QCA_WLAN_VENDOR_ATTR_GET_HW_CAPABILITY,
+
+       /* keep last */
+       QCA_WLAN_VENDOR_ATTR_HW_CAPABILITY_AFTER_LAST,
+       QCA_WLAN_VENDOR_ATTR_HW_CAPABILITY_MAX =
+       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 */