summaryrefslogtreecommitdiffstats
path: root/package/kernel/broadcom-wl/patches/916-fix-compilation-for-5_4.patch
blob: e59c95722c783f8c10305a08e419ad63a2685246 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- a/driver/wl_iw.c
+++ b/driver/wl_iw.c
@@ -112,10 +112,14 @@ dev_wlc_ioctl(
 	ifr.ifr_data = (caddr_t) &ioc;
 
 	/* Must be up for virtually all useful ioctls */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
+	dev_open(dev, NULL);
+#else
 	dev_open(dev);
+#endif
 
 	fs = get_fs();
-	set_fs(get_ds());
+	set_fs(KERNEL_DS);
 	ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
 	set_fs(fs);