]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add a QCA vendor event to indicate status of the idle shutdown
authorAshish Kumar Dhanotiya <quic_adhanoti@quicinc.com>
Tue, 24 Sep 2024 10:25:17 +0000 (15:55 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 2 Oct 2024 21:38:56 +0000 (00:38 +0300)
If there are no active Wi-Fi interfaces for a certain duration, the host
driver triggers idle shutdown. Add a new vendor event
QCA_NL80211_VENDOR_SUBCMD_IDLE_SHUTDOWN to indicate user space when the
idle shutdown is started or completed.

This uses attributes defined in enum qca_wlan_vendor_attr_idle_shutdown.

Signed-off-by: Ashish Kumar Dhanotiya <quic_adhanoti@quicinc.com>
src/common/qca-vendor.h

index 78de403d7a35de7ef289b9f8c6122d6b0d26e18c..e73468ecb7bab6d804dda6c57f5aa452347690c3 100644 (file)
@@ -1311,6 +1311,20 @@ enum qca_radiotap_vendor_ids {
  *
  *     The attributes used with this command are defined in
  *     enum qca_wlan_vendor_attr_fw_scan_report.
+ *
+ * @QCA_NL80211_VENDOR_SUBCMD_IDLE_SHUTDOWN: If there are no active Wi-Fi
+ *     interfaces for a certain duration, the host driver might trigger idle
+ *     shutdown. The host driver rejects the user space commands between start
+ *     and completion of the idle shutdown. If a command is rejected, user
+ *     space can use this event to determine when to retry the specific
+ *     command.
+ *
+ *     This is a wiphy specific vendor event and it indicates user space that
+ *     the host driver has reached the idle timer and has started or completed
+ *     idle shutdown procedure.
+ *
+ *     The attributes used with this event are defined in
+ *     enum qca_wlan_vendor_attr_idle_shutdown.
  */
 enum qca_nl80211_vendor_subcmds {
        QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0,
@@ -1548,6 +1562,7 @@ enum qca_nl80211_vendor_subcmds {
        QCA_NL80211_VENDOR_SUBCMD_SET_P2P_MODE = 251,
        QCA_NL80211_VENDOR_SUBCMD_CHAN_USAGE_REQ = 252,
        QCA_NL80211_VENDOR_SUBCMD_GET_FW_SCAN_REPORT = 253,
+       QCA_NL80211_VENDOR_SUBCMD_IDLE_SHUTDOWN = 254,
 };
 
 /* Compatibility defines for previously used subcmd names.
@@ -18545,4 +18560,34 @@ enum qca_wlan_vendor_attr_fw_scan_report {
        QCA_WLAN_VENDOR_ATTR_FW_SCAN_REPORT_AFTER_LAST - 1,
 };
 
+/*
+ * enum qca_wlan_idle_shutdown_status: Represents idle shutdown status.
+ *
+ * @QCA_WLAN_IDLE_SHUTDOWN_STARTED: Indicates idle shutdown is started in the
+ * host driver.
+ * @QCA_WLAN_IDLE_SHUTDOWN_COMPLETED: Indicates idle shutdown is completed in
+ * the host driver.
+ */
+enum qca_wlan_idle_shutdown_status {
+       QCA_WLAN_IDLE_SHUTDOWN_STARTED = 0,
+       QCA_WLAN_IDLE_SHUTDOWN_COMPLETED = 1,
+};
+
+/*
+ * enum qca_wlan_vendor_attr_idle_shutdown: Attributes used by vendor event
+ * %QCA_NL80211_VENDOR_SUBCMD_IDLE_SHUTDOWN.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_IDLE_SHUTDOWN_STATUS: Required u8 attribute. Indicates
+ * the status of the idle shutdown from one of the values in enum
+ * qca_wlan_idle_shutdown_status.
+ */
+enum qca_wlan_vendor_attr_idle_shutdown {
+       QCA_WLAN_VENDOR_ATTR_IDLE_SHUTDOWN_INVALID = 0,
+       QCA_WLAN_VENDOR_ATTR_IDLE_SHUTDOWN_STATUS = 1,
+
+       QCA_WLAN_VENDOR_ATTR_IDLE_SHUTDOWN_AFTER_LAST,
+       QCA_WLAN_VENDOR_ATTR_IDLE_SHUTDOWN_MAX =
+       QCA_WLAN_VENDOR_ATTR_IDLE_SHUTDOWN_AFTER_LAST - 1,
+};
+
 #endif /* QCA_VENDOR_H */