]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/blobdiff - drivers/net/wireless/bcmdhd/dhd_linux.c
net: wireless: bcmdhd: reorder sdlock to avoid lockup
[sojka/nv-tegra/linux-3.10.git] / drivers / net / wireless / bcmdhd / dhd_linux.c
index dd503ad35ab4926c10e8477e7da9a397d8fa04e7..b78163233f4207aded66876880cf1334af53dd50 100644 (file)
@@ -3701,13 +3701,13 @@ dhd_bus_start(dhd_pub_t *dhdp)
                flags = dhd_os_spin_lock(&dhd->pub);
                dhd->wd_timer_valid = FALSE;
                dhd_os_spin_unlock(&dhd->pub, flags);
-               del_timer_sync(&dhd->timer);
-
-               DHD_ERROR(("%s Host failed to register for OOB\n", __FUNCTION__));
 #ifdef DHDTHREAD
                if (dhd->threads_only)
                        dhd_os_sdunlock(dhdp);
 #endif /* DHDTHREAD */
+
+               del_timer_sync(&dhd->timer);
+               DHD_ERROR(("%s Host failed to register for OOB\n", __FUNCTION__));
                DHD_OS_WD_WAKE_UNLOCK(&dhd->pub);
                return -ENODEV;
        }
@@ -3721,12 +3721,13 @@ dhd_bus_start(dhd_pub_t *dhdp)
                flags = dhd_os_spin_lock(&dhd->pub);
                dhd->wd_timer_valid = FALSE;
                dhd_os_spin_unlock(&dhd->pub, flags);
-               del_timer_sync(&dhd->timer);
-               DHD_ERROR(("%s failed bus is not ready\n", __FUNCTION__));
 #ifdef DHDTHREAD
                if (dhd->threads_only)
                        dhd_os_sdunlock(dhdp);
 #endif /* DHDTHREAD */
+
+               del_timer_sync(&dhd->timer);
+               DHD_ERROR(("%s failed bus is not ready\n", __FUNCTION__));
                DHD_OS_WD_WAKE_UNLOCK(&dhd->pub);
                return -ENODEV;
        }