summaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/build
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2023-09-11 18:54:04 +0200
committerFelix Fietkau <nbd@nbd.name>2023-09-11 18:54:13 +0200
commite648e3ccf9f9f468fc7534c2fb4aa2f381011af1 (patch)
treefe157762329309191d79f7ee2a48fe1bb66f4d21 /package/kernel/mac80211/patches/build
parent3b86c1f9290f5e186d68eb79816a2e3b8289c91d (diff)
downloadopenwrt-e648e3ccf9f9f468fc7534c2fb4aa2f381011af1.tar.gz
openwrt-e648e3ccf9f9f468fc7534c2fb4aa2f381011af1.tar.bz2
openwrt-e648e3ccf9f9f468fc7534c2fb4aa2f381011af1.zip
mac80211: fix build regressions on linux 6.1
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/build')
-rw-r--r--package/kernel/mac80211/patches/build/120-headers_version_fix.patch25
-rw-r--r--package/kernel/mac80211/patches/build/130-iommu_backport.patch26
2 files changed, 51 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/build/120-headers_version_fix.patch b/package/kernel/mac80211/patches/build/120-headers_version_fix.patch
new file mode 100644
index 0000000000..9a8c4749b2
--- /dev/null
+++ b/package/kernel/mac80211/patches/build/120-headers_version_fix.patch
@@ -0,0 +1,25 @@
+--- a/backport-include/linux/random.h
++++ b/backport-include/linux/random.h
+@@ -23,7 +23,7 @@ static inline u16 get_random_u16(void)
+ }
+ #endif
+
+-#if LINUX_VERSION_IS_LESS(6,2,0)
++#if LINUX_VERSION_IS_LESS(6,1,4)
+ static inline u32 __get_random_u32_below(u32 ceil)
+ {
+ /*
+--- a/backport-include/net/dropreason.h
++++ b/backport-include/net/dropreason.h
+@@ -3,10 +3,9 @@
+
+ #include <linux/version.h>
+
++#include <net/dropreason-core.h>
+ #if LINUX_VERSION_IS_GEQ(6,0,0)
+ #include_next <net/dropreason.h>
+-#else
+-#include <net/dropreason-core.h>
+ #endif
+
+ #if LINUX_VERSION_IS_LESS(6,4,0)
diff --git a/package/kernel/mac80211/patches/build/130-iommu_backport.patch b/package/kernel/mac80211/patches/build/130-iommu_backport.patch
new file mode 100644
index 0000000000..2d3ef88d64
--- /dev/null
+++ b/package/kernel/mac80211/patches/build/130-iommu_backport.patch
@@ -0,0 +1,26 @@
+--- /dev/null
++++ b/backport-include/linux/iommu.h
+@@ -0,0 +1,23 @@
++#ifndef __BACKPORT_LINUX_IOMMU_H
++#define __BACKPORT_LINUX_IOMMU_H
++
++#include_next <linux/iommu.h>
++#include <linux/version.h>
++
++#if LINUX_VERSION_IS_LESS(6,3,0)
++
++static inline int LINUX_BACKPORT(iommu_map)(struct iommu_domain *domain,
++ unsigned long iova,
++ phys_addr_t paddr, size_t size,
++ int prot, gfp_t gfp)
++{
++ if (gfp == GFP_ATOMIC)
++ return iommu_map_atomic(domain, iova, paddr, size, prot);
++
++ return iommu_map(domain, iova, paddr, size, prot);
++}
++#define iommu_map LINUX_BACKPORT(iommu_map)
++
++#endif /* < 6.3 */
++
++#endif