From: Ashish Kumar Dhanotiya Date: Tue, 24 Sep 2024 10:25:17 +0000 (+0530) Subject: Add a QCA vendor event to indicate status of the idle shutdown X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bc75ef93ad13c637e790d32e85798ec5818e206;p=thirdparty%2Fhostap.git Add a QCA vendor event to indicate status of the idle shutdown 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 --- diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h index 78de403d7..e73468ecb 100644 --- a/src/common/qca-vendor.h +++ b/src/common/qca-vendor.h @@ -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 */