summaryrefslogtreecommitdiff
path: root/net-wireless/broadcom-sta/files/017-handle-new-header-name-6.12.patch
blob: f9906f16aeb0331fa152eeefd03a7f06bc0bfe07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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>