Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae018232 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge b3bbf011 on remote branch

Change-Id: If6188550966645d7a0c77628fa9badf03923be8a
parents c49e1025 b3bbf011
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -427,14 +427,15 @@ cdp_ipa_setup(ol_txrx_soc_handle soc, uint8_t pdev_id, void *ipa_i2w_cb,
/**
 * cdp_ipa_cleanup() - Disconnect IPA pipes
 * @soc: data path soc handle
 * @pdev_id: handle to the device instance number
 * @tx_pipe_handle: Tx pipe handle
 * @rx_pipe_handle: Rx pipe handle
 *
 * Return: QDF_STATUS
 */
static inline QDF_STATUS
cdp_ipa_cleanup(ol_txrx_soc_handle soc, uint32_t tx_pipe_handle,
		uint32_t rx_pipe_handle)
cdp_ipa_cleanup(ol_txrx_soc_handle soc, uint8_t pdev_id,
		uint32_t tx_pipe_handle, uint32_t rx_pipe_handle)
{
	if (!soc || !soc->ops || !soc->ops->ipa_ops) {
		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
@@ -443,7 +444,8 @@ cdp_ipa_cleanup(ol_txrx_soc_handle soc, uint32_t tx_pipe_handle,
	}

	if (soc->ops->ipa_ops->ipa_cleanup)
		return soc->ops->ipa_ops->ipa_cleanup(tx_pipe_handle,
		return soc->ops->ipa_ops->ipa_cleanup(soc, pdev_id,
						      tx_pipe_handle,
						      rx_pipe_handle);

	return QDF_STATUS_SUCCESS;
+3 −2
Original line number Diff line number Diff line
@@ -1544,7 +1544,8 @@ struct cdp_ipa_ops {
				bool is_rm_enabled, uint32_t *tx_pipe_handle,
				uint32_t *rx_pipe_handle);
#endif /* CONFIG_IPA_WDI_UNIFIED_API */
	QDF_STATUS (*ipa_cleanup)(uint32_t tx_pipe_handle,
	QDF_STATUS (*ipa_cleanup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
				  uint32_t tx_pipe_handle,
				  uint32_t rx_pipe_handle);
	QDF_STATUS (*ipa_setup_iface)(char *ifname, uint8_t *mac_addr,
		qdf_ipa_client_type_t prod_client,
+31 −0
Original line number Diff line number Diff line
@@ -2109,6 +2109,23 @@ void dp_set_max_page_size(struct qdf_mem_multi_page_t *pages,
#endif /* MAX_ALLOC_PAGE_SIZE */

#ifdef DP_MEM_PRE_ALLOC
/**
 * dp_desc_multi_pages_mem_alloc() - alloc memory over multiple pages
 * @soc: datapath soc handle
 * @desc_type: memory request source type
 * @pages: multi page information storage
 * @element_size: each element size
 * @element_num: total number of elements should be allocated
 * @memctxt: memory context
 * @cacheable: coherent memory or cacheable memory
 *
 * This function is a wrapper for memory allocation over multiple
 * pages, if dp prealloc method is registered, then will try prealloc
 * firstly. if prealloc failed, fall back to regular way over
 * qdf_mem_multi_pages_alloc().
 *
 * Return: None
 */
void dp_desc_multi_pages_mem_alloc(struct dp_soc *soc,
				   enum dp_desc_type desc_type,
				   struct qdf_mem_multi_page_t *pages,
@@ -2117,6 +2134,20 @@ void dp_desc_multi_pages_mem_alloc(struct dp_soc *soc,
				   qdf_dma_context_t memctxt,
				   bool cacheable);

/**
 * dp_desc_multi_pages_mem_free() - free multiple pages memory
 * @soc: datapath soc handle
 * @desc_type: memory request source type
 * @pages: multi page information storage
 * @memctxt: memory context
 * @cacheable: coherent memory or cacheable memory
 *
 * This function is a wrapper for multiple pages memory free,
 * if memory is got from prealloc pool, put it back to pool.
 * otherwise free by qdf_mem_multi_pages_free().
 *
 * Return: None
 */
void dp_desc_multi_pages_mem_free(struct dp_soc *soc,
				  enum dp_desc_type desc_type,
				  struct qdf_mem_multi_page_t *pages,
+35 −3
Original line number Diff line number Diff line
@@ -1561,23 +1561,55 @@ QDF_STATUS dp_ipa_setup_iface(char *ifname, uint8_t *mac_addr,

/**
 * dp_ipa_cleanup() - Disconnect IPA pipes
 * @soc_hdl: dp soc handle
 * @pdev_id: dp pdev id
 * @tx_pipe_handle: Tx pipe handle
 * @rx_pipe_handle: Rx pipe handle
 *
 * Return: QDF_STATUS
 */
QDF_STATUS dp_ipa_cleanup(uint32_t tx_pipe_handle, uint32_t rx_pipe_handle)
QDF_STATUS dp_ipa_cleanup(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
			  uint32_t tx_pipe_handle, uint32_t rx_pipe_handle)
{
	struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
	QDF_STATUS status = QDF_STATUS_SUCCESS;
	struct dp_ipa_resources *ipa_res;
	struct dp_pdev *pdev;
	int ret;

	ret = qdf_ipa_wdi_disconn_pipes();
	if (ret) {
		dp_err("ipa_wdi_disconn_pipes: IPA pipe cleanup failed: ret=%d",
		       ret);
		return QDF_STATUS_E_FAILURE;
		status = QDF_STATUS_E_FAILURE;
	}

	return QDF_STATUS_SUCCESS;
	pdev = dp_get_pdev_from_soc_pdev_id_wifi3(soc, pdev_id);
	if (qdf_unlikely(!pdev)) {
		dp_err_rl("Invalid pdev for pdev_id %d", pdev_id);
		status = QDF_STATUS_E_FAILURE;
		goto exit;
	}

	if (qdf_mem_smmu_s1_enabled(soc->osdev)) {
		ipa_res = &pdev->ipa_resource;

		/* unmap has to be the reverse order of smmu map */
		ret = pld_smmu_unmap(soc->osdev->dev,
				     ipa_res->rx_ready_doorbell_paddr,
				     sizeof(uint32_t));
		if (ret)
			dp_err_rl("IPA RX DB smmu unmap failed");

		ret = pld_smmu_unmap(soc->osdev->dev,
				     ipa_res->tx_comp_doorbell_paddr,
				     sizeof(uint32_t));
		if (ret)
			dp_err_rl("IPA TX DB smmu unmap failed");
	}

exit:
	return status;
}

/**
+3 −2
Original line number Diff line number Diff line
@@ -186,7 +186,8 @@ QDF_STATUS dp_ipa_setup(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
			bool is_rm_enabled, uint32_t *tx_pipe_handle,
			uint32_t *rx_pipe_handle);
#endif /* CONFIG_IPA_WDI_UNIFIED_API */
QDF_STATUS dp_ipa_cleanup(uint32_t tx_pipe_handle,
QDF_STATUS dp_ipa_cleanup(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
			  uint32_t tx_pipe_handle,
			  uint32_t rx_pipe_handle);
QDF_STATUS dp_ipa_remove_header(char *name);
int dp_ipa_add_header_info(char *ifname, uint8_t *mac_addr,
Loading