diff --git a/sys/dev/netif/ath/ath/if_ath.c b/sys/dev/netif/ath/ath/if_ath.c index 2f22372..945b46a 100644 --- a/sys/dev/netif/ath/ath/if_ath.c +++ b/sys/dev/netif/ath/ath/if_ath.c @@ -122,6 +122,7 @@ static void ath_vap_delete(struct ieee80211vap *); static void ath_init(void *); static void ath_stop_locked(struct ifnet *); static void ath_stop(struct ifnet *); +static void ath_start_locked(struct ifnet *); static void ath_start(struct ifnet *); static int ath_reset(struct ifnet *); static int ath_reset_vap(struct ieee80211vap *, u_long); @@ -452,9 +453,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) * Allocate tx+rx descriptors and populate the lists. */ wlan_assert_serialized(); - wlan_serialize_exit(); error = ath_desc_alloc(sc); - wlan_serialize_enter(); if (error != 0) { if_printf(ifp, "failed to allocate descriptors: %d\n", error); goto bad; @@ -1700,7 +1699,7 @@ ath_reset(struct ifnet *ifp) } ath_hal_intrset(ah, sc->sc_imask); - ath_start(ifp); /* restart xmit */ + ath_start_locked(ifp); /* restart xmit */ return 0; } @@ -1806,7 +1805,7 @@ ath_txfrag_setup(struct ath_softc *sc, ath_bufhead *frags, } static void -ath_start(struct ifnet *ifp) +ath_start_locked(struct ifnet *ifp) { struct ath_softc *sc = ifp->if_softc; struct ieee80211_node *ni; @@ -1899,6 +1898,14 @@ ath_start(struct ifnet *ifp) } } +static void +ath_start(struct ifnet *ifp) +{ + wlan_serialize_enter(); + ath_start_locked(ifp); + wlan_serialize_exit(); +} + static int ath_media_change(struct ifnet *ifp) { @@ -4068,7 +4075,7 @@ rx_next: ieee80211_ff_age_all(ic, 100); #endif if (!ifq_is_empty(&ifp->if_snd)) - ath_start(ifp); + ath_start_locked(ifp); } wlan_serialize_exit(); #undef PA2DESC @@ -5057,7 +5064,7 @@ ath_tx_task_q0(void *arg, int npending) if (sc->sc_softled) ath_led_event(sc, sc->sc_txrix); - ath_start(ifp); + ath_start_locked(ifp); wlan_serialize_exit(); } @@ -5096,7 +5103,7 @@ ath_tx_task_q0123(void *arg, int npending) if (sc->sc_softled) ath_led_event(sc, sc->sc_txrix); - ath_start(ifp); + ath_start_locked(ifp); wlan_serialize_exit(); } @@ -5129,7 +5136,7 @@ ath_tx_task(void *arg, int npending) if (sc->sc_softled) ath_led_event(sc, sc->sc_txrix); - ath_start(ifp); + ath_start_locked(ifp); wlan_serialize_exit(); }