mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
33 lines
1.0 KiB
Diff
33 lines
1.0 KiB
Diff
--- a/drivers/net/wireless/ath/ath11k/ahb.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
|
|
@@ -1008,17 +1008,29 @@ static int ath11k_ahb_fw_resources_init(
|
|
goto err_iommu_free;
|
|
}
|
|
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
|
|
ret = iommu_map(iommu_dom, ab_ahb->fw.msa_paddr,
|
|
ab_ahb->fw.msa_paddr, ab_ahb->fw.msa_size,
|
|
IOMMU_READ | IOMMU_WRITE);
|
|
+#else
|
|
+ ret = iommu_map(iommu_dom, ab_ahb->fw.msa_paddr,
|
|
+ ab_ahb->fw.msa_paddr, ab_ahb->fw.msa_size,
|
|
+ IOMMU_READ | IOMMU_WRITE, GFP_KERNEL);
|
|
+#endif
|
|
if (ret) {
|
|
ath11k_err(ab, "failed to map firmware region: %d\n", ret);
|
|
goto err_iommu_detach;
|
|
}
|
|
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
|
|
ret = iommu_map(iommu_dom, ab_ahb->fw.ce_paddr,
|
|
ab_ahb->fw.ce_paddr, ab_ahb->fw.ce_size,
|
|
IOMMU_READ | IOMMU_WRITE);
|
|
+#else
|
|
+ ret = iommu_map(iommu_dom, ab_ahb->fw.ce_paddr,
|
|
+ ab_ahb->fw.ce_paddr, ab_ahb->fw.ce_size,
|
|
+ IOMMU_READ | IOMMU_WRITE, GFP_KERNEL);
|
|
+#endif
|
|
if (ret) {
|
|
ath11k_err(ab, "failed to map firmware CE region: %d\n", ret);
|
|
goto err_iommu_unmap;
|