nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1diff -u -r a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
2--- a/src/wl/sys/wl_linux.c 2022-03-23 00:35:42.930416350 +0000
3+++ b/src/wl/sys/wl_linux.c 2022-03-23 00:40:12.903771013 +0000
4@@ -2980,7 +2980,11 @@
5 else
6 dev->type = ARPHRD_IEEE80211_RADIOTAP;
7
8+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
9 bcopy(wl->dev->dev_addr, dev->dev_addr, ETHER_ADDR_LEN);
10+#else
11+ eth_hw_addr_set(wl->dev, dev->dev_addr);
12+#endif
13
14 #if defined(WL_USE_NETDEV_OPS)
15 dev->netdev_ops = &wl_netdev_monitor_ops;
16@@ -3261,7 +3265,11 @@
17 static ssize_t
18 wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *offp)
19 {
20+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
21 wl_info_t * wl = PDE_DATA(file_inode(filp));
22+#else
23+ wl_info_t * wl = pde_data(file_inode(filp));
24+#endif
25 #endif
26 int bcmerror, len;
27 int to_user = 0;
28@@ -3318,7 +3326,11 @@
29 static ssize_t
30 wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *offp)
31 {
32+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
33 wl_info_t * wl = PDE_DATA(file_inode(filp));
34+#else
35+ wl_info_t * wl = pde_data(file_inode(filp));
36+#endif
37 #endif
38 int from_user = 0;
39 int bcmerror;