diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2012-03-05 10:17:06 -0800 |
---|---|---|
committer | Om Prakash Singh <omp@nvidia.com> | 2012-06-15 14:15:14 +0530 |
commit | ff3e4bf8efb05e445ea76378c31a8e2bd7454220 (patch) | |
tree | 5b383f6df64a2906e4aa2279376c456cd71a8d1e /drivers/net | |
parent | a5e2789013e0767bc219d547a168b56b5e10ada3 (diff) |
net: wireless: bcmdhd: Always turn Off wlan power on interface down
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/bcmdhd/dhd_linux.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c index 54e72797175a..bbba4d4fcaf1 100644 --- a/drivers/net/wireless/bcmdhd/dhd_linux.c +++ b/drivers/net/wireless/bcmdhd/dhd_linux.c @@ -2272,7 +2272,7 @@ dhd_cleanup_virt_ifaces(dhd_info_t *dhd) static int dhd_stop(struct net_device *net) { - int ifidx; + int ifidx = 0; dhd_info_t *dhd = *(dhd_info_t **)netdev_priv(net); DHD_OS_WAKE_LOCK(&dhd->pub); DHD_TRACE(("%s: Enter %p\n", __FUNCTION__, net)); @@ -2306,14 +2306,15 @@ dhd_stop(struct net_device *net) /* Stop the protocol module */ dhd_prot_stop(&dhd->pub); + OLD_MOD_DEC_USE_COUNT; +exit: #if defined(WL_CFG80211) if (ifidx == 0 && !dhd_download_fw_on_driverload) wl_android_wifi_off(net); #endif dhd->pub.rxcnt_timeout = 0; dhd->pub.txcnt_timeout = 0; - OLD_MOD_DEC_USE_COUNT; -exit: + DHD_OS_WAKE_UNLOCK(&dhd->pub); return 0; } |