浏览代码

qcacmn: Support TWT wmi APIs() with TWT componentization structs

Currently, WMI APIs do not support new TWT public structures.
If the TWT componentization feature is enabled, then extend the WMI APIs
with TWT componentization structs.

Change-Id: Ic987960e880376066b81881dc32ec96faf609cc6
CRs-Fixed: 3085377
Srinivas Girigowda 3 年之前
父节点
当前提交
c0b9416daa
共有 4 个文件被更改,包括 1852 次插入9 次删除
  1. 99 1
      wmi/inc/wmi_unified_priv.h
  2. 329 8
      wmi/inc/wmi_unified_twt_api.h
  3. 292 0
      wmi/src/wmi_unified_twt_api.c
  4. 1132 0
      wmi/src/wmi_unified_twt_tlv.c

+ 99 - 1
wmi/inc/wmi_unified_priv.h

@@ -99,6 +99,10 @@
 #include "wlan_mlo_mgr_public_structs.h"
 #endif
 
+#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
+#include <wlan_twt_public_structs.h>
+#endif
+
 #define WMI_UNIFIED_MAX_EVENT 0x100
 
 #ifdef WMI_EXT_DBG
@@ -2390,8 +2394,102 @@ int (*wmi_check_and_pad_event)(void *os_handle, void *param_struc_ptr,
 int (*wmi_check_command_params)(void *os_handle, void *param_struc_ptr,
 				uint32_t param_buf_len,
 				uint32_t wmi_cmd_event_id);
+#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
+QDF_STATUS (*send_twt_enable_cmd)(wmi_unified_t wmi_handle,
+			struct twt_enable_param *params);
 
-#ifdef WLAN_SUPPORT_TWT
+QDF_STATUS (*send_twt_disable_cmd)(wmi_unified_t wmi_handle,
+			struct twt_disable_param *params);
+
+QDF_STATUS (*send_twt_add_dialog_cmd)(wmi_unified_t wmi_handle,
+			struct twt_add_dialog_param *params);
+
+QDF_STATUS (*send_twt_del_dialog_cmd)(wmi_unified_t wmi_handle,
+			struct twt_del_dialog_param *params);
+
+QDF_STATUS (*send_twt_pause_dialog_cmd)(wmi_unified_t wmi_handle,
+			struct twt_pause_dialog_cmd_param *params);
+
+QDF_STATUS (*send_twt_nudge_dialog_cmd)(wmi_unified_t wmi_handle,
+			struct twt_nudge_dialog_cmd_param *params);
+
+QDF_STATUS (*send_twt_resume_dialog_cmd)(wmi_unified_t wmi_handle,
+			struct twt_resume_dialog_cmd_param *params);
+#ifdef WLAN_SUPPORT_BCAST_TWT
+QDF_STATUS (*send_twt_btwt_invite_sta_cmd)(wmi_unified_t wmi_handle,
+			struct twt_btwt_invite_sta_cmd_param *params);
+
+QDF_STATUS (*send_twt_btwt_remove_sta_cmd)(wmi_unified_t wmi_handle,
+			struct twt_btwt_remove_sta_cmd_param *params);
+#endif
+
+QDF_STATUS (*extract_twt_enable_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_enable_complete_event_param *params);
+
+QDF_STATUS (*extract_twt_disable_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_disable_complete_event_param *params);
+
+QDF_STATUS (*extract_twt_add_dialog_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_add_dialog_complete_event_param *params);
+
+QDF_STATUS (*extract_twt_add_dialog_comp_additional_params)
+		(
+		 wmi_unified_t wmi_handle, uint8_t *evt_buf,
+		 uint32_t evt_buf_len, uint32_t idx,
+		 struct twt_add_dialog_additional_params *additional_params
+		);
+
+QDF_STATUS (*extract_twt_del_dialog_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct 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 twt_pause_dialog_complete_event_param *params);
+
+QDF_STATUS (*extract_twt_nudge_dialog_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_nudge_dialog_complete_event_param *params);
+
+QDF_STATUS (*extract_twt_resume_dialog_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_resume_dialog_complete_event_param *params);
+
+QDF_STATUS (*extract_twt_notify_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_notify_event_param *params);
+QDF_STATUS (*extract_twt_ack_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_ack_complete_event_param *params);
+#ifdef WLAN_SUPPORT_BCAST_TWT
+QDF_STATUS (*extract_twt_btwt_invite_sta_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_btwt_invite_sta_complete_event_param *params);
+
+QDF_STATUS (*extract_twt_btwt_remove_sta_comp_event)(wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_btwt_remove_sta_complete_event_param *params);
+#endif
+
+QDF_STATUS(*extract_twt_session_stats_event)
+		(
+		 wmi_unified_t wmi_handle,
+		 uint8_t *evt_buf,
+		 struct twt_session_stats_event_param *params
+		);
+QDF_STATUS(*extract_twt_session_stats_data)
+		(
+		 wmi_unified_t wmi_handle,
+		 uint8_t *evt_buf,
+		 struct twt_session_stats_event_param *params,
+		 struct twt_session_stats_info *session,
+		 uint32_t idx
+		);
+
+#elif defined(WLAN_SUPPORT_TWT)
 QDF_STATUS (*send_twt_enable_cmd)(wmi_unified_t wmi_handle,
 			struct wmi_twt_enable_param *params);
 

+ 329 - 8
wmi/inc/wmi_unified_twt_api.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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
@@ -23,8 +24,331 @@
 #define _WMI_UNIFIED_TWT_API_H_
 
 #include "wmi_unified_twt_param.h"
+#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
+#include <wlan_twt_public_structs.h>
+/**
+ * wmi_unified_twt_enable_cmd() - Send WMI command to Enable TWT
+ * @wmi_handle: 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(wmi_unified_t wmi_handle,
+			   struct twt_enable_param *params);
 
+/**
+ * wmi_unified_twt_disable_cmd() - Send WMI command to disable TWT
+ * @wmi_handle: 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(wmi_unified_t wmi_handle,
+			    struct twt_disable_param *params);
 
+/**
+ * wmi_unified_twt_add_dialog_cmd() - Send WMI command to add TWT dialog
+ * @wmi_handle: 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(wmi_unified_t wmi_handle,
+			       struct twt_add_dialog_param *params);
+
+/**
+ * wmi_unified_twt_del_dialog_cmd() - Send WMI command to delete TWT dialog
+ * @wmi_handle: 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(wmi_unified_t wmi_handle,
+			       struct twt_del_dialog_param *params);
+
+/**
+ * wmi_unified_twt_pause_dialog_cmd() - Send WMI command to pause TWT dialog
+ * @wmi_handle: 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(wmi_unified_t wmi_handle,
+				 struct twt_pause_dialog_cmd_param *params);
+
+/**
+ * wmi_unified_twt_nudge_dialog_cmd() - Send WMI command to nudge TWT dialog
+ * @wmi_handle: 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_nudge_dialog_cmd(wmi_unified_t wmi_handle,
+				 struct twt_nudge_dialog_cmd_param *params);
+
+/**
+ * wmi_unified_twt_resume_dialog_cmd() - Send WMI command to resume TWT dialog
+ * @wmi_handle: 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(
+			wmi_unified_t wmi_handle,
+			struct twt_resume_dialog_cmd_param *params);
+
+#ifdef WLAN_SUPPORT_BCAST_TWT
+/**
+ * wmi_unified_twt_btwt_invite_sta_cmd() - Send WMI command for bTWT sta
+ *                               invitation
+ * @wmi_handle: 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_btwt_invite_sta_cmd(
+			wmi_unified_t wmi_handle,
+			struct twt_btwt_invite_sta_cmd_param *params);
+
+/**
+ * wmi_unified_twt_btwt_remove_sta_cmd() - Send WMI command for bTWT sta kickoff
+ * @wmi_handle: 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_btwt_remove_sta_cmd(
+			wmi_unified_t wmi_handle,
+			struct twt_btwt_remove_sta_cmd_param *params);
+#endif
+
+/**
+ * wmi_extract_twt_enable_comp_event() - Extract WMI event params for TWT enable
+ *                               completion event
+ * @wmi_handle: 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(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_enable_complete_event_param *params);
+
+/**
+ * wmi_extract_twt_disable_comp_event() - Extract WMI event params for TWT
+ *                               disable completion event
+ * @wmi_handle: 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(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_disable_complete_event_param *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(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_add_dialog_complete_event_param *params);
+
+/**
+ * wmi_extract_twt_add_dialog_comp_additional_params() - Extracts additional
+ * twt parameters, as part of add dialog completion event
+ * @wmi_hdl: wmi handle
+ * @evt_buf: Pointer event buffer
+ * @evt_buf_len: length of the add dialog event buffer
+ * @idx: index of num_twt_params to extract
+ * @additional_params: additional parameters to extract
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_extract_twt_add_dialog_comp_additional_params(
+		wmi_unified_t wmi_handle, uint8_t *evt_buf,
+		uint32_t evt_buf_len, uint32_t idx,
+		struct twt_add_dialog_additional_params *additional_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(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct 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_handle: 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(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_pause_dialog_complete_event_param *params);
+
+/**
+ * wmi_extract_twt_nudge_dialog_comp_event() - Extract WMI event params for TWT
+ *                               nudge dialog completion event
+ * @wmi_handle: 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_nudge_dialog_comp_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_nudge_dialog_complete_event_param *params);
+
+/**
+ * wmi_extract_twt_resume_dialog_comp_event() - Extract WMI event params for TWT
+ *                               resume dialog completion event
+ * @wmi_handle: 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(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_resume_dialog_complete_event_param *params);
+
+/**
+ * wmi_extract_twt_notify_event() - Extract WMI event params for TWT
+ *                                  notify event
+ * @wmi_handle: 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_notify_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_notify_event_param *params);
+
+#ifdef WLAN_SUPPORT_BCAST_TWT
+/**
+ * wmi_extract_twt_btwt_invite_sta_comp_event() - Extract WMI event params for
+ *                          BTWT sta invitation completion event
+ * @wmi_handle: 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_btwt_invite_sta_comp_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_btwt_invite_sta_complete_event_param *params);
+
+/**
+ * wmi_extract_twt_btwt_remove_sta_comp_event() - Extract WMI event params for
+ *                          BTWT sta kickoff completion event
+ * @wmi_handle: 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_btwt_remove_sta_comp_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_btwt_remove_sta_complete_event_param *params);
+#endif
+
+/**
+ * wmi_extract_twt_session_stats_event() - Extract WMI event params for TWT
+ *                               session stats event
+ * @wmi_handle: 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_session_stats_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_session_stats_event_param *params);
+
+/**
+ * wmi_extract_twt_session_stats_data() - Extract one TWT session from TWT
+ *                               session stats event
+ * @wmi_handle: wmi handle
+ * @evt_buf: Pointer event buffer
+ * @params: Parameters to extract
+ * @session: Session struct to save one TWT session
+ * @idx: TWT session index
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_extract_twt_session_stats_data(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_session_stats_event_param *params,
+		struct twt_session_stats_info *session,
+		uint32_t idx);
+
+void wmi_twt_attach_tlv(struct wmi_unified *wmi_handle);
+
+/**
+ * wmi_extract_twt_cap_service_ready_ext2: Extract TWT bitmap value
+ *                                         received through extended
+ *                                         service ready2 event
+ * @wmi_handle: WMI handle
+ * @evt_buf: Event buffer
+ * @param: Pointer to TWT bitmap param
+ *
+ * Return: QDF_STATUS_SUCCESS for success or error code
+ */
+QDF_STATUS wmi_extract_twt_cap_service_ready_ext2(
+			wmi_unified_t wmi_handle,
+			uint8_t *evt_buf,
+			struct wmi_twt_cap_bitmap_params *params);
+
+/**
+ * wmi_extract_twt_ack_comp_event() - Extract WMI event params for TWT ack event
+ *
+ * @wmi_handle: 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_ack_comp_event(
+			wmi_unified_t wmi_handle,
+			uint8_t *evt_buf,
+			struct twt_ack_complete_event_param *param);
+#elif defined(WLAN_SUPPORT_TWT)
 /**
  * wmi_unified_twt_enable_cmd() - Send WMI command to Enable TWT
  * @wmi_handle: wmi handle
@@ -317,14 +641,7 @@ QDF_STATUS wmi_extract_twt_session_stats_data(
 		struct wmi_host_twt_session_stats_info *session,
 		uint32_t idx);
 
-#ifdef WLAN_SUPPORT_TWT
 void wmi_twt_attach_tlv(struct wmi_unified *wmi_handle);
-#else
-static void wmi_twt_attach_tlv(struct wmi_unified *wmi_handle)
-{
-	return;
-}
-#endif
 
 /**
  * wmi_extract_twt_cap_service_ready_ext2: Extract TWT bitmap value
@@ -354,5 +671,9 @@ QDF_STATUS wmi_extract_twt_ack_comp_event(
 			wmi_unified_t wmi_handle,
 			uint8_t *evt_buf,
 			struct wmi_twt_ack_complete_event_param *param);
-
+#else
+static inline void wmi_twt_attach_tlv(struct wmi_unified *wmi_handle)
+{
+}
+#endif
 #endif /* _WMI_UNIFIED_TWT_API_H_ */

+ 292 - 0
wmi/src/wmi_unified_twt_api.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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
@@ -22,7 +23,297 @@
 #include "wmi_unified_priv.h"
 #include "wmi_unified_twt_api.h"
 
+#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
+#include <wlan_twt_public_structs.h>
 
+QDF_STATUS
+wmi_unified_twt_enable_cmd(wmi_unified_t wmi_handle,
+			   struct twt_enable_param *params)
+{
+	if (wmi_handle->ops->send_twt_enable_cmd)
+		return wmi_handle->ops->send_twt_enable_cmd(
+				wmi_handle, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS
+wmi_unified_twt_disable_cmd(wmi_unified_t wmi_handle,
+			    struct twt_disable_param *params)
+{
+	if (wmi_handle->ops->send_twt_disable_cmd)
+		return wmi_handle->ops->send_twt_disable_cmd(
+				wmi_handle, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS
+wmi_unified_twt_add_dialog_cmd(wmi_unified_t wmi_handle,
+			       struct twt_add_dialog_param *params)
+{
+	if (wmi_handle->ops->send_twt_add_dialog_cmd)
+		return wmi_handle->ops->send_twt_add_dialog_cmd(
+				wmi_handle, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS
+wmi_unified_twt_del_dialog_cmd(wmi_unified_t wmi_handle,
+			       struct twt_del_dialog_param *params)
+{
+	if (wmi_handle->ops->send_twt_del_dialog_cmd)
+		return wmi_handle->ops->send_twt_del_dialog_cmd(
+				wmi_handle, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS
+wmi_unified_twt_pause_dialog_cmd(wmi_unified_t wmi_handle,
+				 struct twt_pause_dialog_cmd_param *params)
+{
+	if (wmi_handle->ops->send_twt_pause_dialog_cmd)
+		return wmi_handle->ops->send_twt_pause_dialog_cmd(
+				wmi_handle, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS
+wmi_unified_twt_nudge_dialog_cmd(wmi_unified_t wmi_handle,
+				 struct twt_nudge_dialog_cmd_param *params)
+{
+	if (wmi_handle->ops->send_twt_nudge_dialog_cmd)
+		return wmi_handle->ops->send_twt_nudge_dialog_cmd(
+				wmi_handle, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS wmi_unified_twt_resume_dialog_cmd(
+			wmi_unified_t wmi_handle,
+			struct twt_resume_dialog_cmd_param *params)
+{
+	if (wmi_handle->ops->send_twt_resume_dialog_cmd)
+		return wmi_handle->ops->send_twt_resume_dialog_cmd(
+				wmi_handle, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+#ifdef WLAN_SUPPORT_BCAST_TWT
+QDF_STATUS wmi_unified_twt_btwt_invite_sta_cmd(
+			wmi_unified_t wmi_handle,
+			struct twt_btwt_invite_sta_cmd_param *params)
+{
+	if (wmi_handle->ops->send_twt_btwt_invite_sta_cmd)
+		return wmi_handle->ops->send_twt_btwt_invite_sta_cmd(
+				wmi_handle, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS wmi_unified_twt_btwt_remove_sta_cmd(
+			wmi_unified_t wmi_handle,
+			struct twt_btwt_remove_sta_cmd_param *params)
+{
+	if (wmi_handle->ops->send_twt_btwt_remove_sta_cmd)
+		return wmi_handle->ops->send_twt_btwt_remove_sta_cmd(
+				wmi_handle, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+#endif
+
+QDF_STATUS wmi_extract_twt_enable_comp_event(
+			wmi_unified_t wmi_handle,
+			uint8_t *evt_buf,
+			struct twt_enable_complete_event_param *params)
+{
+	if (wmi_handle->ops->extract_twt_enable_comp_event)
+		return wmi_handle->ops->extract_twt_enable_comp_event(
+				wmi_handle, evt_buf, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS wmi_extract_twt_disable_comp_event(
+			wmi_unified_t wmi_handle,
+			uint8_t *evt_buf,
+			struct twt_disable_complete_event_param *params)
+{
+	if (wmi_handle->ops->extract_twt_disable_comp_event)
+		return wmi_handle->ops->extract_twt_disable_comp_event(
+				wmi_handle, evt_buf, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS wmi_extract_twt_add_dialog_comp_event(
+			wmi_unified_t wmi_handle,
+			uint8_t *evt_buf,
+			struct twt_add_dialog_complete_event_param *params)
+{
+	if (wmi_handle->ops->extract_twt_add_dialog_comp_event)
+		return wmi_handle->ops->extract_twt_add_dialog_comp_event(
+				wmi_handle, evt_buf, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS wmi_extract_twt_add_dialog_comp_additional_params(
+		wmi_unified_t wmi_handle, uint8_t *evt_buf,
+		uint32_t evt_buf_len, uint32_t idx,
+		struct twt_add_dialog_additional_params *additional_params)
+{
+	if (wmi_handle->ops->extract_twt_add_dialog_comp_additional_params)
+		return wmi_handle->ops->
+			extract_twt_add_dialog_comp_additional_params(
+			wmi_handle, evt_buf, evt_buf_len, idx,
+			additional_params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS wmi_extract_twt_del_dialog_comp_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_del_dialog_complete_event_param *params)
+{
+	if (wmi_handle->ops->extract_twt_del_dialog_comp_event)
+		return wmi_handle->ops->extract_twt_del_dialog_comp_event(
+				wmi_handle, evt_buf, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS wmi_extract_twt_pause_dialog_comp_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_pause_dialog_complete_event_param *params)
+{
+	if (wmi_handle->ops->extract_twt_pause_dialog_comp_event)
+		return wmi_handle->ops->extract_twt_pause_dialog_comp_event(
+				wmi_handle, evt_buf, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS wmi_extract_twt_nudge_dialog_comp_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_nudge_dialog_complete_event_param *params)
+{
+	if (wmi_handle->ops->extract_twt_nudge_dialog_comp_event)
+		return wmi_handle->ops->extract_twt_nudge_dialog_comp_event(
+				wmi_handle, evt_buf, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS wmi_extract_twt_resume_dialog_comp_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_resume_dialog_complete_event_param *params)
+{
+	if (wmi_handle->ops->extract_twt_resume_dialog_comp_event)
+		return wmi_handle->ops->extract_twt_resume_dialog_comp_event(
+				wmi_handle, evt_buf, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS wmi_extract_twt_notify_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_notify_event_param *params)
+{
+	if (wmi_handle->ops->extract_twt_notify_event)
+		return wmi_handle->ops->extract_twt_notify_event(wmi_handle,
+								 evt_buf,
+								 params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+#ifdef WLAN_SUPPORT_BCAST_TWT
+QDF_STATUS wmi_extract_twt_btwt_invite_sta_comp_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_btwt_invite_sta_complete_event_param *params)
+{
+	if (wmi_handle->ops->extract_twt_btwt_invite_sta_comp_event)
+		return wmi_handle->ops->extract_twt_btwt_invite_sta_comp_event(
+				wmi_handle, evt_buf, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS wmi_extract_twt_btwt_remove_sta_comp_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_btwt_remove_sta_complete_event_param *params)
+{
+	if (wmi_handle->ops->extract_twt_btwt_remove_sta_comp_event)
+		return wmi_handle->ops->extract_twt_btwt_remove_sta_comp_event(
+				wmi_handle, evt_buf, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+#endif
+
+QDF_STATUS wmi_extract_twt_session_stats_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_session_stats_event_param *params)
+{
+	if (wmi_handle->ops->extract_twt_session_stats_event)
+		return wmi_handle->ops->extract_twt_session_stats_event(
+				wmi_handle, evt_buf, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS wmi_extract_twt_session_stats_data(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_session_stats_event_param *params,
+		struct twt_session_stats_info *session,
+		uint32_t idx)
+{
+	if (wmi_handle->ops->extract_twt_session_stats_data)
+		return wmi_handle->ops->extract_twt_session_stats_data(
+				wmi_handle, evt_buf, params, session, idx);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS wmi_extract_twt_cap_service_ready_ext2(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct wmi_twt_cap_bitmap_params *params)
+{
+	if (wmi_handle->ops->extract_twt_cap_service_ready_ext2)
+		return wmi_handle->ops->extract_twt_cap_service_ready_ext2(
+				wmi_handle, evt_buf, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
+QDF_STATUS wmi_extract_twt_ack_comp_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct twt_ack_complete_event_param *params)
+{
+	if (wmi_handle->ops->extract_twt_ack_comp_event)
+		return wmi_handle->ops->extract_twt_ack_comp_event(
+				wmi_handle, evt_buf, params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+#elif WLAN_SUPPORT_TWT
 QDF_STATUS
 wmi_unified_twt_enable_cmd(wmi_unified_t wmi_handle,
 			   struct wmi_twt_enable_param *params)
@@ -310,3 +601,4 @@ QDF_STATUS wmi_extract_twt_ack_comp_event(
 
 	return QDF_STATUS_E_FAILURE;
 }
+#endif

文件差异内容过多而无法显示
+ 1132 - 0
wmi/src/wmi_unified_twt_tlv.c


部分文件因为文件数量过多而无法显示