From: Dmitry Shmidt Date: Wed, 9 Nov 2011 21:00:24 +0000 (-0800) Subject: net: wireless: bcmdhd: Call init_ioctl() only if was started properly X-Git-Tag: firefly_0821_release~7613^2~226 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1720a91d03e84daa68e5c121b59e24dbdde40d9e;p=firefly-linux-kernel-4.4.55.git net: wireless: bcmdhd: Call init_ioctl() only if was started properly Signed-off-by: Dmitry Shmidt --- diff --git a/drivers/net/wireless/bcmdhd/wl_android.c b/drivers/net/wireless/bcmdhd/wl_android.c index 7c6ab2fb2821..9ca3d6020239 100644 --- a/drivers/net/wireless/bcmdhd/wl_android.c +++ b/drivers/net/wireless/bcmdhd/wl_android.c @@ -364,7 +364,8 @@ int wl_android_wifi_on(struct net_device *dev) sdioh_start(NULL, 0); ret = dhd_dev_reset(dev, FALSE); sdioh_start(NULL, 1); - dhd_dev_init_ioctl(dev); + if (!ret) + dhd_dev_init_ioctl(dev); g_wifi_on = 1; } dhd_net_if_unlock(dev); @@ -384,7 +385,7 @@ int wl_android_wifi_off(struct net_device *dev) dhd_net_if_lock(dev); if (g_wifi_on) { - dhd_dev_reset(dev, 1); + ret = dhd_dev_reset(dev, TRUE); sdioh_stop(NULL); dhd_customer_gpio_wlan_ctrl(WLAN_RESET_OFF); g_wifi_on = 0;