Skip to content

Commit

Permalink
net: wireless: bcmdhd: Call init_ioctl() only if was started properly
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
  • Loading branch information
Dmitry Shmidt authored and renaudallard committed Nov 16, 2011
1 parent 72f702d commit 489b5dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/bcmdhd/wl_android.c
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 489b5dd

Please sign in to comment.