From: Colin Ian King Date: Thu, 6 Jun 2019 16:24:01 +0000 Subject: Add Linux 5.1+ compat fix for deprecated get_ds call Origin: https://bugs.debian.org/928754 https://bugs.debian.org/934677 Bug-Ubuntu: https://bugs.launchpad.net/bugs/1830042 This adds a compat fix for the deprecated get_ds helper function. For Linux 5.1 onwards this was replaced with KERNEL_DS, see Linux commit commit 736706bee3298208343a76096370e4f6a5c55915 ("get rid of legacy 'get_ds()' function") . Signed-off-by: Colin Ian King --- amd64/src/wl/sys/wl_cfg80211_hybrid.c | 4 ++++ i386/src/wl/sys/wl_cfg80211_hybrid.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/amd64/src/wl/sys/wl_cfg80211_hybrid.c b/amd64/src/wl/sys/wl_cfg80211_hybrid.c index 1ec2ef3..8e01841 100644 --- a/amd64/src/wl/sys/wl_cfg80211_hybrid.c +++ b/amd64/src/wl/sys/wl_cfg80211_hybrid.c @@ -457,7 +457,11 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len) ifr.ifr_data = (caddr_t)&ioc; fs = get_fs(); +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) set_fs(get_ds()); +#else + set_fs(KERNEL_DS); +#endif #if defined(WL_USE_NETDEV_OPS) err = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE); #else diff --git a/i386/src/wl/sys/wl_cfg80211_hybrid.c b/i386/src/wl/sys/wl_cfg80211_hybrid.c index 7b606e0..2489bbb 100644 --- a/i386/src/wl/sys/wl_cfg80211_hybrid.c +++ b/i386/src/wl/sys/wl_cfg80211_hybrid.c @@ -450,7 +450,11 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len) ifr.ifr_data = (caddr_t)&ioc; fs = get_fs(); +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) set_fs(get_ds()); +#else + set_fs(KERNEL_DS); +#endif #if defined(WL_USE_NETDEV_OPS) err = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE); #else