From: Weiguang Ruan Date: Tue, 19 Sep 2017 13:49:37 +0000 (+0800) Subject: wifi: fix error msg "Error getting the SSID" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=10e68999970a7faf459a365e715c505661df6a64;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_dhd-driver.git wifi: fix error msg "Error getting the SSID" PD#150582 struct compat_wl_ioctl has uint32 pointer to buff but we are 64bit kernel. fix this bug, so uper can get the right ssid from this buff. Change-Id: I19642af9eddb4babb03fc285d205f0c17c6c5529 --- diff --git a/bcmdhd.1.363.59.144.x.cn/dhd_linux.c b/bcmdhd.1.363.59.144.x.cn/dhd_linux.c index 1dff806..71bef8f 100644 --- a/bcmdhd.1.363.59.144.x.cn/dhd_linux.c +++ b/bcmdhd.1.363.59.144.x.cn/dhd_linux.c @@ -5758,13 +5758,15 @@ dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd) if (is_compat_task()) #endif { + compat_wl_ioctl_t compat_ioc; if (copy_from_user(&compat_ioc, ifr->ifr_data, sizeof(compat_wl_ioctl_t))) { ret = BCME_BADADDR; goto done; } + ioc.cmd = compat_ioc.cmd; - ioc.buf = compat_ptr(compat_ioc.buf); + ioc.buf = (uint64 *)compat_ioc.buf; ioc.len = compat_ioc.len; ioc.set = compat_ioc.set; ioc.used = compat_ioc.used; diff --git a/bcmdhd.1.363.59.144.x.cn/include/wlioctl.h b/bcmdhd.1.363.59.144.x.cn/include/wlioctl.h index 4447ca0..001a261 100644 --- a/bcmdhd.1.363.59.144.x.cn/include/wlioctl.h +++ b/bcmdhd.1.363.59.144.x.cn/include/wlioctl.h @@ -1361,7 +1361,7 @@ typedef struct wl_ioctl { #ifdef CONFIG_COMPAT typedef struct compat_wl_ioctl { uint cmd; /**< common ioctl definition */ - uint32 buf; /**< pointer to user buffer */ + uint64 buf; /**< pointer to user buffer */ uint len; /**< length of user buffer */ uint8 set; /**< 1=set IOCTL; 0=query IOCTL */ uint used; /**< bytes read or written (optional) */