diff --git a/dp/inc/cdp_txrx_ipa.h b/dp/inc/cdp_txrx_ipa.h index 1109ad002a..e1cba5dc47 100644 --- a/dp/inc/cdp_txrx_ipa.h +++ b/dp/inc/cdp_txrx_ipa.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2019 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 @@ -350,6 +350,7 @@ cdp_ipa_disable_autonomy(ol_txrx_soc_handle soc, struct cdp_pdev *pdev) * @rx_pipe_handle: pointer to Rx pipe handle * @is_smmu_enabled: Is SMMU enabled or not * @sys_in: parameters to setup sys pipe in mcc mode + * @over_gsi: Is IPA using GSI * * Return: QDF_STATUS */ @@ -358,7 +359,8 @@ cdp_ipa_setup(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, void *ipa_i2w_cb, void *ipa_w2i_cb, void *ipa_wdi_meter_notifier_cb, uint32_t ipa_desc_size, void *ipa_priv, bool is_rm_enabled, uint32_t *tx_pipe_handle, uint32_t *rx_pipe_handle, - bool is_smmu_enabled, qdf_ipa_sys_connect_params_t *sys_in) + bool is_smmu_enabled, qdf_ipa_sys_connect_params_t *sys_in, + bool over_gsi) { if (!soc || !soc->ops || !soc->ops->ipa_ops || !pdev) { QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL, @@ -375,7 +377,7 @@ cdp_ipa_setup(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, void *ipa_i2w_cb, tx_pipe_handle, rx_pipe_handle, is_smmu_enabled, - sys_in); + sys_in, over_gsi); return QDF_STATUS_SUCCESS; } diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index 1185b81b23..6838304882 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -1147,7 +1147,8 @@ struct cdp_ipa_ops { void *ipa_w2i_cb, void *ipa_wdi_meter_notifier_cb, uint32_t ipa_desc_size, void *ipa_priv, bool is_rm_enabled, uint32_t *tx_pipe_handle, uint32_t *rx_pipe_handle, - bool is_smmu_enabled, qdf_ipa_sys_connect_params_t *sys_in); + bool is_smmu_enabled, qdf_ipa_sys_connect_params_t *sys_in, + bool over_gsi); #else /* CONFIG_IPA_WDI_UNIFIED_API */ QDF_STATUS (*ipa_setup)(struct cdp_pdev *pdev, void *ipa_i2w_cb, void *ipa_w2i_cb, void *ipa_wdi_meter_notifier_cb, diff --git a/dp/wifi3.0/dp_ipa.c b/dp/wifi3.0/dp_ipa.c index eaced3823c..1153f75e71 100644 --- a/dp/wifi3.0/dp_ipa.c +++ b/dp/wifi3.0/dp_ipa.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2019, 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 above @@ -648,7 +648,7 @@ QDF_STATUS dp_ipa_setup(struct cdp_pdev *ppdev, void *ipa_i2w_cb, uint32_t ipa_desc_size, void *ipa_priv, bool is_rm_enabled, uint32_t *tx_pipe_handle, uint32_t *rx_pipe_handle, bool is_smmu_enabled, - qdf_ipa_sys_connect_params_t *sys_in) + qdf_ipa_sys_connect_params_t *sys_in, bool over_gsi) { struct dp_pdev *pdev = (struct dp_pdev *)ppdev; struct dp_soc *soc = pdev->soc; @@ -712,7 +712,10 @@ QDF_STATUS dp_ipa_setup(struct cdp_pdev *ppdev, void *ipa_i2w_cb, return QDF_STATUS_E_FAILURE; } - QDF_IPA_WDI_SETUP_INFO_CLIENT(tx) = IPA_CLIENT_WLAN1_CONS; + if (over_gsi) + QDF_IPA_WDI_SETUP_INFO_CLIENT(tx) = IPA_CLIENT_WLAN2_CONS; + else + QDF_IPA_WDI_SETUP_INFO_CLIENT(tx) = IPA_CLIENT_WLAN1_CONS; QDF_IPA_WDI_SETUP_INFO_TRANSFER_RING_BASE_PA(tx) = ipa_res->tx_comp_ring_base_paddr; QDF_IPA_WDI_SETUP_INFO_TRANSFER_RING_SIZE(tx) = @@ -776,7 +779,12 @@ QDF_STATUS dp_ipa_setup(struct cdp_pdev *ppdev, void *ipa_i2w_cb, "%s: SMMU is not implementation on host", __func__); return QDF_STATUS_E_FAILURE; } else { - QDF_IPA_WDI_SETUP_INFO_CLIENT(rx) = IPA_CLIENT_WLAN1_PROD; + if (over_gsi) + QDF_IPA_WDI_SETUP_INFO_CLIENT(rx) = + IPA_CLIENT_WLAN2_PROD; + else + QDF_IPA_WDI_SETUP_INFO_CLIENT(rx) = + IPA_CLIENT_WLAN1_PROD; QDF_IPA_WDI_SETUP_INFO_TRANSFER_RING_BASE_PA(rx) = ipa_res->rx_rdy_ring_base_paddr; QDF_IPA_WDI_SETUP_INFO_TRANSFER_RING_SIZE(rx) = diff --git a/dp/wifi3.0/dp_ipa.h b/dp/wifi3.0/dp_ipa.h index 856560864b..1fed10cbb0 100644 --- a/dp/wifi3.0/dp_ipa.h +++ b/dp/wifi3.0/dp_ipa.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2019, 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 above @@ -63,7 +63,7 @@ QDF_STATUS dp_ipa_setup(struct cdp_pdev *pdev, void *ipa_i2w_cb, bool is_rm_enabled, uint32_t *tx_pipe_handle, uint32_t *rx_pipe_handle, bool is_smmu_enabled, - qdf_ipa_sys_connect_params_t *sys_in); + qdf_ipa_sys_connect_params_t *sys_in, bool over_gsi); #else /* CONFIG_IPA_WDI_UNIFIED_API */ QDF_STATUS dp_ipa_setup(struct cdp_pdev *pdev, void *ipa_i2w_cb, void *ipa_w2i_cb, void *ipa_wdi_meter_notifier_cb,