qcacmn: Enhance QCA vendor interface to indicate TWT required capability of AP

Add QCA_WLAN_TWT_NOTIFY command type to send event to userspace when AP
changes TWT required bit field in its capabilities.

Change-Id: I6333213f4e8ca4fe9ca637db287759fd6c6622f4
CRs-Fixed: 3143525
This commit is contained in:
Deeksha Gupta
2022-03-09 11:32:15 +05:30
committed by Madan Koyyalamudi
parent 95a1bc6a1a
commit bd5b183f58

View File

@@ -8969,6 +8969,11 @@ enum qca_wlan_vendor_attr_wifi_test_config {
* @QCA_WLAN_TWT_SET_PARAM: Configure TWT related parameters. Required * @QCA_WLAN_TWT_SET_PARAM: Configure TWT related parameters. Required
* parameters are obtained through QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_PARAMS. Refer * parameters are obtained through QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_PARAMS. Refer
* the enum qca_wlan_vendor_attr_twt_set_param. * the enum qca_wlan_vendor_attr_twt_set_param.
*
* @QCA_WLAN_TWT_NOTIFY: Used to notify userspace about changes in TWT
* related information for example TWT required bit in AP capabilities etc.
* The reason for the notification is sent using
* QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_NOTIFY_STATUS.
*/ */
enum qca_wlan_twt_operation { enum qca_wlan_twt_operation {
QCA_WLAN_TWT_SET = 0, QCA_WLAN_TWT_SET = 0,
@@ -8982,6 +8987,7 @@ enum qca_wlan_twt_operation {
QCA_WLAN_TWT_GET_CAPABILITIES = 8, QCA_WLAN_TWT_GET_CAPABILITIES = 8,
QCA_WLAN_TWT_SETUP_READY_NOTIFY = 9, QCA_WLAN_TWT_SETUP_READY_NOTIFY = 9,
QCA_WLAN_TWT_SET_PARAM = 10, QCA_WLAN_TWT_SET_PARAM = 10,
QCA_WLAN_TWT_NOTIFY = 11,
}; };
/* enum qca_wlan_vendor_attr_config_twt: Defines attributes used by /* enum qca_wlan_vendor_attr_config_twt: Defines attributes used by
@@ -8998,11 +9004,17 @@ enum qca_wlan_twt_operation {
* enum qca_wlan_vendor_attr_twt_setup, enum qca_wlan_vendor_attr_twt_resume, * enum qca_wlan_vendor_attr_twt_setup, enum qca_wlan_vendor_attr_twt_resume,
* enum qca_wlan_vendor_attr_twt_set_param or * enum qca_wlan_vendor_attr_twt_set_param or
* enum qca_wlan_vendor_attr_twt_stats based on the operation. * enum qca_wlan_vendor_attr_twt_stats based on the operation.
*
* @QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_NOTIFY_STATUS: Size is u8, mandatory when
* QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_OPERATION is set to QCA_WLAN_TWT_NOTIFY.
* The values used by this attribute are defined in
* enum qca_wlan_vendor_twt_status.
*/ */
enum qca_wlan_vendor_attr_config_twt { enum qca_wlan_vendor_attr_config_twt {
QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_INVALID = 0, QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_INVALID = 0,
QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_OPERATION = 1, QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_OPERATION = 1,
QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_PARAMS = 2, QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_PARAMS = 2,
QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_NOTIFY_STATUS = 3,
/* keep last */ /* keep last */
QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_AFTER_LAST,
@@ -9331,6 +9343,10 @@ enum qca_wlan_vendor_attr_twt_setup {
* QCA_WLAN_VENDOR_TWT_STATUS_POWER_SAVE_EXIT_TERMINATE: The driver requested to * QCA_WLAN_VENDOR_TWT_STATUS_POWER_SAVE_EXIT_TERMINATE: The driver requested to
* terminate an existing TWT session on power save exit request from userspace. * terminate an existing TWT session on power save exit request from userspace.
* Used on the TWT_TERMINATE notification from the driver/firmware. * Used on the TWT_TERMINATE notification from the driver/firmware.
* @QCA_WLAN_VENDOR_TWT_STATUS_TWT_REQUIRED: The peer has set the TWT
* required bit in its capabilities.
* @QCA_WLAN_VENDOR_TWT_STATUS_TWT_NOT_REQUIRED: The peer has cleared
* the TWT required bit(1->0) in its capabilities.
*/ */
enum qca_wlan_vendor_twt_status { enum qca_wlan_vendor_twt_status {
QCA_WLAN_VENDOR_TWT_STATUS_OK = 0, QCA_WLAN_VENDOR_TWT_STATUS_OK = 0,
@@ -9356,6 +9372,8 @@ enum qca_wlan_vendor_twt_status {
QCA_WLAN_VENDOR_TWT_STATUS_CHANNEL_SWITCH_IN_PROGRESS = 20, QCA_WLAN_VENDOR_TWT_STATUS_CHANNEL_SWITCH_IN_PROGRESS = 20,
QCA_WLAN_VENDOR_TWT_STATUS_SCAN_IN_PROGRESS = 21, QCA_WLAN_VENDOR_TWT_STATUS_SCAN_IN_PROGRESS = 21,
QCA_WLAN_VENDOR_TWT_STATUS_POWER_SAVE_EXIT_TERMINATE = 22, QCA_WLAN_VENDOR_TWT_STATUS_POWER_SAVE_EXIT_TERMINATE = 22,
QCA_WLAN_VENDOR_TWT_STATUS_TWT_REQUIRED = 23,
QCA_WLAN_VENDOR_TWT_STATUS_TWT_NOT_REQUIRED = 24,
}; };
/** /**