diff options
| author | Dmitry Shmidt <dimitrysh@google.com> | 2012-02-23 10:36:40 -0800 |
|---|---|---|
| committer | Dmitry Shmidt <dimitrysh@google.com> | 2012-02-23 13:19:22 -0800 |
| commit | d93cdf396dfed7a7fc6d7c31b59538bf52378251 (patch) | |
| tree | a9f9c0c7985d8b1b4804982ced1b78746a483474 /drivers | |
| parent | bfebf726b0e0fd4a26096f9d7ddea8603aeaeac8 (diff) | |
net: wireless: bcmdhd: Turn interface down (only) in case of FW crash
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/wireless/bcmdhd/dhd_linux.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c index 233c89128303..0c34e79bf2ca 100644 --- a/drivers/net/wireless/bcmdhd/dhd_linux.c +++ b/drivers/net/wireless/bcmdhd/dhd_linux.c @@ -4390,17 +4390,23 @@ int net_os_send_hang_message(struct net_device *dev) { dhd_info_t *dhd = *(dhd_info_t **)netdev_priv(dev); int ret = 0; + int need_unlock = 0; if (dhd) { if (!dhd->pub.hang_was_sent) { dhd->pub.hang_was_sent = 1; + if (!rtnl_is_locked()) { + need_unlock = 1; + rtnl_lock(); + } + dev_close(dev); + if (need_unlock) + rtnl_unlock(); #if defined(CONFIG_WIRELESS_EXT) ret = wl_iw_send_priv_event(dev, "HANG"); #endif #if defined(WL_CFG80211) ret = wl_cfg80211_hang(dev, WLAN_REASON_UNSPECIFIED); - dev_close(dev); - dev_open(dev); #endif } } |
