]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add QCA vendor attributes for latency based power save mode
authorNirav Shah <nnshah@qti.qualcomm.com>
Fri, 30 May 2025 16:30:06 +0000 (22:00 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 23 Jun 2025 18:32:46 +0000 (21:32 +0300)
Add QCA vendor attributes
QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_LATENCY_TOLERANCE and
QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_LEVEL to configure
latency based power save mode.

Signed-off-by: Jouni Malinen <jouni.malinen@oss.qualcomm.com>
src/common/qca-vendor.h

index 4111fb025ef105226a0f3e4fbd93245a5a9a73d9..5d91adfaad288ccd96420be0a4cbddd098f05d5e 100644 (file)
@@ -3335,6 +3335,11 @@ enum qca_wlan_vendor_attr_config {
         * %QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_ITO and
         * %QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_SPEC_WAKE_INTERVAL attributes
         * when its value is set to %QCA_WLAN_VENDOR_OPM_MODE_USER_DEFINED.
+        *
+        * This attribute shall be configured along with
+        * %QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_LEVEL and
+        * %QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_LATENCY_TOLERANCE attributes
+        * when its value is set to %QCA_WLAN_VENDOR_OPM_MODE_LATENCY_BASED.
         */
        QCA_WLAN_VENDOR_ATTR_CONFIG_OPTIMIZED_POWER_MANAGEMENT = 71,
 
@@ -3949,6 +3954,34 @@ enum qca_wlan_vendor_attr_config {
         */
        QCA_WLAN_VENDOR_ATTR_CONFIG_EHT_EMLSR_LINKS = 132,
 
+       /* 8-bit unsigned value
+        *
+        * This setting determines the intensity of the power-saving mode.
+        * The level ranges from 1 to 5, where:
+        *      1 represents the most aggressive (maximum power saving), and
+        *      5 represents the least aggressive (minimal power saving).
+        *
+        * This attribute shall be configured along with
+        * %QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_LATENCY_TOLERANCE and
+        * %QCA_WLAN_VENDOR_ATTR_CONFIG_OPTIMIZED_POWER_MANAGEMENT
+        * to %QCA_WLAN_VENDOR_OPM_MODE_LATENCY_BASED mode.
+        */
+       QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_LEVEL = 133,
+
+       /* 16-bit unsigned value to configure latency tolerance value in
+        * milliseconds.
+        *
+        * This attribute configures latency tolerance value for
+        * STA and P2P Client mode. This is used by the firmware to achieve
+        * optimal power consumption within latency constraints.
+        *
+        * This attribute shall be configured along with
+        * %QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_LEVEL and
+        * %QCA_WLAN_VENDOR_ATTR_CONFIG_OPTIMIZED_POWER_MANAGEMENT
+        * to %QCA_WLAN_VENDOR_OPM_MODE_LATENCY_BASED mode.
+        */
+       QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_LATENCY_TOLERANCE = 134,
+
        /* keep last */
        QCA_WLAN_VENDOR_ATTR_CONFIG_AFTER_LAST,
        QCA_WLAN_VENDOR_ATTR_CONFIG_MAX =
@@ -17573,12 +17606,17 @@ enum qca_wlan_vendor_attr_tdls_state {
  *     to configure power save inactivity timeout and speculative wake up
  *     interval through %QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_ITO and
  *     %QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_SPEC_WAKE_INTERVAL attributes.
+ * @QCA_WLAN_VENDOR_OPM_MODE_LATENCY_BASED: Enable optimized power-save mode
+ *      based on interface level latency tolerance value which is configured
+ *      through %QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_LATENCY_TOLERANCE and
+ *      %QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_LEVEL.
  */
 
 enum qca_wlan_vendor_opm_mode {
        QCA_WLAN_VENDOR_OPM_MODE_DISABLE = 0,
        QCA_WLAN_VENDOR_OPM_MODE_ENABLE = 1,
        QCA_WLAN_VENDOR_OPM_MODE_USER_DEFINED = 2,
+       QCA_WLAN_VENDOR_OPM_MODE_LATENCY_BASED = 3,
 };
 
 /*