File broadcom-wl.linux-5.17.patch of Package broadcom-wl
diff -rup broadcom-wl-6.30.223.271.orig/src/wl/sys/wl_linux.c broadcom-wl-6.30.223.271/src/wl/sys/wl_linux.c
--- broadcom-wl-6.30.223.271.orig/src/wl/sys/wl_linux.c 2022-04-05 13:57:19.093984907 +0200
+++ broadcom-wl-6.30.223.271/src/wl/sys/wl_linux.c 2022-04-05 13:56:58.757993155 +0200
@@ -93,6 +93,10 @@ struct iw_statistics *wl_get_wireless_st
#include <wlc_wowl.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
+#define PDE_DATA pde_data
+#endif
+
static void wl_timer(
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
struct timer_list *tl
@@ -2980,7 +2980,11 @@
else
dev->type = ARPHRD_IEEE80211_RADIOTAP;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
bcopy(wl->dev->dev_addr, dev->dev_addr, ETHER_ADDR_LEN);
+#else
+ eth_hw_addr_set(wl->dev, dev->dev_addr);
+#endif
#if defined(WL_USE_NETDEV_OPS)
dev->netdev_ops = &wl_netdev_monitor_ops;
@@ -3261,7 +3265,11 @@
static ssize_t
wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *offp)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
wl_info_t * wl = PDE_DATA(file_inode(filp));
+#else
+ wl_info_t * wl = pde_data(file_inode(filp));
+#endif
#endif
int bcmerror, len;
int to_user = 0;
@@ -3318,7 +3326,11 @@
static ssize_t
wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *offp)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
wl_info_t * wl = PDE_DATA(file_inode(filp));
+#else
+ wl_info_t * wl = pde_data(file_inode(filp));
+#endif
#endif
int from_user = 0;
int bcmerror;