Bug #2458 ยป ath_lock.diff
sys/dev/netif/ath/ath/if_ath.c | ||
---|---|---|
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);
|
||
... | ... | |
* 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;
|
||
... | ... | |
}
|
||
ath_hal_intrset(ah, sc->sc_imask);
|
||
ath_start(ifp); /* restart xmit */
|
||
ath_start_locked(ifp); /* restart xmit */
|
||
return 0;
|
||
}
|
||
... | ... | |
}
|
||
static void
|
||
ath_start(struct ifnet *ifp)
|
||
ath_start_locked(struct ifnet *ifp)
|
||
{
|
||
struct ath_softc *sc = ifp->if_softc;
|
||
struct ieee80211_node *ni;
|
||
... | ... | |
}
|
||
}
|
||
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)
|
||
{
|
||
... | ... | |
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
|
||
... | ... | |
if (sc->sc_softled)
|
||
ath_led_event(sc, sc->sc_txrix);
|
||
ath_start(ifp);
|
||
ath_start_locked(ifp);
|
||
wlan_serialize_exit();
|
||
}
|
||
... | ... | |
if (sc->sc_softled)
|
||
ath_led_event(sc, sc->sc_txrix);
|
||
ath_start(ifp);
|
||
ath_start_locked(ifp);
|
||
wlan_serialize_exit();
|
||
}
|
||
... | ... | |
if (sc->sc_softled)
|
||
ath_led_event(sc, sc->sc_txrix);
|
||
ath_start(ifp);
|
||
ath_start_locked(ifp);
|
||
wlan_serialize_exit();
|
||
}
|
||