4ddb6433733cd3020adff321cf41de56aa6d413e
[openwrt/staging/stintel.git] / package / kernel / broadcom-wl / patches / 918-fix-warning-compilation-for-5_15.patch
1 --- a/driver/wl_iw.c
2 +++ a/driver/wl_iw.c
3 @@ -100,7 +100,9 @@ dev_wlc_ioctl(
4 {
5 struct ifreq ifr;
6 wl_ioctl_t ioc;
7 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0)
8 mm_segment_t fs;
9 +#endif
10 int ret;
11
12 memset(&ioc, 0, sizeof(ioc));
13 @@ -118,10 +120,14 @@ dev_wlc_ioctl(
14 dev_open(dev);
15 #endif
16
17 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0)
18 fs = get_fs();
19 set_fs(KERNEL_DS);
20 +#endif
21 ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
22 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0)
23 set_fs(fs);
24 +#endif
25
26 return ret;
27 }