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