Sfoglia il codice sorgente

qcacmn: add cdp ops for IPA Tx buf smmu_unmapping

Add cdp ops for IPA Tx buffer SMMU-S1 unmapping.

Change-Id: Ia28509439c27d4b42353c55774926f245fd30abc
CRs-Fixed: 2789746
Vevek Venkatesan 4 anni fa
parent
commit
69cfce2eca
2 ha cambiato i file con 31 aggiunte e 2 eliminazioni
  1. 27 1
      dp/inc/cdp_txrx_ipa.h
  2. 4 1
      dp/inc/cdp_txrx_ops.h

+ 27 - 1
dp/inc/cdp_txrx_ipa.h

@@ -613,7 +613,7 @@ cdp_ipa_rx_intrabss_fwd(ol_txrx_soc_handle soc, uint8_t vdev_id,
 
 /**
  * cdp_ipa_tx_buf_smmu_mapping() - Create SMMU mappings for Tx
- * buffers allocated to IPA
+ *				   buffers allocated to IPA
  * @soc: data path soc handle
  * @pdev_id: device instance id
  *
@@ -635,6 +635,32 @@ cdp_ipa_tx_buf_smmu_mapping(ol_txrx_soc_handle soc, uint8_t pdev_id)
 
 	return QDF_STATUS_SUCCESS;
 }
+
+/**
+ * cdp_ipa_tx_buf_smmu_unmapping() - Release SMMU mappings for Tx
+ *				     buffers allocated to IPA
+ * @soc: data path soc handle
+ * @pdev_id: device instance id
+ *
+ * Release SMMU mappings for Tx buffers allocated to IPA
+ *
+ * return QDF_STATUS_SUCCESS
+ */
+static inline QDF_STATUS
+cdp_ipa_tx_buf_smmu_unmapping(ol_txrx_soc_handle soc, uint8_t pdev_id)
+{
+	if (!soc || !soc->ops || !soc->ops->ipa_ops) {
+		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
+			  "%s invalid instance", __func__);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	if (soc->ops->ipa_ops->ipa_tx_buf_smmu_unmapping)
+		return soc->ops->ipa_ops->ipa_tx_buf_smmu_unmapping(soc,
+								    pdev_id);
+
+	return QDF_STATUS_SUCCESS;
+}
 #endif /* IPA_OFFLOAD */
 
 #endif /* _CDP_TXRX_IPA_H_ */

+ 4 - 1
dp/inc/cdp_txrx_ops.h

@@ -1537,7 +1537,8 @@ struct cdp_throttle_ops {
  * @ipa_register_op_cb:
  * @ipa_get_stat:
  * @ipa_tx_data_frame:
- * @ipa_tx_buf_smmu_mapping: Provide SMMU mappings for Tx
+ * @ipa_tx_buf_smmu_mapping: Create SMMU mappings for Tx
+ * @ipa_tx_buf_smmu_unmapping: Release SMMU mappings for Tx
  * buffers to IPA
  */
 struct cdp_ipa_ops {
@@ -1605,6 +1606,8 @@ struct cdp_ipa_ops {
 				    qdf_nbuf_t nbuf, bool *fwd_success);
 	QDF_STATUS (*ipa_tx_buf_smmu_mapping)(struct cdp_soc_t *soc_hdl,
 					      uint8_t pdev_id);
+	QDF_STATUS (*ipa_tx_buf_smmu_unmapping)(struct cdp_soc_t *soc_hdl,
+						uint8_t pdev_id);
 };
 #endif