gentoo-ebuilds/net-wireless/broadcom-sta/files/017-handle-new-header-name-6.12.patch
Sam Petch e20d1bb6ac
net-wireless/broadcom-sta: handle new headers
Handle new header name in kernels >=6.12, handle 6.13 lib80211 code
merge into libiw and fix pointer mismatch compiler error for 6.14

[flow: adjust commit message]

Closes: https://bugs.gentoo.org/947928
Closes: https://bugs.gentoo.org/948947
Closes: https://github.com/gentoo/gentoo/pull/40391
Signed-off-by: Sam Petch <111785134+spetch0x5F@users.noreply.github.com>
Signed-off-by: Florian Schmaus <flow@gentoo.org>
2025-02-24 10:26:19 +01:00

33 lines
909 B
Diff

https://bugs.gentoo.org/947928
Adds support for the new name of the asm/unaligned.h header file for kernels >=6.12.0 (header file was renamed to "linux/unaligned.h")
Bug found by Sam Petch
Patch by Sam Petch
TESTING DETAILS:
Bugfix tested by Sam Petch on kernels: gentoo-sources:6.6.67, gentoo-sources:6.12.4-r1, gentoo-sources:6.12.9
Patch tested on kernels: gentoo-sources:6.6.67, gentoo-sources:6.12.9
Bugfix and patch tested on device: 2012 Macbook Pro (A1278) running Gentoo Linux with Gnome Desktop / OpenRC profile
Chipset: BCM4331 (Broadcom)
Contact: sam.petch.recall824@passinbox.com
--- a/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
@@ -56,7 +56,12 @@
#include <asm/irq.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
+#include <linux/unaligned.h>
+#else
#include <asm/unaligned.h>
+#endif
#include <proto/802.1d.h>