Browse Source

qcacld-3.0: Cleanup WMA and SME code related to DISA

DISA feature has been moved to a CLD component under the converged
driver model. This renders original code in WMA and SME obsolete.
Remove it.

Change-Id: Ia44acd9a3e31bf0d1098f7d423f0c28a2b7fe5fa
CRs-Fixed: 2161950
Nachiket Kukade 7 years ago
parent
commit
2c73ade073

+ 0 - 1
core/mac/src/sys/legacy/src/utils/src/mac_trace.c

@@ -593,7 +593,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
 		CASE_RETURN_STRING(WMA_SET_PDEV_IE_REQ);
 		CASE_RETURN_STRING(WMA_UPDATE_WEP_DEFAULT_KEY);
 		CASE_RETURN_STRING(WMA_SEND_FREQ_RANGE_CONTROL_IND);
-		CASE_RETURN_STRING(WMA_ENCRYPT_DECRYPT_MSG);
 		CASE_RETURN_STRING(WMA_POWER_DEBUG_STATS_REQ);
 		CASE_RETURN_STRING(WNI_CFG_DNLD_REQ);
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD

+ 0 - 16
core/sme/inc/sme_api.h

@@ -1385,22 +1385,6 @@ QDF_STATUS sme_update_session_param(tHalHandle hal, uint8_t session_id,
  */
 QDF_STATUS sme_update_fils_setting(tHalHandle hal, uint8_t session_id,
 				   uint8_t param_val);
-#ifdef WLAN_FEATURE_DISA
-/**
- * sme_encrypt_decrypt_msg() - handles encrypt/decrypt mesaage
- * @hal: HAL handle
- * @encrypt_decrypt_params: struct to set encryption/decryption params.
- * @callback: callback function to be called with the result
- * @context: Opaque context to be passed to callback function
- *
- * Return: QDF_STATUS enumeration.
- */
-QDF_STATUS sme_encrypt_decrypt_msg(tHalHandle hal,
-		struct encrypt_decrypt_req_params *encrypt_decrypt_params,
-		sme_encrypt_decrypt_callback callback,
-		void *context);
-#endif
-
 #ifdef WLAN_FEATURE_FIPS
 /**
  * sme_fips_request() - Perform a FIPS certification operation

+ 0 - 64
core/sme/src/common/sme_api.c

@@ -14667,70 +14667,6 @@ QDF_STATUS sme_set_sar_power_limits(tHalHandle hal,
 	return wma_set_sar_limit(wma_handle, sar_limit_cmd);
 }
 
-#ifdef WLAN_FEATURE_DISA
-/**
- * sme_encrypt_decrypt_msg() - handles encrypt/decrypt mesaage
- * @hal: HAL handle
- * @encrypt_decrypt_params: struct to set encryption/decryption params.
- *
- * Return: QDF_STATUS enumeration.
- */
-QDF_STATUS sme_encrypt_decrypt_msg(tHalHandle hal,
-	struct encrypt_decrypt_req_params *encrypt_decrypt_params,
-	sme_encrypt_decrypt_callback callback,
-	void *context)
-{
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
-	struct scheduler_msg cds_msg = {0};
-	struct encrypt_decrypt_req_params *params;
-	uint8_t *ptr;
-
-	ptr = qdf_mem_malloc(sizeof(*params) +
-				encrypt_decrypt_params->data_len);
-	if (ptr == NULL) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-			"Failed to alloc memory for encrypt/decrypt params");
-		return QDF_STATUS_E_NOMEM;
-	}
-
-	params = (struct encrypt_decrypt_req_params *)ptr;
-
-	*params = *encrypt_decrypt_params;
-
-	if (params->data_len) {
-		params->data = ptr + sizeof(*params);
-
-		qdf_mem_copy(params->data, encrypt_decrypt_params->data,
-					params->data_len);
-	}
-
-	status = sme_acquire_global_lock(&mac_ctx->sme);
-	if (status == QDF_STATUS_SUCCESS) {
-		/* Serialize the req through MC thread */
-		mac_ctx->sme.encrypt_decrypt_cb = callback;
-		mac_ctx->sme.encrypt_decrypt_context = context;
-		cds_msg.bodyptr = params;
-		cds_msg.type = WMA_ENCRYPT_DECRYPT_MSG;
-		status = scheduler_post_msg(QDF_MODULE_ID_WMA, &cds_msg);
-
-		if (!QDF_IS_STATUS_SUCCESS(status)) {
-			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-				FL("Post encrypt/decrypt msg fail"));
-			status = QDF_STATUS_E_FAILURE;
-			qdf_mem_free(params);
-		}
-		sme_release_global_lock(&mac_ctx->sme);
-	} else {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-				FL("sme_acquire_global_lock failed"));
-		qdf_mem_free(params);
-	}
-	return status;
-
-}
-#endif
-
 #ifdef WLAN_FEATURE_FIPS
 QDF_STATUS sme_fips_request(tHalHandle hal, struct fips_params *param,
 			    wma_fips_cb callback, void *context)

+ 1 - 12
core/wma/inc/wma_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -254,17 +254,6 @@ void wma_process_pdev_hw_mode_trans_ind(void *wma,
 	wmi_pdev_set_hw_mode_response_vdev_mac_entry *vdev_mac_entry,
 	struct sir_hw_mode_trans_ind *hw_mode_trans_ind);
 
-#ifdef WLAN_FEATURE_DISA
-QDF_STATUS wma_encrypt_decrypt_msg(WMA_HANDLE wma,
-		struct encrypt_decrypt_req_params *encrypt_decrypt_params);
-#else
-static inline QDF_STATUS wma_encrypt_decrypt_msg(WMA_HANDLE wma,
-		struct encrypt_decrypt_req_params *encrypt_decrypt_params)
-{
-	return 0;
-}
-#endif
-
 /**
  * wma_set_cts2self_for_p2p_go() - set CTS2SELF command for P2P GO.
  * @wma_handle:                  pointer to wma handle.

+ 1 - 12
core/wma/inc/wma_internal.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -1139,17 +1139,6 @@ QDF_STATUS wma_process_hal_pwr_dbg_cmd(WMA_HANDLE handle,
 				       struct sir_mac_pwr_dbg_cmd *
 				       sir_pwr_dbg_params);
 
-#ifdef WLAN_FEATURE_DISA
-int wma_encrypt_decrypt_msg_handler(void *handle, uint8_t *data,
-			uint32_t data_len);
-#else
-static inline int wma_encrypt_decrypt_msg_handler(void *handle, uint8_t *data,
-			uint32_t data_len)
-{
-	return 0;
-}
-#endif
-
 /**
  * wma_lost_link_info_handler() - collect lost link information and inform SME
  * @wma: WMA handle

+ 0 - 1
core/wma/inc/wma_types.h

@@ -464,7 +464,6 @@
 #define WMA_SET_PDEV_IE_REQ                  SIR_HAL_SET_PDEV_IE_REQ
 #define WMA_UPDATE_WEP_DEFAULT_KEY           SIR_HAL_UPDATE_WEP_DEFAULT_KEY
 #define WMA_SEND_FREQ_RANGE_CONTROL_IND      SIR_HAL_SEND_FREQ_RANGE_CONTROL_IND
-#define WMA_ENCRYPT_DECRYPT_MSG              SIR_HAL_ENCRYPT_DECRYPT_MSG
 #define WMA_POWER_DEBUG_STATS_REQ            SIR_HAL_POWER_DEBUG_STATS_REQ
 #define WMA_GET_RCPI_REQ                     SIR_HAL_GET_RCPI_REQ
 

+ 0 - 116
core/wma/src/wma_features.c

@@ -4876,122 +4876,6 @@ QDF_STATUS wma_set_sar_limit(WMA_HANDLE handle,
 	return ret;
 }
 
-#ifdef WLAN_FEATURE_DISA
-/**
- * wma_encrypt_decrypt_msg() -
- * @encrypt_decrypt_params: encryption/decryption params
- * @data_len: data length
- * @encrypt_decrypt_cb: encrypt/decrypt callback
- *
- *  This function sends WMI command to check encryption/decryption engine.
- *
- *  Return: QDF_STATUS enumeration
- */
-QDF_STATUS wma_encrypt_decrypt_msg(WMA_HANDLE handle,
-		struct encrypt_decrypt_req_params *encrypt_decrypt_params)
-{
-	int ret;
-	tp_wma_handle wma = (tp_wma_handle) handle;
-
-	if (!wma || !wma->wmi_handle) {
-		WMA_LOGE("%s: WMA is closed, can not issue encrypt/decrypt msg",
-			__func__);
-		return QDF_STATUS_E_INVAL;
-	}
-
-	if (encrypt_decrypt_params == NULL) {
-		WMA_LOGE("%s: encrypt/decrypt ptr NULL",
-			__func__);
-		return QDF_STATUS_E_INVAL;
-	}
-
-	ret = wmi_unified_encrypt_decrypt_send_cmd(wma->wmi_handle,
-				encrypt_decrypt_params);
-
-	return ret;
-}
-
-/**
- * wma_encrypt_decrypt_msg_handler() - handle encrypt/decrypt data
- * indicated by FW
- * @handle: wma context
- * @data: event buffer
- * @data len: length of event buffer
- *
- * Return: 0 on success
- */
-int wma_encrypt_decrypt_msg_handler(void *handle, uint8_t *data,
-			uint32_t data_len)
-{
-	WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID_param_tlvs *param_buf;
-	wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param *data_event;
-	struct sir_encrypt_decrypt_rsp_params encrypt_decrypt_rsp_params;
-	tp_wma_handle wma = handle;
-	u_int8_t *buf_ptr;
-	tpAniSirGlobal pmac;
-
-	if (data == NULL) {
-		WMA_LOGE("%s: invalid pointer", __func__);
-		return -EINVAL;
-	}
-
-	if (wma == NULL) {
-		WMA_LOGE("%s: wma context is NULL", __func__);
-		return -EINVAL;
-	}
-
-	WMA_LOGE("%s: received WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID ",
-			__func__);
-
-	pmac = (tpAniSirGlobal)cds_get_context(QDF_MODULE_ID_PE);
-
-	if (!pmac) {
-		WMA_LOGE("%s: Invalid pmac", __func__);
-		return -EINVAL;
-	}
-	if (!pmac->sme.encrypt_decrypt_cb) {
-		WMA_LOGE("%s: Callback not registered", __func__);
-		return -EINVAL;
-	}
-
-	param_buf =
-		(WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID_param_tlvs *)data;
-	if (!param_buf) {
-		WMA_LOGE("%s: Invalid response data buf", __func__);
-		return -EINVAL;
-	}
-
-	data_event = param_buf->fixed_param;
-
-	encrypt_decrypt_rsp_params.vdev_id = data_event->vdev_id;
-	encrypt_decrypt_rsp_params.status = data_event->status;
-
-	if (data_event->data_length > param_buf->num_enc80211_frame) {
-		WMA_LOGE("FW msg data_len %d more than TLV hdr %d",
-			 data_event->data_length,
-			 param_buf->num_enc80211_frame);
-		return -EINVAL;
-	}
-
-	encrypt_decrypt_rsp_params.data_length = data_event->data_length;
-
-	if (encrypt_decrypt_rsp_params.data_length) {
-		buf_ptr =
-			(uint8_t *)data_event +
-			sizeof(
-			wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param) +
-			WMI_TLV_HDR_SIZE;
-
-		encrypt_decrypt_rsp_params.data = buf_ptr;
-	}
-
-	pmac->sme.encrypt_decrypt_cb(pmac->sme.encrypt_decrypt_context,
-				     &encrypt_decrypt_rsp_params);
-
-	return 0;
-}
-#endif
-
 /**
  * wma_get_arp_stats_handler() - handle arp stats data
  * indicated by FW

+ 0 - 8
core/wma/src/wma_main.c

@@ -2902,10 +2902,6 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
 					   wmi_bpf_capability_info_event_id,
 					   wma_get_bpf_caps_event_handler,
 					   WMA_RX_SERIALIZER_CTX);
-	wmi_unified_register_event_handler(wma_handle->wmi_handle,
-				wmi_vdev_encrypt_decrypt_data_rsp_event_id,
-				wma_encrypt_decrypt_msg_handler,
-				WMA_RX_SERIALIZER_CTX);
 	wmi_unified_register_event_handler(wma_handle->wmi_handle,
 					   wmi_chan_info_event_id,
 					   wma_chan_info_event_handler,
@@ -7948,10 +7944,6 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
 	case WMA_SEND_FREQ_RANGE_CONTROL_IND:
 		wma_enable_disable_caevent_ind(wma_handle, msg->bodyval);
 		break;
-	case WMA_ENCRYPT_DECRYPT_MSG:
-		wma_encrypt_decrypt_msg(wma_handle, msg->bodyptr);
-		qdf_mem_free(msg->bodyptr);
-		break;
 	case SIR_HAL_UPDATE_TX_FAIL_CNT_TH:
 		wma_update_tx_fail_cnt_th(wma_handle, msg->bodyptr);
 		qdf_mem_free(msg->bodyptr);