From af16732d4c98078988755337fb5e197fc31ca77e Mon Sep 17 00:00:00 2001 From: Dmitry Shmidt Date: Fri, 2 Dec 2011 13:10:47 -0800 Subject: [PATCH] net: wireless: bcmdhd: Add FW reloading in case of FW hang Signed-off-by: Dmitry Shmidt --- drivers/net/wireless/bcmdhd/dhd_linux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c index 32238ee0e129..4a3365f5d244 100644 --- a/drivers/net/wireless/bcmdhd/dhd_linux.c +++ b/drivers/net/wireless/bcmdhd/dhd_linux.c @@ -2296,7 +2296,6 @@ dhd_stop(struct net_device *net) if (ifidx == 0 && !dhd_download_fw_on_driverload) wl_android_wifi_off(net); #endif - dhd->pub.hang_was_sent = 0; dhd->pub.rxcnt_timeout = 0; dhd->pub.txcnt_timeout = 0; OLD_MOD_DEC_USE_COUNT; @@ -2325,6 +2324,8 @@ dhd_open(struct net_device *net) firmware_path[0] = '\0'; } + dhd->pub.hang_was_sent = 0; + #if !defined(WL_CFG80211) /* * Force start if ifconfig_up gets called before START command @@ -4282,6 +4283,8 @@ int net_os_send_hang_message(struct net_device *dev) #endif #if defined(WL_CFG80211) ret = wl_cfg80211_hang(dev, WLAN_REASON_UNSPECIFIED); + dev_close(dev); + dev_open(dev); #endif } } -- 2.34.1