net: wireless: bcmdhd: Fix crash in dhd_preinit_ioctls() band set
Dmitry Shmidt [Thu, 29 Mar 2012 19:10:36 +0000 (12:10 -0700)]
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

drivers/net/wireless/bcmdhd/dhd_linux.c

index 8226ef2..80f53b3 100644 (file)
@@ -3055,7 +3055,7 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
        if ((!op_mode && strstr(fw_path, "_apsta") != NULL) || (op_mode == HOSTAPD_MASK)) {
                        uint band = WLC_BAND_2G;
 
-                       if ((ret = dhd_wl_ioctl_cmd(dhd, WLC_SET_BAND, (char *)band, sizeof(band),
+                       if ((ret = dhd_wl_ioctl_cmd(dhd, WLC_SET_BAND, (char *)&band, sizeof(band),
                                TRUE, 0)) < 0) {
                                DHD_ERROR(("%s:set band failed error (%d)\n", __FUNCTION__, ret));
                        }