Browse Source

qcacld-3.0: Modify IPA UC offload control cmd

IPA module has been moved to CLD component under the converged
driver model. Remove legacy WMA interface IPA command and use
the new defined API.

Change-Id: Icd9a207f43f8df4dc563d0078d402470683cfd7d
CRs-Fixed: 2177925
Sravan Kumar Kairam 7 years ago
parent
commit
a0600b8a87

+ 2 - 1
components/target_if/ipa/src/target_if_ipa.c

@@ -40,7 +40,8 @@ static QDF_STATUS
 target_if_ipa_uc_offload_control_req(struct wlan_objmgr_psoc *psoc,
 			struct ipa_uc_offload_control_params *req)
 {
-	return QDF_STATUS_SUCCESS;
+	return wmi_unified_ipa_offload_control_cmd(GET_WMI_HDL_FROM_PSOC(psoc),
+						   req);
 }
 
 void target_if_ipa_register_tx_ops(ipa_uc_offload_control_req ipa_tx_op)

+ 0 - 6
core/mac/inc/sir_api.h

@@ -4787,12 +4787,6 @@ enum {
 	SIR_STA_RX_DATA_OFFLOAD            = 0x01,
 };
 
-struct sir_ipa_offload_enable_disable {
-	uint32_t offload_type;
-	uint32_t vdev_id;
-	uint32_t enable;
-};
-
 /**
  * struct sir_set_vdev_ies_per_band
  * @msg_type: message type

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

@@ -631,7 +631,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
 #ifdef WLAN_FEATURE_STATS_EXT
 		CASE_RETURN_STRING(WMA_STATS_EXT_REQUEST);
 #endif
-		CASE_RETURN_STRING(WMA_IPA_OFFLOAD_ENABLE_DISABLE);
 		CASE_RETURN_STRING(WMA_GET_TEMPERATURE_REQ);
 #ifdef FEATURE_WLAN_EXTSCAN
 		CASE_RETURN_STRING(WMA_EXTSCAN_GET_CAPABILITIES_REQ);

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

@@ -982,27 +982,6 @@ QDF_STATUS sme_get_temperature(tHalHandle hHal,
 QDF_STATUS sme_set_scanning_mac_oui(tHalHandle hHal,
 		tSirScanMacOui *pScanMacOui);
 
-#ifdef IPA_OFFLOAD
-/* ---------------------------------------------------------------------------
-    \fn sme_ipa_offload_enable_disable
-    \brief  API to enable/disable IPA offload
-    \param  hHal - The handle returned by macOpen.
-    \param  sessionId - Session Identifier
-    \param  pRequest -  Pointer to the offload request.
-    \return QDF_STATUS
-  ---------------------------------------------------------------------------*/
-QDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal,
-				uint8_t session_id,
-				struct sir_ipa_offload_enable_disable *request);
-#else
-static inline QDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal,
-				uint8_t session_id,
-				struct sir_ipa_offload_enable_disable *request)
-{
-	return QDF_STATUS_SUCCESS;
-}
-#endif /* IPA_OFFLOAD */
-
 #ifdef DHCP_SERVER_OFFLOAD
 QDF_STATUS sme_set_dhcp_srv_offload(tHalHandle hHal,
 		tSirDhcpSrvOffloadInfo * pDhcpSrvInfo);

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

@@ -8722,57 +8722,6 @@ QDF_STATUS sme_handoff_request(tHalHandle hHal,
 	return status;
 }
 
-#ifdef IPA_OFFLOAD
-/*
- * sme_ipa_offload_enable_disable() -
- *  API to enable/disable IPA offload
- *
- * hal - The handle returned by macOpen.
- * session_id - Session Identifier
- * request -  Pointer to the offload request.
- * Return QDF_STATUS
- */
-QDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal, uint8_t session_id,
-		struct sir_ipa_offload_enable_disable *request)
-{
-	tpAniSirGlobal pMac = PMAC_STRUCT(hal);
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	struct sir_ipa_offload_enable_disable *request_buf;
-	struct scheduler_msg msg = {0};
-
-	status = sme_acquire_global_lock(&pMac->sme);
-	if (QDF_STATUS_SUCCESS == status) {
-		request_buf = qdf_mem_malloc(sizeof(*request_buf));
-		if (NULL == request_buf) {
-			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-				"Not able to allocate memory for IPA_OFFLOAD_ENABLE_DISABLE");
-			sme_release_global_lock(&pMac->sme);
-			return QDF_STATUS_E_NOMEM;
-		}
-
-		request_buf->offload_type = request->offload_type;
-		request_buf->vdev_id = request->vdev_id;
-		request_buf->enable = request->enable;
-
-		msg.type     = WMA_IPA_OFFLOAD_ENABLE_DISABLE;
-		msg.reserved = 0;
-		msg.bodyptr  = request_buf;
-		if (!QDF_IS_STATUS_SUCCESS(
-				scheduler_post_msg(QDF_MODULE_ID_WMA, &msg))) {
-			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-				"Not able to post WMA_IPA_OFFLOAD_ENABLE_DISABLE message to WMA");
-			qdf_mem_free(request_buf);
-			sme_release_global_lock(&pMac->sme);
-			return QDF_STATUS_E_FAILURE;
-		}
-
-		sme_release_global_lock(&pMac->sme);
-	}
-
-	return QDF_STATUS_SUCCESS;
-}
-#endif /* IPA_OFFLOAD */
-
 /*
  * SME API to check if there is any infra station or
  * P2P client is connected

+ 0 - 3
core/wma/inc/wma_internal.h

@@ -409,9 +409,6 @@ QDF_STATUS wma_reset_passpoint_network_list(tp_wma_handle wma,
 					struct wifi_passpoint_req *req);
 #endif
 
-QDF_STATUS  wma_ipa_offload_enable_disable(tp_wma_handle wma,
-			struct sir_ipa_offload_enable_disable *ipa_offload);
-
 QDF_STATUS wma_scan_probe_setoui(tp_wma_handle wma, tSirScanMacOui *psetoui);
 
 int wma_scan_event_callback(WMA_HANDLE handle, uint8_t *data, uint32_t len);

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

@@ -383,8 +383,6 @@
 #define WMA_STATS_EXT_REQUEST              SIR_HAL_STATS_EXT_REQUEST
 #endif
 
-#define WMA_IPA_OFFLOAD_ENABLE_DISABLE        SIR_HAL_IPA_OFFLOAD_ENABLE_DISABLE
-
 #define WMA_GET_TEMPERATURE_REQ     SIR_HAL_GET_TEMPERATURE_REQ
 #define WMA_SET_WISA_PARAMS         SIR_HAL_SET_WISA_PARAMS
 

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

@@ -8084,11 +8084,6 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
 				      msg->bodyptr);
 		qdf_mem_free(msg->bodyptr);
 		break;
-	case WMA_IPA_OFFLOAD_ENABLE_DISABLE:
-		wma_ipa_offload_enable_disable(wma_handle,
-			(struct sir_ipa_offload_enable_disable *)msg->bodyptr);
-		qdf_mem_free(msg->bodyptr);
-		break;
 	case SIR_HAL_START_STOP_LOGGING:
 		wma_set_wifi_start_packet_stats(wma_handle,
 				(struct sir_wifi_start_log *)msg->bodyptr);

+ 0 - 73
core/wma/src/wma_scan_roam.c

@@ -5068,79 +5068,6 @@ QDF_STATUS wma_extscan_get_capabilities(tp_wma_handle wma,
 						&params);
 }
 
-QDF_STATUS  wma_ipa_offload_enable_disable(tp_wma_handle wma,
-		struct sir_ipa_offload_enable_disable *ipa_offload)
-{
-	struct cdp_vdev *vdev;
-	int32_t intra_bss_fwd = 0;
-	struct ipa_offload_control_params params = {0};
-	QDF_STATUS status;
-	uint8_t rx_fwd_disabled;
-
-	if (!wma || !wma->wmi_handle) {
-		WMA_LOGE("%s: WMA is closed, can not issue  cmd",
-			__func__);
-		return QDF_STATUS_E_INVAL;
-	}
-
-	if (!wmi_service_enabled(wma->wmi_handle,
-			((ipa_offload->offload_type == AP_RX_DATA_OFFLOAD) ?
-			wmi_service_hsoffload :
-			wmi_service_sta_rx_ipa_offload_support))) {
-		WMA_LOGE("%s: %s not supported", __func__,
-			((ipa_offload->offload_type == AP_RX_DATA_OFFLOAD) ?
-			"WMI_SERVICE_HSOFFLOAD" :
-			"WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT"));
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	if (ipa_offload->offload_type > STA_RX_DATA_OFFLOAD)
-		return QDF_STATUS_E_INVAL;
-
-	params.offload_type = ipa_offload->offload_type;
-	params.vdev_id = ipa_offload->vdev_id;
-	params.enable = ipa_offload->enable;
-
-	WMA_LOGI("%s: offload_type=%d, vdev_id=%d, enable=%d",
-		__func__,
-		ipa_offload->offload_type, ipa_offload->vdev_id,
-		ipa_offload->enable);
-
-	status = wmi_unified_ipa_offload_control_cmd(wma->wmi_handle,
-						&params);
-	if (QDF_IS_STATUS_ERROR(status))
-		return status;
-
-	/*
-	 * Check if VDEV is already deleted. If deleted, don't
-	 * send INTRA BSS FWD WMI command
-	 */
-	vdev = wma_find_vdev_by_id(wma, ipa_offload->vdev_id);
-	if (!vdev)
-		return QDF_STATUS_SUCCESS;
-
-	/* Disable Intra-BSS FWD offload when gDisableIntraBssFwd=1 in INI */
-	rx_fwd_disabled = cdp_cfg_is_rx_fwd_disabled(
-		cds_get_context(QDF_MODULE_ID_SOC), vdev);
-	if (!ipa_offload->enable || rx_fwd_disabled) {
-		WMA_LOGI("%s: ipa_offload->enable=%d, rx_fwd_disabled=%d",
-				__func__,
-				ipa_offload->enable, rx_fwd_disabled);
-		intra_bss_fwd = 1;
-	}
-
-	/* Disable/enable WMI_VDEV_PARAM_INTRA_BSS_FWD */
-	status = wma_vdev_set_param(wma->wmi_handle,
-		ipa_offload->vdev_id, WMI_VDEV_PARAM_INTRA_BSS_FWD,
-		intra_bss_fwd);
-	if (QDF_IS_STATUS_ERROR(status)) {
-		WMA_LOGE("Failed to disable WMI_VDEV_PARAM_INTRA_BSS_FWD");
-		return status;
-	}
-
-	return status;
-}
-
 /** wma_set_epno_network_list() - set epno network list
  * @wma: WMA handle
  * @req: epno config params request structure