[openwrt/openwrt] mac80211: fix issues with including linux/acpi_amd_wbrf.h on newer kernels

LEDE Commits lede-commits at lists.infradead.org
Tue Jan 14 04:51:34 PST 2025


nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7bf3bc871ac1ae6b6f199ba1bd83eba9d017a0d5

commit 7bf3bc871ac1ae6b6f199ba1bd83eba9d017a0d5
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Jan 14 11:55:08 2025 +0100

    mac80211: fix issues with including linux/acpi_amd_wbrf.h on newer kernels
    
    Change the double-include guard to avoid conflict with the linux kernel header
    
    Reported-by: Tony Ambardar <itugrok at yahoo.com>
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...clude-fix-linux-acpi_amd_wbrf.h-inclusion.patch | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/package/kernel/mac80211/patches/build/110-backport-include-fix-linux-acpi_amd_wbrf.h-inclusion.patch b/package/kernel/mac80211/patches/build/110-backport-include-fix-linux-acpi_amd_wbrf.h-inclusion.patch
new file mode 100644
index 0000000000..d8d3783ed6
--- /dev/null
+++ b/package/kernel/mac80211/patches/build/110-backport-include-fix-linux-acpi_amd_wbrf.h-inclusion.patch
@@ -0,0 +1,32 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 14 Jan 2025 11:42:25 +0100
+Subject: [PATCH] backport-include: fix linux/acpi_amd_wbrf.h inclusion
+
+Fix building for kernel >= 6.8 by adjusting incorrect guard usage,
+otherwise an #include_next header is masked and compilation will fail
+for net/mac80211/wbrf.c in the mac80211 kernel module.
+
+Fixes: 52cdcaab ("backport-include: backport linux/acpi_amd_wbrf.h")
+Reported-by: Tony Ambardar <itugrok at yahoo.com>
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/backport-include/linux/acpi_amd_wbrf.h
++++ b/backport-include/linux/acpi_amd_wbrf.h
+@@ -4,8 +4,8 @@
+  * Copyright (C) 2023 Advanced Micro Devices
+  */
+ 
+-#ifndef _ACPI_AMD_WBRF_H
+-#define _ACPI_AMD_WBRF_H
++#ifndef __BACKPORT_ACPI_AMD_WBRF_H
++#define __BACKPORT_ACPI_AMD_WBRF_H
+ 
+ #if LINUX_VERSION_IS_GEQ(6,8,0)
+ #include_next <linux/acpi_amd_wbrf.h>
+@@ -83,4 +83,4 @@ int amd_wbrf_unregister_notifier(struct
+ }
+ 
+ #endif /* >=6,8,0 */
+-#endif /* _ACPI_AMD_WBRF_H */
++#endif /* __BACKPORT_ACPI_AMD_WBRF_H */




More information about the lede-commits mailing list