mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 01:28:59 +00:00
cd3de51bb4
This adds a few fixes for compiling against Linux 5.10: 1. segment_eq() has been removed with upstream commit 428e2976a5bf7e7f5554286d7a5a33b8147b106a ("uaccess: remove segment_eq") and can use uaccess_kernel() instead 2. ioremap_nocache() is removed and is now an alias for ioremap() with upstream commit 4bdc0d676a643140bdf17dbf7eafedee3d496a3c ("remove ioremap_nocache and devm_ioremap_nocache") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
19 lines
413 B
Diff
19 lines
413 B
Diff
--- 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);
|
|
|