qcacmn: Add QCA vendor interface for AP doze mode configuration

Add a new subcommand QCA_NL80211_VENDOR_SUBCMD_DOZED_AP to configure
doze mode state on an AP interface. This is also used as an event to
indicate the updated configuration. In doze mode, AP transmits
beacons at higher beacon intervals and RX is disabled.

Uses attributes defined in enum qca_wlan_vendor_attr_dozed_ap.

Change-Id: I183140f0466eb7400cc161afb8c2e295ec587f93
CRs-Fixed: 3267855
This commit is contained in:
Vijay Raj
2022-12-06 23:34:10 -08:00
committed by Madan Koyyalamudi
부모 8c6ace7bdb
커밋 cb5c29865e

파일 보기

@@ -644,6 +644,16 @@
*
* The attributes used with this event are defined in
* enum qca_wlan_vendor_attr_mlo_peer_prim_netdev_event.
*
* @QCA_NL80211_VENDOR_SUBCMD_DOZED_AP: Subcommand to configure AP interface to
* operate in doze mode.
*
* Userspace uses this command to configure the AP interface to enter or
* exit from doze mode. The driver sends this event after it enters or
* exits the doze mode with the updated AP doze mode settings.
*
* The attributes used with this subcommand are defined in
* enum qca_wlan_vendor_attr_dozed_ap.
*/
enum qca_nl80211_vendor_subcmds {
@@ -895,6 +905,7 @@ enum qca_nl80211_vendor_subcmds {
QCA_NL80211_VENDOR_SUBCMD_GET_SAR_CAPABILITY = 219,
QCA_NL80211_VENDOR_SUBCMD_SR = 220,
QCA_NL80211_VENDOR_SUBCMD_MLO_PEER_PRIM_NETDEV_EVENT = 221,
QCA_NL80211_VENDOR_SUBCMD_DOZED_AP = 224,
};
enum qca_wlan_vendor_tos {
@@ -14668,4 +14679,54 @@ enum qca_wlan_vendor_attr_mlo_peer_prim_netdev_event {
QCA_WLAN_VENDOR_ATTR_MLO_PEER_PRIM_NETDEV_EVENT_AFTER_LAST - 1,
};
/**
* enum qca_wlan_dozed_ap_state - Doze states for AP interface
*
* @QCA_WLAN_DOZED_AP_DISABLE: Disable doze state on the AP interface.
*
* @QCA_WLAN_DOZED_AP_ENABLE: Enable doze state on the AP interface. AP starts
* beaconing at higher beacon interval with Rx disabled.
*/
enum qca_wlan_dozed_ap_state {
QCA_WLAN_DOZED_AP_DISABLE = 0,
QCA_WLAN_DOZED_AP_ENABLE = 1,
};
/**
* enum qca_wlan_vendor_attr_dozed_ap - Used by the vendor command
* @QCA_NL80211_VENDOR_SUBCMD_DOZED_AP to configure or receive dozed AP mode
* configuration.
*
* @QCA_WLAN_VENDOR_ATTR_DOZED_AP_STATE: u8 attribute.
* Configures the doze state for an AP interface. Possible values are defined
* in enum qca_wlan_dozed_ap_state. @QCA_NL80211_VENDOR_SUBCMD_DOZED_AP event
* gets triggered asynchronously to provide updated AP interface configuration.
*
* @QCA_WLAN_VENDOR_ATTR_DOZED_AP_COOKIE: Unsigned 64-bit cookie provided by
* the driver in the response to specific @QCA_NL80211_VENDOR_SUBCMD_DOZED_AP
* command, which is used later to maintain synchronization between commands
* and asynchronous events.
*
* @QCA_WLAN_VENDOR_ATTR_DOZED_AP_NEXT_TSF: u64 attribute.
* Used in event to indicate the next TBTT TSF timer value after applying the
* doze mode configuration. Next TBTT TSF is the time at which the AP sends
* the first beacon after entering or exiting dozed mode.
*
* @QCA_WLAN_VENDOR_ATTR_DOZED_AP_BI_MULTIPLIER: u16 attribute.
* Used with event to inform the periodicity of beacon transmission that would
* be skipped at all TBTTs in between.
*/
enum qca_wlan_vendor_attr_dozed_ap {
QCA_WLAN_VENDOR_ATTR_DOZED_AP_INVALID = 0,
QCA_WLAN_VENDOR_ATTR_DOZED_AP_STATE = 1,
QCA_WLAN_VENDOR_ATTR_DOZED_AP_COOKIE = 2,
QCA_WLAN_VENDOR_ATTR_DOZED_AP_NEXT_TSF = 3,
QCA_WLAN_VENDOR_ATTR_DOZED_AP_BI_MULTIPLIER = 4,
/* Keep last */
QCA_WLAN_VENDOR_ATTR_DOZED_AP_AFTER_LAST,
QCA_WLAN_VENDOR_ATTR_DOZED_AP_MAX =
QCA_WLAN_VENDOR_ATTR_DOZED_AP_AFTER_LAST - 1,
};
#endif