qcacmn: Map IPA tx buffers as part of IPA ready callback

Register IPA ready callback with IPA driver. The callback
sets ipa_is_ready flag in the host driver and kick starts
the ipa init sequence as part of which the Tx buffers are
mapped to IPA.
None of the IPA APIs are invoked until IPA ready registration
is complete.

Change-Id: I6570b2b347052164a274fbc22358ebf0719dcabf
CRs-Fixed: 2735107
This commit is contained in:
Nisha Menon
2020-08-06 19:14:01 -07:00
committed by snandini
parent 004e29eceb
commit d95c9bb377
5 changed files with 98 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -609,6 +609,30 @@ cdp_ipa_rx_intrabss_fwd(ol_txrx_soc_handle soc, uint8_t vdev_id,
return false;
}
/**
* cdp_ipa_tx_buf_smmu_mapping() - Create SMMU mappings for Tx
* buffers allocated to IPA
* @soc: data path soc handle
* @pdev_id: device instance id
*
* Create SMMU mappings for Tx buffers allocated to IPA
*
* return QDF_STATUS_SUCCESS
*/
static inline QDF_STATUS
cdp_ipa_tx_buf_smmu_mapping(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_mapping)
return soc->ops->ipa_ops->ipa_tx_buf_smmu_mapping(soc, pdev_id);
return QDF_STATUS_SUCCESS;
}
#endif /* IPA_OFFLOAD */
#endif /* _CDP_TXRX_IPA_H_ */