Forráskód Böngészése

qcacmn: Enable DISA WMI for FIPS

Enable DISA WMI commands for FIPS CCM test
by moving DISA WMI code to unified tlv files.

Change-Id: I90e82fef0e7e365faa6e15d555bf4d431214e14a
CRs-Fixed: 2516897
Disha Das 5 éve
szülő
commit
fe93761b89

+ 30 - 3
wmi/inc/wmi_unified_api.h

@@ -34,9 +34,6 @@
 #include "wmi_unified_pmo_api.h"
 #endif
 #include "wlan_scan_public_structs.h"
-#ifdef WLAN_FEATURE_DISA
-#include "wlan_disa_public_struct.h"
-#endif
 #ifdef WLAN_FEATURE_ACTION_OUI
 #include "wlan_action_oui_public_struct.h"
 #endif
@@ -1641,6 +1638,20 @@ QDF_STATUS
 wmi_unified_pdev_fips_cmd_send(wmi_unified_t wmi_handle,
 			       struct fips_params *param);
 
+#ifdef WLAN_FEATURE_DISA
+/**
+ * wmi_unified_encrypt_decrypt_send_cmd() - send encryptdecrypt cmd to fw
+ * @wmi_handle: wmi handle
+ * @params: encrypt/decrypt params
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS
+wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
+				     struct disa_encrypt_decrypt_req_params
+				     *params);
+#endif /* WLAN_FEATURE_DISA */
+
 /**
  *  wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable
  *						 cmd function
@@ -2288,6 +2299,22 @@ QDF_STATUS
 wmi_extract_fips_event_data(wmi_unified_t wmi_handle, void *evt_buf,
 			    struct wmi_host_fips_event_param *param);
 
+#ifdef WLAN_FEATURE_DISA
+/**
+ * wmi_extract_encrypt_decrypt_resp_params() -
+ *       extract encrypt decrypt resp params from event buffer
+ * @wmi_handle: wmi handle
+ * @evt_buf: pointer to event buffer
+ * @resp: encrypt decrypt resp params
+ *
+ * Return: QDF_STATUS_SUCCESS for success or error code
+ */
+QDF_STATUS
+wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl, void *evt_buf,
+					struct disa_encrypt_decrypt_resp_params
+					*param);
+#endif /* WLAN_FEATURE_DISA */
+
 /**
  * wmi_extract_mgmt_rx_params() - extract management rx params from event
  * @wmi_handle: wmi handle

+ 50 - 0
wmi/inc/wmi_unified_param.h

@@ -3348,6 +3348,40 @@ struct fips_params {
 	uint32_t pdev_id;
 };
 
+#ifdef WLAN_FEATURE_DISA_FIPS
+/**
+ * struct disa_encrypt_decrypt_req_params - disa encrypt request
+ * @vdev_id: virtual device id
+ * @key_flag: This indicates firmware to encrypt/decrypt payload
+ *    see ENCRYPT_DECRYPT_FLAG
+ * @key_idx: Index used in storing key
+ * @key_cipher: cipher used for encryption/decryption
+ *    Eg: see WMI_CIPHER_AES_CCM for CCMP
+ * @key_len: length of key data
+ * @key_txmic_len: length of Tx MIC
+ * @key_rxmic_len: length of Rx MIC
+ * @key_data: Key
+ * @pn: packet number
+ * @mac_header: MAC header
+ * @data_len: length of data
+ * @data: pointer to payload
+ */
+struct disa_encrypt_decrypt_req_params {
+	uint32_t vdev_id;
+	uint8_t key_flag;
+	uint32_t key_idx;
+	uint32_t key_cipher;
+	uint32_t key_len;
+	uint32_t key_txmic_len;
+	uint32_t key_rxmic_len;
+	uint8_t key_data[MAC_MAX_KEY_LENGTH];
+	uint8_t pn[MAC_PN_LENGTH];
+	uint8_t mac_header[MAX_MAC_HEADER_LEN];
+	uint32_t data_len;
+	uint8_t *data;
+};
+#endif
+
 /**
  * struct mcast_group_update_param - Mcast group table update to target
  * @action: Addition/deletion
@@ -6823,6 +6857,22 @@ struct wmi_host_fips_event_param {
 	uint32_t *data;
 };
 
+#ifdef WLAN_FEATURE_DISA_FIPS
+/**
+ * struct disa_encrypt_decrypt_resp_params - disa encrypt response
+ * @vdev_id: vdev id
+ * @status: status
+ * @data_length: data length
+ * @data: data pointer
+ */
+struct disa_encrypt_decrypt_resp_params {
+	uint32_t vdev_id;
+	int32_t status;
+	uint32_t data_len;
+	uint8_t *data;
+};
+#endif
+
 /**
  * struct wmi_host_proxy_ast_reserve_param
  * @pdev_id: pdev id

+ 15 - 17
wmi/inc/wmi_unified_priv.h

@@ -939,15 +939,6 @@ QDF_STATUS (*extract_sar2_result_event)(void *handle,
 					uint8_t *event,
 					uint32_t len);
 
-#ifdef WLAN_FEATURE_DISA
-QDF_STATUS (*send_encrypt_decrypt_send_cmd)(wmi_unified_t wmi_handle,
-				struct disa_encrypt_decrypt_req_params *params);
-
-QDF_STATUS (*extract_encrypt_decrypt_resp_event)(wmi_unified_t wmi_handle,
-			void *evt_buf,
-			struct disa_encrypt_decrypt_resp_params *resp);
-#endif
-
 #ifdef FEATURE_WLAN_TDLS
 QDF_STATUS (*send_set_tdls_offchan_mode_cmd)(wmi_unified_t wmi_handle,
 			      struct tdls_channel_switch_params *chan_switch_params);
@@ -1043,6 +1034,13 @@ QDF_STATUS (*send_pdev_fips_cmd)(wmi_unified_t wmi_handle,
 QDF_STATUS (*send_wlan_profile_enable_cmd)(wmi_unified_t wmi_handle,
 		struct wlan_profile_params *param);
 
+#ifdef WLAN_FEATURE_DISA
+QDF_STATUS
+(*send_encrypt_decrypt_send_cmd)(wmi_unified_t wmi_handle,
+				 struct disa_encrypt_decrypt_req_params
+				 *params);
+#endif
+
 QDF_STATUS (*send_wlan_profile_trigger_cmd)(wmi_unified_t wmi_handle,
 		struct wlan_profile_params *param);
 
@@ -1390,6 +1388,14 @@ QDF_STATUS (*extract_dcs_im_tgt_stats)(wmi_unified_t wmi_handle, void *evt_buf,
 QDF_STATUS (*extract_fips_event_data)(wmi_unified_t wmi_handle,
 	void *evt_buf, struct wmi_host_fips_event_param *param);
 
+#ifdef WLAN_FEATURE_DISA
+QDF_STATUS
+(*extract_encrypt_decrypt_resp_event)(wmi_unified_t wmi_handle,
+				      void *evt_buf,
+				      struct disa_encrypt_decrypt_resp_params
+				      *resp);
+#endif
+
 QDF_STATUS (*extract_vdev_start_resp)(wmi_unified_t wmi_handle, void *evt_buf,
 	wmi_host_vdev_start_resp *vdev_rsp);
 
@@ -2357,14 +2363,6 @@ static inline void wmi_tdls_attach_tlv(struct wmi_unified *wmi_handle)
 }
 #endif
 
-#ifdef WLAN_FEATURE_DISA
-void wmi_disa_attach_tlv(struct wmi_unified *wmi_handle);
-#else
-static inline void wmi_disa_attach_tlv(struct wmi_unified *wmi_handle)
-{
-}
-#endif
-
 #ifdef WLAN_POLICY_MGR_ENABLE
 void wmi_policy_mgr_attach_tlv(struct wmi_unified *wmi_handle);
 #else

+ 0 - 27
wmi/inc/wmi_unified_sta_api.h

@@ -72,33 +72,6 @@ QDF_STATUS
 wmi_unified_vdev_set_gtx_cfg_cmd(wmi_unified_t wmi_handle, uint32_t if_id,
 				 struct wmi_gtx_config *gtx_info);
 
-#ifdef WLAN_FEATURE_DISA
-/**
- * wmi_unified_encrypt_decrypt_send_cmd() - send encryptdecrypt cmd to fw
- * @wmi_handle: wmi handle
- * @params: encrypt/decrypt params
- *
- * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
- */
-QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(
-			wmi_unified_t wmi_handle,
-			struct disa_encrypt_decrypt_req_params *params);
-
-/**
- * wmi_extract_encrypt_decrypt_resp_params() -
- *       extract encrypt decrypt resp params from event buffer
- * @wmi_handle: wmi handle
- * @evt_buf: pointer to event buffer
- * @resp: encrypt decrypt resp params
- *
- * Return: QDF_STATUS_SUCCESS for success or error code
- */
-QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(
-			wmi_unified_t wmi_handle,
-			uint8_t *evt_buf,
-			struct disa_encrypt_decrypt_resp_params *resp);
-#endif /* WLAN_FEATURE_DISA */
-
 #ifdef FEATURE_BLACKLIST_MGR
 /**
  * wmi_unified_send_reject_ap_list() - send the reject ap list maintained by

+ 34 - 0
wmi/src/wmi_unified_api.c

@@ -1097,6 +1097,22 @@ wmi_unified_pdev_fips_cmd_send(wmi_unified_t wmi_handle,
 	return QDF_STATUS_E_FAILURE;
 }
 
+#ifdef WLAN_FEATURE_DISA
+QDF_STATUS
+wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
+				     struct disa_encrypt_decrypt_req_params
+				     *params)
+{
+	wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
+
+	if (wmi_handle->ops->send_encrypt_decrypt_send_cmd)
+		return wmi_handle->ops->send_encrypt_decrypt_send_cmd(wmi_handle
+								      , params);
+
+	return QDF_STATUS_E_FAILURE;
+}
+#endif /* WLAN_FEATURE_DISA */
+
 QDF_STATUS
 wmi_unified_wlan_profile_enable_cmd_send(wmi_unified_t wmi_handle,
 					 struct wlan_profile_params *param)
@@ -1791,6 +1807,24 @@ wmi_extract_fips_event_data(wmi_unified_t wmi_handle, void *evt_buf,
 	return QDF_STATUS_E_FAILURE;
 }
 
+#ifdef WLAN_FEATURE_DISA
+QDF_STATUS
+wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl, void *evt_buf,
+					struct disa_encrypt_decrypt_resp_params
+					*param)
+{
+	wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
+
+	if (wmi_handle->ops->extract_encrypt_decrypt_resp_event)
+		return
+		wmi_handle->ops->extract_encrypt_decrypt_resp_event(wmi_handle,
+								    evt_buf,
+								    param);
+
+	return QDF_STATUS_E_FAILURE;
+}
+#endif /* WLAN_FEATURE_DISA */
+
 QDF_STATUS
 wmi_extract_mgmt_rx_params(wmi_unified_t wmi_handle, void *evt_buf,
 			   struct mgmt_rx_event_params *hdr, uint8_t **bufp)

+ 0 - 25
wmi/src/wmi_unified_sta_api.c

@@ -181,31 +181,6 @@ QDF_STATUS wmi_extract_vdev_tdls_ev_param(wmi_unified_t wmi_handle,
 }
 #endif /* FEATURE_WLAN_TDLS */
 
-#ifdef WLAN_FEATURE_DISA
-QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(
-			wmi_unified_t wmi_handle,
-			struct disa_encrypt_decrypt_req_params *params)
-{
-	if (wmi_handle->ops->send_encrypt_decrypt_send_cmd)
-		return wmi_handle->ops->send_encrypt_decrypt_send_cmd(
-						wmi_handle,
-						params);
-	return QDF_STATUS_E_FAILURE;
-}
-
-QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(
-			wmi_unified_t wmi_handle,
-			uint8_t *evt_buf,
-			struct disa_encrypt_decrypt_resp_params *resp)
-{
-	if (wmi_handle->ops->extract_encrypt_decrypt_resp_event)
-		return wmi_handle->ops->extract_encrypt_decrypt_resp_event(
-				wmi_handle, evt_buf, resp);
-
-	return QDF_STATUS_E_FAILURE;
-}
-#endif /* WLAN_FEATURE_DISA */
-
 #ifdef FEATURE_BLACKLIST_MGR
 QDF_STATUS
 wmi_unified_send_reject_ap_list(struct wmi_unified *wmi_handle,

+ 0 - 138
wmi/src/wmi_unified_sta_tlv.c

@@ -1189,143 +1189,6 @@ void wmi_blacklist_mgr_attach_tlv(struct wmi_unified *wmi_handle)
 }
 #endif
 
-#ifdef WLAN_FEATURE_DISA
-/**
- * send_encrypt_decrypt_send_cmd() - send encrypt/decrypt cmd to fw
- * @wmi_handle: wmi handle
- * @params: encrypt/decrypt params
- *
- * Return: QDF_STATUS_SUCCESS for success or error code
- */
-static
-QDF_STATUS send_encrypt_decrypt_send_cmd_tlv(wmi_unified_t wmi_handle,
-		struct disa_encrypt_decrypt_req_params *encrypt_decrypt_params)
-{
-	wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param *cmd;
-	wmi_buf_t wmi_buf;
-	uint8_t *buf_ptr;
-	QDF_STATUS ret;
-	uint32_t len;
-
-	WMI_LOGD(FL("Send encrypt decrypt cmd"));
-
-	len = sizeof(*cmd) +
-		roundup(encrypt_decrypt_params->data_len, sizeof(uint32_t)) +
-		WMI_TLV_HDR_SIZE;
-	wmi_buf = wmi_buf_alloc(wmi_handle, len);
-	if (!wmi_buf) {
-		return QDF_STATUS_E_NOMEM;
-	}
-
-	buf_ptr = wmi_buf_data(wmi_buf);
-	cmd = (wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param *)buf_ptr;
-
-	WMITLV_SET_HDR(&cmd->tlv_header,
-		WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param,
-		WMITLV_GET_STRUCT_TLVLEN(
-			wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param));
-
-	cmd->vdev_id = encrypt_decrypt_params->vdev_id;
-	cmd->key_flag = encrypt_decrypt_params->key_flag;
-	cmd->key_idx = encrypt_decrypt_params->key_idx;
-	cmd->key_cipher = encrypt_decrypt_params->key_cipher;
-	cmd->key_len = encrypt_decrypt_params->key_len;
-	cmd->key_txmic_len = encrypt_decrypt_params->key_txmic_len;
-	cmd->key_rxmic_len = encrypt_decrypt_params->key_rxmic_len;
-
-	qdf_mem_copy(cmd->key_data, encrypt_decrypt_params->key_data,
-		     encrypt_decrypt_params->key_len);
-
-	qdf_mem_copy(cmd->mac_hdr, encrypt_decrypt_params->mac_header,
-		     MAX_MAC_HEADER_LEN);
-
-	cmd->data_len = encrypt_decrypt_params->data_len;
-
-	if (cmd->data_len) {
-		buf_ptr += sizeof(*cmd);
-		WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE,
-			       roundup(encrypt_decrypt_params->data_len,
-				       sizeof(uint32_t)));
-		buf_ptr += WMI_TLV_HDR_SIZE;
-		qdf_mem_copy(buf_ptr, encrypt_decrypt_params->data,
-			     encrypt_decrypt_params->data_len);
-	}
-
-	/* This conversion is to facilitate data to FW in little endian */
-	cmd->pn[5] = encrypt_decrypt_params->pn[0];
-	cmd->pn[4] = encrypt_decrypt_params->pn[1];
-	cmd->pn[3] = encrypt_decrypt_params->pn[2];
-	cmd->pn[2] = encrypt_decrypt_params->pn[3];
-	cmd->pn[1] = encrypt_decrypt_params->pn[4];
-	cmd->pn[0] = encrypt_decrypt_params->pn[5];
-
-	wmi_mtrace(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID, cmd->vdev_id, 0);
-	ret = wmi_unified_cmd_send(wmi_handle,
-				   wmi_buf, len,
-				   WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID);
-	if (QDF_IS_STATUS_ERROR(ret)) {
-		WMI_LOGE("Failed to send ENCRYPT DECRYPT cmd: %d", ret);
-		wmi_buf_free(wmi_buf);
-	}
-
-	return ret;
-}
-
-/**
- * extract_encrypt_decrypt_resp_event_tlv() - extract encrypt decrypt resp
- *	params from event
- * @wmi_handle: wmi handle
- * @evt_buf: pointer to event buffer
- * @resp: Pointer to hold resp parameters
- *
- * Return: QDF_STATUS_SUCCESS for success or error code
- */
-static
-QDF_STATUS extract_encrypt_decrypt_resp_event_tlv(wmi_unified_t wmi_handle,
-	void *evt_buf, struct disa_encrypt_decrypt_resp_params *resp)
-{
-	WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID_param_tlvs *param_buf;
-	wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param *data_event;
-
-	param_buf = evt_buf;
-	if (!param_buf) {
-		WMI_LOGE("encrypt decrypt resp evt_buf is NULL");
-		return QDF_STATUS_E_INVAL;
-	}
-
-	data_event = param_buf->fixed_param;
-
-	resp->vdev_id = data_event->vdev_id;
-	resp->status = data_event->status;
-
-	if ((data_event->data_length > param_buf->num_enc80211_frame) ||
-	    (data_event->data_length > WMI_SVC_MSG_MAX_SIZE - WMI_TLV_HDR_SIZE -
-	     sizeof(*data_event))) {
-		WMI_LOGE("FW msg data_len %d more than TLV hdr %d",
-			 data_event->data_length,
-			 param_buf->num_enc80211_frame);
-		return QDF_STATUS_E_INVAL;
-	}
-
-	resp->data_len = data_event->data_length;
-
-	if (resp->data_len)
-		resp->data = (uint8_t *)param_buf->enc80211_frame;
-
-	return QDF_STATUS_SUCCESS;
-}
-
-void wmi_disa_attach_tlv(struct wmi_unified *wmi_handle)
-{
-	struct wmi_ops *ops = wmi_handle->ops;
-
-	ops->send_encrypt_decrypt_send_cmd =
-		send_encrypt_decrypt_send_cmd_tlv;
-	ops->extract_encrypt_decrypt_resp_event =
-		extract_encrypt_decrypt_resp_event_tlv;
-}
-#endif /* WLAN_FEATURE_DISA */
-
 /**
  * send_sar_limit_cmd_tlv() - send sar limit cmd to fw
  * @wmi_handle: wmi handle
@@ -2547,7 +2410,6 @@ void wmi_sta_attach_tlv(wmi_unified_t wmi_handle)
 	ops->send_peer_unmap_conf_cmd = send_peer_unmap_conf_cmd_tlv;
 
 	wmi_tdls_attach_tlv(wmi_handle);
-	wmi_disa_attach_tlv(wmi_handle);
 	wmi_policy_mgr_attach_tlv(wmi_handle);
 	wmi_blacklist_mgr_attach_tlv(wmi_handle);
 }

+ 138 - 0
wmi/src/wmi_unified_tlv.c

@@ -7085,6 +7085,89 @@ static QDF_STATUS fips_align_data_be(wmi_unified_t wmi_handle,
 }
 #endif
 
+#ifdef WLAN_FEATURE_DISA
+/**
+ * send_encrypt_decrypt_send_cmd() - send encrypt/decrypt cmd to fw
+ * @wmi_handle: wmi handle
+ * @params: encrypt/decrypt params
+ *
+ * Return: QDF_STATUS_SUCCESS for success or error code
+ */
+static QDF_STATUS
+send_encrypt_decrypt_send_cmd_tlv(wmi_unified_t wmi_handle,
+				  struct disa_encrypt_decrypt_req_params
+				  *encrypt_decrypt_params)
+{
+	wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param *cmd;
+	wmi_buf_t wmi_buf;
+	uint8_t *buf_ptr;
+	QDF_STATUS ret;
+	uint32_t len;
+
+	WMI_LOGD(FL("Send encrypt decrypt cmd"));
+
+	len = sizeof(*cmd) +
+			encrypt_decrypt_params->data_len +
+			WMI_TLV_HDR_SIZE;
+	wmi_buf = wmi_buf_alloc(wmi_handle, len);
+	if (!wmi_buf)
+		return QDF_STATUS_E_NOMEM;
+
+	buf_ptr = wmi_buf_data(wmi_buf);
+	cmd = (wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param *)buf_ptr;
+
+	WMITLV_SET_HDR(&cmd->tlv_header,
+		       WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param,
+		       WMITLV_GET_STRUCT_TLVLEN(
+		       wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param));
+
+	cmd->vdev_id = encrypt_decrypt_params->vdev_id;
+	cmd->key_flag = encrypt_decrypt_params->key_flag;
+	cmd->key_idx = encrypt_decrypt_params->key_idx;
+	cmd->key_cipher = encrypt_decrypt_params->key_cipher;
+	cmd->key_len = encrypt_decrypt_params->key_len;
+	cmd->key_txmic_len = encrypt_decrypt_params->key_txmic_len;
+	cmd->key_rxmic_len = encrypt_decrypt_params->key_rxmic_len;
+
+	qdf_mem_copy(cmd->key_data, encrypt_decrypt_params->key_data,
+		     encrypt_decrypt_params->key_len);
+
+	qdf_mem_copy(cmd->mac_hdr, encrypt_decrypt_params->mac_header,
+		     MAX_MAC_HEADER_LEN);
+
+	cmd->data_len = encrypt_decrypt_params->data_len;
+
+	if (cmd->data_len) {
+		buf_ptr += sizeof(*cmd);
+		WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE,
+			       roundup(encrypt_decrypt_params->data_len,
+				       sizeof(uint32_t)));
+		buf_ptr += WMI_TLV_HDR_SIZE;
+		qdf_mem_copy(buf_ptr, encrypt_decrypt_params->data,
+			     encrypt_decrypt_params->data_len);
+	}
+
+	/* This conversion is to facilitate data to FW in little endian */
+	cmd->pn[5] = encrypt_decrypt_params->pn[0];
+	cmd->pn[4] = encrypt_decrypt_params->pn[1];
+	cmd->pn[3] = encrypt_decrypt_params->pn[2];
+	cmd->pn[2] = encrypt_decrypt_params->pn[3];
+	cmd->pn[1] = encrypt_decrypt_params->pn[4];
+	cmd->pn[0] = encrypt_decrypt_params->pn[5];
+
+	wmi_mtrace(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID, cmd->vdev_id, 0);
+	ret = wmi_unified_cmd_send(wmi_handle,
+				   wmi_buf, len,
+				   WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID);
+	if (QDF_IS_STATUS_ERROR(ret)) {
+		WMI_LOGE("Failed to send ENCRYPT DECRYPT cmd: %d", ret);
+		wmi_buf_free(wmi_buf);
+	}
+
+	return ret;
+}
+#endif /* WLAN_FEATURE_DISA */
+
 /**
  * send_pdev_fips_cmd_tlv() - send pdev fips cmd to fw
  * @wmi_handle: wmi handle
@@ -10003,6 +10086,54 @@ static QDF_STATUS extract_fips_event_data_tlv(wmi_unified_t wmi_handle,
 	return QDF_STATUS_SUCCESS;
 }
 
+#ifdef WLAN_FEATURE_DISA
+/**
+ * extract_encrypt_decrypt_resp_event_tlv() - extract encrypt decrypt resp
+ *      params from event
+ * @wmi_handle: wmi handle
+ * @evt_buf: pointer to event buffer
+ * @resp: Pointer to hold resp parameters
+ *
+ * Return: QDF_STATUS_SUCCESS for success or error code
+ */
+static QDF_STATUS
+extract_encrypt_decrypt_resp_event_tlv(wmi_unified_t wmi_handle,
+				       void *evt_buf,
+				       struct disa_encrypt_decrypt_resp_params
+				       *resp)
+{
+	WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID_param_tlvs *param_buf;
+	wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param *data_event;
+
+	param_buf = evt_buf;
+	if (!param_buf) {
+		WMI_LOGE("encrypt decrypt resp evt_buf is NULL");
+		return QDF_STATUS_E_INVAL;
+	}
+
+	data_event = param_buf->fixed_param;
+
+	resp->vdev_id = data_event->vdev_id;
+	resp->status = data_event->status;
+
+	if ((data_event->data_length > param_buf->num_enc80211_frame) ||
+	    (data_event->data_length > WMI_SVC_MSG_MAX_SIZE -
+		 WMI_TLV_HDR_SIZE - sizeof(*data_event))) {
+		WMI_LOGE("FW msg data_len %d more than TLV hdr %d",
+			 data_event->data_length,
+			 param_buf->num_enc80211_frame);
+		return QDF_STATUS_E_INVAL;
+	}
+
+	resp->data_len = data_event->data_length;
+
+	if (resp->data_len)
+		resp->data = (uint8_t *)param_buf->enc80211_frame;
+
+	return QDF_STATUS_SUCCESS;
+}
+#endif /* WLAN_FEATURE_DISA */
+
 static bool is_management_record_tlv(uint32_t cmd_id)
 {
 	switch (cmd_id) {
@@ -11921,7 +12052,14 @@ struct wmi_ops tlv_ops =  {
 	.extract_pdev_utf_event = extract_pdev_utf_event_tlv,
 	.wmi_set_htc_tx_tag = wmi_set_htc_tx_tag_tlv,
 	.extract_fips_event_data = extract_fips_event_data_tlv,
+#ifdef WLAN_FEATURE_DISA
+	.extract_encrypt_decrypt_resp_event =
+				extract_encrypt_decrypt_resp_event_tlv,
+#endif
 	.send_pdev_fips_cmd = send_pdev_fips_cmd_tlv,
+#ifdef WLAN_FEATURE_DISA
+	.send_encrypt_decrypt_send_cmd = send_encrypt_decrypt_send_cmd_tlv,
+#endif
 	.is_management_record = is_management_record_tlv,
 	.is_diag_event = is_diag_event_tlv,
 #ifdef WLAN_FEATURE_ACTION_OUI