917-fix-compilation-for-5_10.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
  9. +#define ioremap_nocache ioremap
  10. +#endif
  11. +
  12. typedef void wlc_info_t;
  13. typedef void wlc_hw_info_t;
  14. #include <wlc_pub.h>
  15. @@ -1915,7 +1919,11 @@ wl_ioctl(struct net_device *dev, struct
  16. }
  17. /* optimization for direct ioctl calls from kernel */
  18. +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0)
  19. if (segment_eq(get_fs(), KERNEL_DS))
  20. +#else
  21. + if (uaccess_kernel())
  22. +#endif
  23. buf = ioc.buf;
  24. else if (ioc.buf) {
  25. Index: broadcom-wl-5.10.56.27.3/driver/linux_osl.c
  26. ===================================================================
  27. --- broadcom-wl-5.10.56.27.3.orig/driver/linux_osl.c
  28. +++ broadcom-wl-5.10.56.27.3/driver/linux_osl.c
  29. @@ -34,6 +34,10 @@
  30. #define OS_HANDLE_MAGIC 0x1234abcd /* Magic # to recognise osh */
  31. #define BCM_MEM_FILENAME_LEN 24 /* Mem. filename length */
  32. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
  33. +#define ioremap_nocache ioremap
  34. +#endif
  35. +
  36. typedef struct bcm_mem_link {
  37. struct bcm_mem_link *prev;
  38. struct bcm_mem_link *next;