diff --git a/qdf/linux/src/i_qdf_mem.h b/qdf/linux/src/i_qdf_mem.h index 5262aa85a4..be09510551 100644 --- a/qdf/linux/src/i_qdf_mem.h +++ b/qdf/linux/src/i_qdf_mem.h @@ -63,7 +63,9 @@ #ifdef CONFIG_ARM_SMMU #include +#ifdef ENABLE_SMMU_S1_TRANSLATION #include +#endif #include #endif @@ -210,7 +212,7 @@ static inline bool __qdf_mem_smmu_s1_enabled(qdf_device_t osdev) return osdev->smmu_s1_enabled; } -#ifdef CONFIG_ARM_SMMU +#if defined(CONFIG_ARM_SMMU) && defined(ENABLE_SMMU_S1_TRANSLATION) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)) /** * __qdf_dev_get_domain() - get iommu domain from osdev diff --git a/qdf/linux/src/i_qdf_types.h b/qdf/linux/src/i_qdf_types.h index 60d21b2994..e3f1aa42f0 100644 --- a/qdf/linux/src/i_qdf_types.h +++ b/qdf/linux/src/i_qdf_types.h @@ -265,8 +265,10 @@ struct __qdf_device { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)) struct iommu_domain *domain; #else +#ifdef ENABLE_SMMU_S1_TRANSLATION struct dma_iommu_mapping *iommu_mapping; #endif +#endif }; typedef struct __qdf_device *__qdf_device_t;