Additional TWT attributes for response path and resume

Introduce additional attributes for the TWT response parameters from the
host driver. Also, add ATTR_TWT_RESUME_FLOW_ID for TWT Resume request.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Rajasekaran Kalidoss 2020-07-31 22:08:35 +05:30 committed by Jouni Malinen
parent 0a9d7b169e
commit 844ecc70a3

View File

@ -7661,6 +7661,28 @@ enum qca_wlan_vendor_attr_nan_params {
* @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_INTVL_MANTISSA: Required (u32)
* This attribute is used to configure wake interval mantissa.
* The units are in TU.
*
* @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_STATUS: Required (u8)
* This field is applicable for TWT response only.
* This contains status values in enum qca_wlan_vendor_twt_status
* and is passed to the userspace.
*
* @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_RESP_TYPE: Required (u8)
* This field is applicable for TWT response only.
* This field contains response type from the TWT responder and is
* passed to the userspace. The values for this field are defined in
* enum qca_wlan_vendor_twt_setup_resp_type.
*
* @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_TIME_TSF: Required (u64)
* This field is applicable for TWT response only.
* This field contains absolute TSF value of the wake time received
* from the TWT responder and is passed to the userspace.
*
* @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_TWT_INFO_ENABLED: Flag attribute.
* Enable (flag attribute present) - Indicates that the TWT responder
* supports reception of TWT information frame from the TWT requestor.
* Disable (flag attribute not present) - Indicates that the responder
* doesn't support reception of TWT information frame from requestor.
*/
enum qca_wlan_vendor_attr_twt_setup {
QCA_WLAN_VENDOR_ATTR_TWT_SETUP_INVALID = 0,
@ -7675,6 +7697,12 @@ enum qca_wlan_vendor_attr_twt_setup {
QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_DURATION = 9,
QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_INTVL_MANTISSA = 10,
/* TWT Response only attributes */
QCA_WLAN_VENDOR_ATTR_TWT_SETUP_STATUS = 11,
QCA_WLAN_VENDOR_ATTR_TWT_SETUP_RESP_TYPE = 12,
QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_TIME_TSF = 13,
QCA_WLAN_VENDOR_ATTR_TWT_SETUP_TWT_INFO_ENABLED = 14,
/* keep last */
QCA_WLAN_VENDOR_ATTR_TWT_SETUP_AFTER_LAST,
QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAX =
@ -7682,7 +7710,44 @@ enum qca_wlan_vendor_attr_twt_setup {
};
/**
* enum qca_wlan_vendor_attr_twt_resume: Represents attributes for
* enum qca_wlan_vendor_twt_status - Represents the status of the requested
* TWT operation
*
* @QCA_WLAN_VENDOR_TWT_STATUS_OK: TWT request successfully completed
* @QCA_WLAN_VENDOR_TWT_STATUS_TWT_NOT_ENABLED: TWT not enabled
* @QCA_WLAN_VENDOR_TWT_STATUS_USED_DIALOG_ID: TWT dialog ID is already used
* @QCA_WLAN_VENDOR_TWT_STATUS_SESSION_BUSY: TWT session is busy
* @QCA_WLAN_VENDOR_TWT_STATUS_SESSION_NOT_EXIST: TWT session does not exist
* @QCA_WLAN_VENDOR_TWT_STATUS_NOT_SUSPENDED: TWT session not in suspend state
* @QCA_WLAN_VENDOR_TWT_STATUS_INVALID_PARAM: Invalid parameters
* @QCA_WLAN_VENDOR_TWT_STATUS_NOT_READY: FW not ready
* @QCA_WLAN_VENDOR_TWT_STATUS_NO_RESOURCE: FW resource exhausted
* @QCA_WLAN_VENDOR_TWT_STATUS_NO_ACK: Peer AP/STA did not ACK the
* request/response frame
* @QCA_WLAN_VENDOR_TWT_STATUS_NO_RESPONSE: Peer AP did not send the response
* frame
* @QCA_WLAN_VENDOR_TWT_STATUS_DENIED: AP did not accept the request
* @QCA_WLAN_VENDOR_TWT_STATUS_UNKNOWN_ERROR: Adding TWT dialog failed due to an
* unknown reason
*/
enum qca_wlan_vendor_twt_status {
QCA_WLAN_VENDOR_TWT_STATUS_OK = 0,
QCA_WLAN_VENDOR_TWT_STATUS_TWT_NOT_ENABLED = 1,
QCA_WLAN_VENDOR_TWT_STATUS_USED_DIALOG_ID = 2,
QCA_WLAN_VENDOR_TWT_STATUS_SESSION_BUSY = 3,
QCA_WLAN_VENDOR_TWT_STATUS_SESSION_NOT_EXIST = 4,
QCA_WLAN_VENDOR_TWT_STATUS_NOT_SUSPENDED = 5,
QCA_WLAN_VENDOR_TWT_STATUS_INVALID_PARAM = 6,
QCA_WLAN_VENDOR_TWT_STATUS_NOT_READY = 7,
QCA_WLAN_VENDOR_TWT_STATUS_NO_RESOURCE = 8,
QCA_WLAN_VENDOR_TWT_STATUS_NO_ACK = 9,
QCA_WLAN_VENDOR_TWT_STATUS_NO_RESPONSE = 10,
QCA_WLAN_VENDOR_TWT_STATUS_DENIED = 11,
QCA_WLAN_VENDOR_TWT_STATUS_UNKNOWN_ERROR = 12,
};
/**
* enum qca_wlan_vendor_attr_twt_resume - Represents attributes for
* TWT (Target Wake Time) resume request. These attributes are sent as part of
* %QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_TWT_RESUME and
* %QCA_NL80211_VENDOR_SUBCMD_WIFI_TEST_CONFIGURATION. Also used by
@ -7696,11 +7761,16 @@ enum qca_wlan_vendor_attr_twt_setup {
*
* @QCA_WLAN_VENDOR_ATTR_TWT_RESUME_NEXT_TWT_SIZE: Required (u32)
* This attribute represents the next TWT subfield size.
*
* @QCA_WLAN_VENDOR_ATTR_TWT_RESUME_FLOW_ID: Required (u8).
* Flow ID is the unique identifier for each TWT session. This attribute
* represents the respective TWT session to resume.
*/
enum qca_wlan_vendor_attr_twt_resume {
QCA_WLAN_VENDOR_ATTR_TWT_RESUME_INVALID = 0,
QCA_WLAN_VENDOR_ATTR_TWT_RESUME_NEXT_TWT = 1,
QCA_WLAN_VENDOR_ATTR_TWT_RESUME_NEXT_TWT_SIZE = 2,
QCA_WLAN_VENDOR_ATTR_TWT_RESUME_FLOW_ID = 3,
/* keep last */
QCA_WLAN_VENDOR_ATTR_TWT_RESUME_AFTER_LAST,
@ -7708,6 +7778,28 @@ enum qca_wlan_vendor_attr_twt_resume {
QCA_WLAN_VENDOR_ATTR_TWT_RESUME_AFTER_LAST - 1,
};
/**
* enum qca_wlan_vendor_twt_setup_resp_type - Represents the response type by
* the TWT responder
*
* @QCA_WLAN_VENDOR_TWT_RESP_ALTERNATE: TWT responder suggests TWT
* parameters that are different from TWT requesting STA suggested
* or demanded TWT parameters
* @QCA_WLAN_VENDOR_TWT_RESP_DICTATE: TWT responder demands TWT
* parameters that are different from TWT requesting STA TWT suggested
* or demanded parameters
* @QCA_WLAN_VENDOR_TWT_RESP_REJECT: TWT responder rejects TWT
* setup
* @QCA_WLAN_VENDOR_TWT_RESP_ACCEPT: TWT responder accepts the TWT
* setup.
*/
enum qca_wlan_vendor_twt_setup_resp_type {
QCA_WLAN_VENDOR_TWT_RESP_ALTERNATE = 1,
QCA_WLAN_VENDOR_TWT_RESP_DICTATE = 2,
QCA_WLAN_VENDOR_TWT_RESP_REJECT = 3,
QCA_WLAN_VENDOR_TWT_RESP_ACCEPT = 4,
};
/**
* enum qca_wlan_vendor_twt_setup_req_type - Required (u8)
* Represents the setup type being requested for TWT.