qcacld-3.0: Move IPA SMMU functions to IPA component
IPA module has been moved to CLD component under the converged driver model. Move the legacy HDD IPA SMMU functions to the IPA component. Change-Id: I3ac5ebe87cc48913f3e8e075e60737e78664f861 CRs-Fixed: 2177925
This commit is contained in:

committed by
nshrivas

parent
bd4c5eba7b
commit
739492cc3d
@@ -548,5 +548,18 @@ QDF_STATUS wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode,
|
||||
enum wlan_ipa_wlan_event ipa_event_type,
|
||||
uint8_t *mac_addr);
|
||||
|
||||
/**
|
||||
* wlan_ipa_uc_smmu_map() - Map / Unmap DMA buffer to IPA UC
|
||||
* @map: Map / unmap operation
|
||||
* @num_buf: Number of buffers in array
|
||||
* @buf_arr: Buffer array of DMA mem mapping info
|
||||
*
|
||||
* This API maps/unmaps WLAN-IPA buffers if SMMU S1 translation
|
||||
* is enabled.
|
||||
*
|
||||
* Return: Status of map operation
|
||||
*/
|
||||
int wlan_ipa_uc_smmu_map(bool map, uint32_t num_buf, qdf_mem_info_t *buf_arr);
|
||||
|
||||
#endif /* IPA_OFFLOAD */
|
||||
#endif /* _WLAN_IPA_CORE_H_ */
|
||||
|
@@ -350,5 +350,15 @@ QDF_STATUS ipa_wlan_evt(struct wlan_objmgr_pdev *pdev, qdf_netdev_t net_dev,
|
||||
enum wlan_ipa_wlan_event ipa_event_type,
|
||||
uint8_t *mac_addr);
|
||||
|
||||
/**
|
||||
* ipa_uc_smmu_map() - Map / Unmap DMA buffer to IPA UC
|
||||
* @map: Map / unmap operation
|
||||
* @num_buf: Number of buffers in array
|
||||
* @buf_arr: Buffer array of DMA mem mapping info
|
||||
*
|
||||
* Return: Status of map operation
|
||||
*/
|
||||
int ipa_uc_smmu_map(bool map, uint32_t num_buf, qdf_mem_info_t *buf_arr);
|
||||
|
||||
#endif /* IPA_OFFLOAD */
|
||||
#endif /* end of _WLAN_IPA_MAIN_H_ */
|
||||
|
@@ -216,9 +216,7 @@ static inline void wlan_ipa_wdi_get_wdi_version(struct wlan_ipa_priv *ipa_ctx)
|
||||
static inline bool wlan_ipa_wdi_is_smmu_enabled(struct wlan_ipa_priv *ipa_ctx,
|
||||
qdf_device_t osdev)
|
||||
{
|
||||
/* TODO: Need to check if SMMU is supported on cld_3.2 */
|
||||
/* return hdd_ipa->is_smmu_enabled && qdf_mem_smmu_s1_enabled(osdev); */
|
||||
return 0;
|
||||
return ipa_ctx->is_smmu_enabled && qdf_mem_smmu_s1_enabled(osdev);
|
||||
}
|
||||
|
||||
static inline QDF_STATUS wlan_ipa_wdi_setup(struct wlan_ipa_priv *ipa_ctx,
|
||||
@@ -331,6 +329,12 @@ static inline void wlan_ipa_wdi_get_wdi_version(struct wlan_ipa_priv *ipa_ctx)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int wlan_ipa_wdi_is_smmu_enabled(struct wlan_ipa_priv *ipa_ctx,
|
||||
qdf_device_t osdev)
|
||||
{
|
||||
return qdf_mem_smmu_s1_enabled(osdev);
|
||||
}
|
||||
|
||||
static inline QDF_STATUS wlan_ipa_wdi_setup(struct wlan_ipa_priv *ipa_ctx,
|
||||
qdf_device_t osdev)
|
||||
{
|
||||
@@ -2587,3 +2591,18 @@ QDF_STATUS wlan_ipa_uc_ol_deinit(struct wlan_ipa_priv *ipa_ctx)
|
||||
ipa_debug("exit: ret=%d", status);
|
||||
return status;
|
||||
}
|
||||
|
||||
int wlan_ipa_uc_smmu_map(bool map, uint32_t num_buf, qdf_mem_info_t *buf_arr)
|
||||
{
|
||||
ipa_debug("Map: %d Num_buf: %d", map, num_buf);
|
||||
|
||||
if (!num_buf) {
|
||||
ipa_info("No buffers to map/unmap");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (map)
|
||||
return qdf_ipa_create_wdi_mapping(num_buf, buf_arr);
|
||||
else
|
||||
return qdf_ipa_release_wdi_mapping(num_buf, buf_arr);
|
||||
}
|
||||
|
@@ -530,3 +530,8 @@ QDF_STATUS ipa_wlan_evt(struct wlan_objmgr_pdev *pdev, qdf_netdev_t net_dev,
|
||||
return wlan_ipa_wlan_evt(net_dev, device_mode, sta_id, session_id,
|
||||
ipa_event_type, mac_addr);
|
||||
}
|
||||
|
||||
int ipa_uc_smmu_map(bool map, uint32_t num_buf, qdf_mem_info_t *buf_arr)
|
||||
{
|
||||
return wlan_ipa_uc_smmu_map(map, num_buf, buf_arr);
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "wlan_ipa_public_struct.h"
|
||||
#include "wlan_ipa_obj_mgmt_api.h"
|
||||
#include "wlan_objmgr_pdev_obj.h"
|
||||
#include "qdf_types.h"
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
|
||||
@@ -271,6 +272,16 @@ QDF_STATUS ucfg_ipa_wlan_evt(struct wlan_objmgr_pdev *pdev,
|
||||
enum wlan_ipa_wlan_event ipa_event_type,
|
||||
uint8_t *mac_addr);
|
||||
|
||||
/**
|
||||
* ucfg_ipa_uc_smmu_map() - Map / Unmap DMA buffer to IPA UC
|
||||
* @map: Map / unmap operation
|
||||
* @num_buf: Number of buffers in array
|
||||
* @buf_arr: Buffer array of DMA mem mapping info
|
||||
*
|
||||
* Return: Status of map operation
|
||||
*/
|
||||
int ucfg_ipa_uc_smmu_map(bool map, uint32_t num_buf, qdf_mem_info_t *buf_arr);
|
||||
|
||||
#else
|
||||
|
||||
static inline bool ucfg_ipa_is_present(void)
|
||||
@@ -422,5 +433,10 @@ QDF_STATUS ucfg_ipa_wlan_evt(struct wlan_objmgr_pdev *pdev,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline
|
||||
int ucfg_ipa_uc_smmu_map(bool map, uint32_t num_buf, qdf_mem_info_t *buf_arr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* IPA_OFFLOAD */
|
||||
#endif /* _WLAN_IPA_UCFG_API_H_ */
|
||||
|
@@ -164,3 +164,8 @@ QDF_STATUS ucfg_ipa_wlan_evt(struct wlan_objmgr_pdev *pdev,
|
||||
return ipa_wlan_evt(pdev, net_dev, device_mode, sta_id, session_id,
|
||||
ipa_event_type, mac_addr);
|
||||
}
|
||||
|
||||
int ucfg_ipa_uc_smmu_map(bool map, uint32_t num_buf, qdf_mem_info_t *buf_arr)
|
||||
{
|
||||
return ipa_uc_smmu_map(map, num_buf, buf_arr);
|
||||
}
|
||||
|
Reference in New Issue
Block a user