Browse Source

qcacmn: WMI interface changes to configure TWT

Add WMI interface changes required to configure TWT

Change-Id: I307f65f8049caf8365fb496fd69f91600ddbd832
CRs-Fixed: 2212556
Kiran Venkatappa 7 years ago
parent
commit
2d881fd9a7
4 changed files with 569 additions and 0 deletions
  1. 4 0
      wmi_unified_api.h
  2. 47 0
      wmi_unified_priv.h
  3. 167 0
      wmi_unified_twt_api.h
  4. 351 0
      wmi_unified_twt_param.h

+ 4 - 0
wmi_unified_api.h

@@ -62,6 +62,10 @@
 #ifdef WLAN_FEATURE_DSRC
 #include "wlan_ocb_public_structs.h"
 #endif
+#ifdef WLAN_SUPPORT_TWT
+#include "wmi_unified_twt_param.h"
+#include "wmi_unified_twt_api.h"
+#endif
 
 #ifdef IPA_OFFLOAD
 #include "wlan_ipa_public_struct.h"

+ 47 - 0
wmi_unified_priv.h

@@ -56,6 +56,10 @@
 #include "nan_public_structs.h"
 #endif
 
+#ifdef WLAN_SUPPORT_TWT
+#include "wmi_unified_twt_param.h"
+#endif
+
 #define WMI_UNIFIED_MAX_EVENT 0x100
 
 #ifdef WMI_INTERFACE_EVENT_LOGGING
@@ -1563,6 +1567,49 @@ QDF_STATUS (*send_obss_color_collision_cfg_cmd)(wmi_unified_t wmi_handle,
 		struct wmi_obss_color_collision_cfg_param *cfg);
 QDF_STATUS (*extract_obss_color_collision_info)(uint8_t *evt_buf,
 		struct wmi_obss_color_collision_info *info);
+#ifdef WLAN_SUPPORT_TWT
+QDF_STATUS (*send_twt_enable_cmd)(wmi_unified_t wmi_handle,
+			struct wmi_twt_enable_param *params);
+
+QDF_STATUS (*send_twt_disable_cmd)(wmi_unified_t wmi_handle,
+			struct wmi_twt_disable_param *params);
+
+QDF_STATUS (*send_twt_add_dialog_cmd)(wmi_unified_t wmi_handle,
+			struct wmi_twt_add_dialog_param *params);
+
+QDF_STATUS (*send_twt_del_dialog_cmd)(wmi_unified_t wmi_handle,
+			struct wmi_twt_del_dialog_param *params);
+
+QDF_STATUS (*send_twt_pause_dialog_cmd)(wmi_unified_t wmi_handle,
+			struct wmi_twt_pause_dialog_cmd_param *params);
+
+QDF_STATUS (*send_twt_resume_dialog_cmd)(wmi_unified_t wmi_handle,
+			struct wmi_twt_resume_dialog_cmd_param *params);
+
+QDF_STATUS (*extract_twt_enable_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct wmi_twt_enable_complete_event_param *params);
+
+QDF_STATUS (*extract_twt_disable_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct wmi_twt_disable_complete_event *params);
+
+QDF_STATUS (*extract_twt_add_dialog_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct wmi_twt_add_dialog_complete_event_param *params);
+
+QDF_STATUS (*extract_twt_del_dialog_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct wmi_twt_del_dialog_complete_event_param *params);
+
+QDF_STATUS (*extract_twt_pause_dialog_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct wmi_twt_pause_dialog_complete_event_param *params);
+
+QDF_STATUS (*extract_twt_resume_dialog_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct wmi_twt_resume_dialog_complete_event_param *params);
+#endif
 };
 
 /* Forward declartion for psoc*/

+ 167 - 0
wmi_unified_twt_api.h

@@ -0,0 +1,167 @@
+
+/*
+ * Copyright (c) 2018 The Linux Foundation. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+/**
+ * DOC: Implement API's specific to TWT component.
+ */
+
+#ifdef _WMI_UNIFIED_TWT_API_H_
+#define _WMI_UNIFIED_TWT_API_H_
+
+#include "wmi_unified_twt_param.h"
+
+
+/**
+ * wmi_unified_twt_enable_cmd() - Send WMI command to Enable TWT
+ * @wmi_hdl: wmi handle
+ * @params: Parameters to be configured
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_unified_twt_enable_cmd(void *wmi_hdl,
+			struct wmi_twt_enable_param *params);
+
+/**
+ * wmi_unified_twt_disable_cmd() - Send WMI command to disable TWT
+ * @wmi_hdl: wmi handle
+ * @params: Parameters to be configured
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_unified_twt_disable_cmd(void *wmi_hdl,
+			struct wmi_twt_disable_param *params);
+
+/**
+ * wmi_unified_twt_add_dialog_cmd() - Send WMI command to add TWT dialog
+ * @wmi_hdl: wmi handle
+ * @params: Parameters to be configured
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_unified_twt_add_dialog_cmd(void *wmi_hdl,
+			struct wmi_twt_add_dialog_param *params);
+
+/**
+ * wmi_unified_twt_del_dialog_cmd() - Send WMI command to delete TWT dialog
+ * @wmi_hdl: wmi handle
+ * @params: Parameters to be configured
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_unified_twt_del_dialog_cmd(void *wmi_hdl,
+			struct wmi_twt_del_dialog_param *params);
+
+/**
+ * wmi_unified_twt_pause_dialog_cmd() - Send WMI command to pause TWT dialog
+ * @wmi_hdl: wmi handle
+ * @params: Parameters to be configured
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_unified_twt_pause_dialog_cmd(void *wmi_hdl,
+			struct wmi_twt_pause_dialog_cmd_param *params);
+
+/**
+ * wmi_unified_twt_resume_dialog_cmd() - Send WMI command to resume TWT dialog
+ * @wmi_hdl: wmi handle
+ * @params: Parameters to be configured
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_unified_twt_resume_dialog_cmd(void *wmi_hdl,
+			struct wmi_twt_resume_dialog_cmd_param *params);
+
+/**
+ * wmi_extract_twt_enable_comp_event() - Extract WMI event params for TWT enable
+ *                               completion event
+ * @wmi_hdl: wmi handle
+ * @evt_buf: Pointer event buffer
+ * @params: Parameters to extract
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_extract_twt_enable_comp_event(void *wmi_hdl,
+		uint8_t *evt_buf,
+		struct wmi_twt_enable_complete_event_param *params);
+
+/**
+ * wmi_extract_twt_disable_comp_event() - Extract WMI event params for TWT
+ *                               disable completion event
+ * @wmi_hdl: wmi handle
+ * @evt_buf: Pointer event buffer
+ * @params: Parameters to extract
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_extract_twt_disable_comp_event(void *wmi_hdl,
+		uint8_t *evt_buf,
+		struct wmi_twt_disable_complete_event *params);
+
+/**
+ * wmi_extract_twt_add_dialog_comp_event() - Extract WMI event params for TWT
+ *                               add dialog completion event
+ * @wmi_hdl: wmi handle
+ * @evt_buf: Pointer event buffer
+ * @params: Parameters to extract
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_extract_twt_add_dialog_comp_event(void *wmi_hdl,
+		uint8_t *evt_buf,
+		struct wmi_twt_add_dialog_complete_event_param *params);
+
+/**
+ * wmi_extract_twt_del_dialog_comp_event() - Extract WMI event params for TWT
+ *                               delete dialog completion event
+ * @wmi_hdl: wmi handle
+ * @evt_buf: Pointer event buffer
+ * @params: Parameters to extract
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_extract_twt_del_dialog_comp_event(void *wmi_hdl,
+		uint8_t *evt_buf,
+		struct wmi_twt_del_dialog_complete_event_param *params);
+
+/**
+ * wmi_extract_twt_pause_dialog_comp_event() - Extract WMI event params for TWT
+ *                               pause dialog completion event
+ * @wmi_hdl: wmi handle
+ * @evt_buf: Pointer event buffer
+ * @params: Parameters to extract
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_extract_twt_pause_dialog_comp_event(void *wmi_hdl,
+		uint8_t *evt_buf,
+		struct wmi_twt_pause_dialog_complete_event_param *params);
+
+/**
+ * wmi_extract_twt_resume_dialog_comp_event() - Extract WMI event params for TWT
+ *                               resume dialog completion event
+ * @wmi_hdl: wmi handle
+ * @evt_buf: Pointer event buffer
+ * @params: Parameters to extract
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_extract_twt_resume_dialog_comp_event(void *wmi_hdl,
+		uint8_t *evt_buf,
+		struct wmi_twt_resume_dialog_complete_event_param *params);
+
+#endif /* _WMI_UNIFIED_TWT_API_H_ */

+ 351 - 0
wmi_unified_twt_param.h

@@ -0,0 +1,351 @@
+/*
+ * Copyright (c) 2018 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file contains the API definitions for the TWT WMI APIs.
+ */
+
+#ifndef _WMI_UNIFIED_TWT_PARAM_H_
+#define _WMI_UNIFIED_TWT_PARAM_H_
+
+/**
+ * @pdev_id: pdev_id for identifying the MAC.
+ * @sta_cong_timer_ms: STA TWT congestion timer TO value in terms of ms
+ * @mbss_support: Flag indicating if AP TWT feature supported in
+ *                MBSS mode or not.
+ * @default_slot_size: This is the default value for the TWT slot setup
+ *                by AP (units = microseconds)
+ * @congestion_thresh_setup: Minimum congestion required to start setting
+ *                up TWT sessions
+ * @congestion_thresh_teardown: Minimum congestion below which TWT will be
+ *                torn down (in percent of occupied airtime)
+ * @congestion_thresh_critical: Threshold above which TWT will not be active
+ *                (in percent of occupied airtime)
+ * @interference_thresh_teardown: Minimum interference above that TWT
+ *                 will not be active. The interference parameters use an
+ *                 abstract method of evaluating interference.
+ *                 The parameters are in percent, ranging from 0 for no
+ *                 interference, to 100 for interference extreme enough
+ *                 to completely block the signal of interest.
+ * @interference_thresh_setup: Minimum interference below that TWT session
+ *                 can be setup. The interference parameters use an
+ *                 abstract method of evaluating interference.
+ *                 The parameters are in percent, ranging from 0 for no
+ *                 interference, to 100 for interference extreme enough
+ *                 to completely block the signal of interest.
+ * @min_no_sta_setup: Minimum no of STA required to start TWT setup
+ * @min_no_sta_teardown: Minimum no of STA below which TWT will be torn down
+ * @no_of_bcast_mcast_slots: Number of default slot sizes reserved for
+ *                 BCAST/MCAST delivery
+ * @min_no_twt_slots: Minimum no of available slots for TWT to be operational
+ * @max_no_sta_twt: Max no of STA with which TWT is possible
+ *                 (must be <= the wmi_resource_config's twt_ap_sta_count value)
+ *      * The below interval parameters have units of milliseconds.
+ * @mode_check_interval: Interval between two successive check to decide the
+ *                 mode of TWT. (units = milliseconds)
+ * @add_sta_slot_interval: Interval between decisions making to create
+ *                 TWT slots for STAs. (units = milliseconds)
+ * @remove_sta_slot_interval: Inrerval between decisions making to remove TWT
+ *                 slot of STAs. (units = milliseconds)
+ */
+struct wmi_twt_enable_param {
+	uint32_t pdev_id;
+	uint32_t sta_cong_timer_ms;
+	uint32_t mbss_support;
+	uint32_t default_slot_size;
+	uint32_t congestion_thresh_setup;
+	uint32_t congestion_thresh_teardown;
+	uint32_t congestion_thresh_critical;
+	uint32_t interference_thresh_teardown;
+	uint32_t interference_thresh_setup;
+	uint32_t min_no_sta_setup;
+	uint32_t min_no_sta_teardown;
+	uint32_t no_of_bcast_mcast_slots;
+	uint32_t min_no_twt_slots;
+	uint32_t max_no_sta_twt;
+	uint32_t mode_check_interval;
+	uint32_t add_sta_slot_interval;
+	uint32_t remove_sta_slot_interval;
+};
+
+/* status code of enabling TWT
+ * WMI_ENABLE_TWT_STATUS_OK: enabling TWT successfully completed
+ * WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED: TWT already enabled
+ * WMI_ENABLE_TWT_STATUS_NOT_READY: FW not ready for enabling TWT
+ * WMI_ENABLE_TWT_INVALID_PARAM: invalid parameters
+ * WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR: enabling TWT failed with an
+ *                                      unknown reason
+ */
+enum WMI_HOST_ENABLE_TWT_STATUS {
+	WMI_HOST_ENABLE_TWT_STATUS_OK,
+	WMI_HOST_ENABLE_TWT_STATUS_ALREADY_ENABLED,
+	WMI_HOST_ENABLE_TWT_STATUS_NOT_READY,
+	WMI_HOST_ENABLE_TWT_INVALID_PARAM,
+	WMI_HOST_ENABLE_TWT_STATUS_UNKNOWN_ERROR,
+};
+
+/** struct wmi_twt_enable_complete_event_param:
+ * @pdev_is: pdev_id for identifying the MAC.
+ * @status: From enum WMI_HOST_ENABLE_TWT_STATUS
+ */
+struct wmi_twt_enable_complete_event_param {
+	uint32_t pdev_id;
+	uint32_t status;
+};
+
+/** struct wmi_twt_disable_param:
+ * @pdev_id: pdev_id for identifying the MAC.
+ */
+struct wmi_twt_disable_param {
+	uint32_t pdev_id;
+};
+
+/** struct wmi_twt_disable_complete_event:
+ * @pdev_id: pdev_id for identifying the MAC.
+ */
+struct wmi_twt_disable_complete_event {
+	uint32_t pdev_id;
+};
+
+/* from IEEE 802.11ah section 9.4.2.200 */
+enum WMI_HOST_TWT_COMMAND {
+	WMI_HOST_TWT_COMMAND_REQUEST_TWT    = 0,
+	WMI_HOST_TWT_COMMAND_SUGGEST_TWT    = 1,
+	WMI_HOST_TWT_COMMAND_DEMAND_TWT     = 2,
+	WMI_HOST_TWT_COMMAND_TWT_GROUPING   = 3,
+	WMI_HOST_TWT_COMMAND_ACCEPT_TWT     = 4,
+	WMI_HOST_TWT_COMMAND_ALTERNATE_TWT  = 5,
+	WMI_HOST_TWT_COMMAND_DICTATE_TWT    = 6,
+	WMI_HOST_TWT_COMMAND_REJECT_TWT     = 7,
+};
+
+/** struct wmi_twt_add_dialog_param -
+ * @vdev_id: VDEV identifier
+ * @peer_macaddr: peer MAC address when vdev is AP VDEV
+ * @dialog_id: diaglog_id (TWT dialog ID)
+ *             This dialog ID must be unique within its vdev.
+ * @wake_intvl_us: TWT Wake Interval in units of us
+ * @wake_intvl_mantis: TWT Wake Interval Mantissa
+ *                 - wake_intvl_mantis must be <= 0xFFFF
+ *                 - wake_intvl_us must be divided evenly by wake_intvl_mantis,
+ *                   i.e., wake_intvl_us % wake_intvl_mantis == 0
+ *                 - the quotient of wake_intvl_us/wake_intvl_mantis must be
+ *                   2 to N-th(0<=N<=31) power,
+ *                   i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
+ * @wake_dura_us: TWT Wake Duration in units of us, must be <= 0xFFFF
+ *                wake_dura_us must be divided evenly by 256,
+ *                i.e., wake_dura_us % 256 == 0
+ * @sp_offset_us: this long time after TWT setup the 1st SP will start.
+ * @twt_cmd: cmd from enum WMI_HOST_TWT_COMAND
+ * @flag_bcast: 0 means Individual TWT,
+ *              1 means Broadcast TWT
+ * @flag_trigger: 0 means non-Trigger-enabled TWT,
+ *                1 means  means Trigger-enabled TWT
+ * @flag_flow_type:  0 means announced TWT,
+ *                   1 means un-announced TWT
+ * @flag_protection: 0 means TWT protection is required,
+ *                   1 means TWT protection is not required
+ */
+struct wmi_twt_add_dialog_param {
+	uint32_t vdev_id;
+	uint8_t  peer_macaddr[6];
+	uint32_t dialog_id;
+	uint32_t wake_intvl_us;
+	uint32_t wake_intvl_mantis;
+	uint32_t wake_dura_us;
+	uint32_t sp_offset_us;
+	enum WMI_HOST_TWT_COMMAND twt_cmd;
+	uint32_t
+		flag_bcast:1,
+		flag_trigger:1,
+		flag_flow_type:1,
+		flag_protection:1;
+};
+
+/* enum - status code of adding TWT dialog
+ * WMI_HOST_ADD_TWT_STATUS_OK: adding TWT dialog successfully completed
+ * WMI_HOST_ADD_TWT_STATUS_TWT_NOT_ENABLED: TWT not enabled
+ * WMI_HOST_ADD_TWT_STATUS_USED_DIALOG_ID: TWT dialog ID is already used
+ * WMI_HOST_ADD_TWT_STATUS_INVALID_PARAM: invalid parameters
+ * WMI_HOST_ADD_TWT_STATUS_NOT_READY: FW not ready
+ * WMI_HOST_ADD_TWT_STATUS_NO_RESOURCE: FW resource exhausted
+ * WMI_HOST_ADD_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the
+ *                                 request/response frame
+ * WMI_HOST_ADD_TWT_STATUS_NO_RESPONSE: peer AP did not send the response frame
+ * WMI_HOST_ADD_TWT_STATUS_DENIED: AP did not accept the request
+ * WMI_HOST_ADD_TWT_STATUS_UNKNOWN_ERROR: adding TWT dialog failed with
+ *                                 an unknown reason
+ */
+enum WMI_HOST_ADD_TWT_STATUS {
+	WMI_HOST_ADD_TWT_STATUS_OK,
+	WMI_HOST_ADD_TWT_STATUS_TWT_NOT_ENABLED,
+	WMI_HOST_ADD_TWT_STATUS_USED_DIALOG_ID,
+	WMI_HOST_ADD_TWT_STATUS_INVALID_PARAM,
+	WMI_HOST_ADD_TWT_STATUS_NOT_READY,
+	WMI_HOST_ADD_TWT_STATUS_NO_RESOURCE,
+	WMI_HOST_ADD_TWT_STATUS_NO_ACK,
+	WMI_HOST_ADD_TWT_STATUS_NO_RESPONSE,
+	WMI_HOST_ADD_TWT_STATUS_DENIED,
+	WMI_HOST_ADD_TWT_STATUS_UNKNOWN_ERROR,
+};
+
+/** struct wmi_twt_add_dialog_complete_param -
+ * @vdev_id: VDEV identifier
+ * @dialog_id: TWT dialog ID
+ * @status: refer to WMI_HOST_ADD_TWT_STATUS enum
+ */
+struct wmi_twt_add_dialog_complete_event_param {
+	uint32_t vdev_id;
+	uint32_t dialog_id;
+	uint32_t status;
+};
+
+/** struct wmi_twt_del_dialog_param -
+ * @vdev_id: VDEV identifier
+ * @dialog_id: TWT dialog ID
+ */
+struct wmi_twt_del_dialog_param {
+	uint32_t vdev_id;
+	uint32_t dialog_id;
+};
+
+/* status code of deleting TWT dialog
+ * WMI_HOST_DEL_TWT_STATUS_OK: deleting TWT dialog successfully completed
+ * WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists
+ * WMI_HOST_DEL_TWT_STATUS_INVALID_PARAM: invalid parameters
+ * WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_BUSY: FW is in the process of handling
+ *                                    this dialog
+ * WMI_HOST_DEL_TWT_STATUS_NO_RESOURCE: FW resource exhausted
+ * WMI_HOST_DEL_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the request/response
+ *                            frame
+ * WMI_HOST_DEL_TWT_STATUS_UNKNOWN_ERROR: deleting TWT dialog failed with an
+ *                            unknown reason
+ */
+enum WMI_HOST_DEL_TWT_STATUS {
+	WMI_HOST_DEL_TWT_STATUS_OK,
+	WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST,
+	WMI_HOST_DEL_TWT_STATUS_INVALID_PARAM,
+	WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_BUSY,
+	WMI_HOST_DEL_TWT_STATUS_NO_RESOURCE,
+	WMI_HOST_DEL_TWT_STATUS_NO_ACK,
+	WMI_HOST_DEL_TWT_STATUS_UNKNOWN_ERROR,
+};
+
+/** struct wmi_twt_del_dialog_complete_event_param -
+ * @vdev_id: VDEV identifier
+ * @dialog_id: TWT dialog ID
+ * @status: refer to WMI_HOST_DEL_TWT_STATUS enum
+ */
+struct wmi_twt_del_dialog_complete_event_param {
+	uint32_t vdev_id;
+	uint32_t dialog_id;
+	uint32_t status;
+};
+
+/** struct wmi_twt_pause_dialog_cmd_param -
+ * @vdev_id: VDEV identifier
+ * @dialog_id: TWT dialog ID
+ */
+struct wmi_twt_pause_dialog_cmd_param {
+	uint32_t vdev_id;
+	uint32_t dialog_id;
+};
+
+/* enum WMI_HOST_PAUSE_TWT_STATUS - status code of pausing TWT dialog
+ * WMI_HOST_PAUSE_TWT_STATUS_OK: pausing TWT dialog successfully completed
+ * WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists
+ * WMI_HOST_PAUSE_TWT_STATUS_INVALID_PARAM: invalid parameters
+ * WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_BUSY: FW is in the process of handling
+ *                          this dialog
+ * WMI_HOST_PAUSE_TWT_STATUS_NO_RESOURCE: FW resource exhausted
+ * WMI_HOST_PAUSE_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the
+ *                          request/response frame
+ * WMI_HOST_PAUSE_TWT_STATUS_UNKNOWN_ERROR: pausing TWT dialog failed with an
+ *                          unknown reason
+ */
+enum WMI_HOST_PAUSE_TWT_STATUS {
+	WMI_HOST_PAUSE_TWT_STATUS_OK,
+	WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST,
+	WMI_HOST_PAUSE_TWT_STATUS_INVALID_PARAM,
+	WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_BUSY,
+	WMI_HOST_PAUSE_TWT_STATUS_NO_RESOURCE,
+	WMI_HOST_PAUSE_TWT_STATUS_NO_ACK,
+	WMI_HOST_PAUSE_TWT_STATUS_UNKNOWN_ERROR,
+};
+
+/** struct wmi_twt_pause_dialog_complete_event_param -
+ * @vdev_id: VDEV identifier
+ * @dialog_id: TWT dialog ID
+ * @status: refer to WMI_HOST_PAUSE_TWT_STATUS
+ */
+struct wmi_twt_pause_dialog_complete_event_param {
+	uint32_t vdev_id;
+	uint32_t dialog_id;
+	uint32_t status;
+};
+
+/** struct wmi_twt_resume_dialog_cmd_param -
+ * @vdev_id: VDEV identifier
+ * @dialog_id: TWT dialog ID
+ * @sp_offset_us: this long time after TWT resumed the 1st SP will start
+ */
+struct wmi_twt_resume_dialog_cmd_param {
+	uint32_t vdev_id;
+	uint32_t dialog_id;
+	uint32_t sp_offset_us;
+};
+
+/* enum WMI_HOST_RESUME_TWT_STATUS - status code of resuming TWT dialog
+ * WMI_HOST_RESUME_TWT_STATUS_OK: resuming TWT dialog successfully completed
+ * WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists
+ * WMI_HOST_RESUME_TWT_STATUS_INVALID_PARAM: invalid parameters
+ * WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_BUSY: FW is in the process of handling
+ *                            this dialog
+ * WMI_HOST_RESUME_TWT_STATUS_NOT_PAUSED: dialog not paused currently
+ * WMI_HOST_RESUME_TWT_STATUS_NO_RESOURCE: FW resource exhausted
+ * WMI_HOST_RESUME_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the
+ *                            request/response frame
+ * WMI_HOST_RESUME_TWT_STATUS_UNKNOWN_ERROR: resuming TWT dialog failed with an
+ *                            unknown reason
+ */
+enum WMI_HOST_RESUME_TWT_STATUS {
+	WMI_HOST_RESUME_TWT_STATUS_OK,
+	WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST,
+	WMI_HOST_RESUME_TWT_STATUS_INVALID_PARAM,
+	WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_BUSY,
+	WMI_HOST_RESUME_TWT_STATUS_NOT_PAUSED,
+	WMI_HOST_RESUME_TWT_STATUS_NO_RESOURCE,
+	WMI_HOST_RESUME_TWT_STATUS_NO_ACK,
+	WMI_HOST_RESUME_TWT_STATUS_UNKNOWN_ERROR,
+};
+
+/** struct wmi_twt_resume_dialog_complete_event_param -
+ * @vdev_id: VDEV identifier
+ * @dialog_id: TWT dialog ID
+ * @status: refer to WMI_HOST_RESUME_TWT_STATUS
+ */
+struct wmi_twt_resume_dialog_complete_event_param {
+	uint32_t vdev_id;
+	uint32_t dialog_id;
+	uint32_t status;
+};
+
+#endif /* _WMI_UNIFIED_TWT_PARAM_H_ */