OSDN Git Service

net: wireless: bcmdhd: Add FW reloading in case of FW hang
authorDmitry Shmidt <dimitrysh@google.com>
Fri, 2 Dec 2011 21:10:47 +0000 (13:10 -0800)
committerDmitry Shmidt <dimitrysh@google.com>
Mon, 19 Dec 2011 21:22:43 +0000 (13:22 -0800)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd_linux.c

index 32238ee..4a3365f 100644 (file)
@@ -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
                }
        }