Lines 532-537
Link Here
|
532 |
TASK_INIT(&sc->sc_radioon_task, 0, wpi_radio_on, sc); |
532 |
TASK_INIT(&sc->sc_radioon_task, 0, wpi_radio_on, sc); |
533 |
TASK_INIT(&sc->sc_start_task, 0, wpi_start_task, sc); |
533 |
TASK_INIT(&sc->sc_start_task, 0, wpi_start_task, sc); |
534 |
|
534 |
|
|
|
535 |
sc->sc_tq = taskqueue_create("wpi_taskq", M_WAITOK, |
536 |
taskqueue_thread_enqueue, &sc->sc_tq); |
537 |
error = taskqueue_start_threads(&sc->sc_tq, 1, 0, "wpi_taskq"); |
538 |
if (error != 0) { |
539 |
device_printf(dev, "can't start threads, error %d\n", error); |
540 |
goto fail; |
541 |
} |
542 |
|
535 |
wpi_sysctlattach(sc); |
543 |
wpi_sysctlattach(sc); |
536 |
|
544 |
|
537 |
/* |
545 |
/* |
Lines 688-693
Link Here
|
688 |
|
696 |
|
689 |
wpi_stop(sc); |
697 |
wpi_stop(sc); |
690 |
|
698 |
|
|
|
699 |
taskqueue_drain_all(sc->sc_tq); |
700 |
taskqueue_free(sc->sc_tq); |
701 |
|
691 |
callout_drain(&sc->watchdog_rfkill); |
702 |
callout_drain(&sc->watchdog_rfkill); |
692 |
callout_drain(&sc->tx_timeout); |
703 |
callout_drain(&sc->tx_timeout); |
693 |
callout_drain(&sc->scan_timeout); |
704 |
callout_drain(&sc->scan_timeout); |
Lines 2387-2394
Link Here
|
2387 |
WPI_WRITE(sc, WPI_FH_INT, r2); |
2398 |
WPI_WRITE(sc, WPI_FH_INT, r2); |
2388 |
|
2399 |
|
2389 |
if (r1 & (WPI_INT_SW_ERR | WPI_INT_HW_ERR)) { |
2400 |
if (r1 & (WPI_INT_SW_ERR | WPI_INT_HW_ERR)) { |
2390 |
struct ieee80211com *ic = ifp->if_l2com; |
|
|
2391 |
|
2392 |
device_printf(sc->sc_dev, "fatal firmware error\n"); |
2401 |
device_printf(sc->sc_dev, "fatal firmware error\n"); |
2393 |
#ifdef WPI_DEBUG |
2402 |
#ifdef WPI_DEBUG |
2394 |
wpi_debug_registers(sc); |
2403 |
wpi_debug_registers(sc); |
Lines 2397-2403
Link Here
|
2397 |
DPRINTF(sc, WPI_DEBUG_HW, |
2406 |
DPRINTF(sc, WPI_DEBUG_HW, |
2398 |
"(%s)\n", (r1 & WPI_INT_SW_ERR) ? "(Software Error)" : |
2407 |
"(%s)\n", (r1 & WPI_INT_SW_ERR) ? "(Software Error)" : |
2399 |
"(Hardware Error)"); |
2408 |
"(Hardware Error)"); |
2400 |
ieee80211_runtask(ic, &sc->sc_reinittask); |
2409 |
taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); |
2401 |
goto end; |
2410 |
goto end; |
2402 |
} |
2411 |
} |
2403 |
|
2412 |
|
Lines 2950-2959
Link Here
|
2950 |
{ |
2959 |
{ |
2951 |
struct wpi_softc *sc = arg; |
2960 |
struct wpi_softc *sc = arg; |
2952 |
struct ifnet *ifp = sc->sc_ifp; |
2961 |
struct ifnet *ifp = sc->sc_ifp; |
2953 |
struct ieee80211com *ic = ifp->if_l2com; |
|
|
2954 |
|
2962 |
|
2955 |
if_printf(ifp, "scan timeout\n"); |
2963 |
if_printf(ifp, "scan timeout\n"); |
2956 |
ieee80211_runtask(ic, &sc->sc_reinittask); |
2964 |
taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); |
2957 |
} |
2965 |
} |
2958 |
|
2966 |
|
2959 |
static void |
2967 |
static void |
Lines 2961-2971
Link Here
|
2961 |
{ |
2969 |
{ |
2962 |
struct wpi_softc *sc = arg; |
2970 |
struct wpi_softc *sc = arg; |
2963 |
struct ifnet *ifp = sc->sc_ifp; |
2971 |
struct ifnet *ifp = sc->sc_ifp; |
2964 |
struct ieee80211com *ic = ifp->if_l2com; |
|
|
2965 |
|
2972 |
|
2966 |
if_printf(ifp, "device timeout\n"); |
2973 |
if_printf(ifp, "device timeout\n"); |
2967 |
if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); |
2974 |
if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); |
2968 |
ieee80211_runtask(ic, &sc->sc_reinittask); |
2975 |
taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); |
2969 |
} |
2976 |
} |
2970 |
|
2977 |
|
2971 |
static int |
2978 |
static int |