wifi-scripts: add script to add phy capabilities to board.json
[openwrt/staging/stintel.git] / package / kernel / broadcom-wl / patches / 917-fix-compilation-for-5_10.patch
1 Index: broadcom-wl-5.10.56.27.3/driver/wl_linux.c
2 ===================================================================
3 --- broadcom-wl-5.10.56.27.3.orig/driver/wl_linux.c
4 +++ broadcom-wl-5.10.56.27.3/driver/wl_linux.c
5 @@ -74,6 +74,10 @@
6 #error "No support for Kernel Rev <= 2.4.5, As the older kernel revs doesn't support Tasklets"
7 #endif
8
9 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
10 +#define ioremap_nocache ioremap
11 +#endif
12 +
13 typedef void wlc_info_t;
14 typedef void wlc_hw_info_t;
15 #include <wlc_pub.h>
16 @@ -1915,7 +1919,11 @@ wl_ioctl(struct net_device *dev, struct
17 }
18
19 /* optimization for direct ioctl calls from kernel */
20 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0)
21 if (segment_eq(get_fs(), KERNEL_DS))
22 +#else
23 + if (uaccess_kernel())
24 +#endif
25 buf = ioc.buf;
26
27 else if (ioc.buf) {
28 Index: broadcom-wl-5.10.56.27.3/driver/linux_osl.c
29 ===================================================================
30 --- broadcom-wl-5.10.56.27.3.orig/driver/linux_osl.c
31 +++ broadcom-wl-5.10.56.27.3/driver/linux_osl.c
32 @@ -34,6 +34,10 @@
33 #define OS_HANDLE_MAGIC 0x1234abcd /* Magic # to recognise osh */
34 #define BCM_MEM_FILENAME_LEN 24 /* Mem. filename length */
35
36 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
37 +#define ioremap_nocache ioremap
38 +#endif
39 +
40 typedef struct bcm_mem_link {
41 struct bcm_mem_link *prev;
42 struct bcm_mem_link *next;