wifi: fix error msg "Error getting the SSID"
authorWeiguang Ruan <Weiguang.ruan@amlogic.com>
Tue, 19 Sep 2017 13:49:37 +0000 (21:49 +0800)
committerWeiguang Ruan <Weiguang.ruan@amlogic.com>
Wed, 20 Sep 2017 03:03:37 +0000 (20:03 -0700)
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

bcmdhd.1.363.59.144.x.cn/dhd_linux.c
bcmdhd.1.363.59.144.x.cn/include/wlioctl.h

index 1dff80656143c2e1cb65cdccf9c863365fd5d356..71bef8fe34c301c51332a6c53f7e5815a999af7c 100644 (file)
@@ -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;
index 4447ca0107b52edbe1ea174ba84161b77aa43953..001a261acdc56112af12e45fc7124d670d071987 100644 (file)
@@ -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) */