ath_lock.diff

Johannes.Hofmann, 11/22/2012 01:27 PM

Download (2.3 KB)

View differences:

sys/dev/netif/ath/ath/if_ath.c
122 122
static void	ath_init(void *);
123 123
static void	ath_stop_locked(struct ifnet *);
124 124
static void	ath_stop(struct ifnet *);
125
static void	ath_start_locked(struct ifnet *);
125 126
static void	ath_start(struct ifnet *);
126 127
static int	ath_reset(struct ifnet *);
127 128
static int	ath_reset_vap(struct ieee80211vap *, u_long);
......
452 453
	 * Allocate tx+rx descriptors and populate the lists.
453 454
	 */
454 455
	wlan_assert_serialized();
455
	wlan_serialize_exit();
456 456
	error = ath_desc_alloc(sc);
457
	wlan_serialize_enter();
458 457
	if (error != 0) {
459 458
		if_printf(ifp, "failed to allocate descriptors: %d\n", error);
460 459
		goto bad;
......
1700 1699
	}
1701 1700
	ath_hal_intrset(ah, sc->sc_imask);
1702 1701

  
1703
	ath_start(ifp);			/* restart xmit */
1702
	ath_start_locked(ifp);			/* restart xmit */
1704 1703
	return 0;
1705 1704
}
1706 1705

  
......
1806 1805
}
1807 1806

  
1808 1807
static void
1809
ath_start(struct ifnet *ifp)
1808
ath_start_locked(struct ifnet *ifp)
1810 1809
{
1811 1810
	struct ath_softc *sc = ifp->if_softc;
1812 1811
	struct ieee80211_node *ni;
......
1899 1898
	}
1900 1899
}
1901 1900

  
1901
static void
1902
ath_start(struct ifnet *ifp)
1903
{
1904
	wlan_serialize_enter();
1905
	ath_start_locked(ifp);
1906
	wlan_serialize_exit();
1907
}
1908

  
1902 1909
static int
1903 1910
ath_media_change(struct ifnet *ifp)
1904 1911
{
......
4068 4075
		ieee80211_ff_age_all(ic, 100);
4069 4076
#endif
4070 4077
		if (!ifq_is_empty(&ifp->if_snd))
4071
			ath_start(ifp);
4078
			ath_start_locked(ifp);
4072 4079
	}
4073 4080
	wlan_serialize_exit();
4074 4081
#undef PA2DESC
......
5057 5064
	if (sc->sc_softled)
5058 5065
		ath_led_event(sc, sc->sc_txrix);
5059 5066

  
5060
	ath_start(ifp);
5067
	ath_start_locked(ifp);
5061 5068
	wlan_serialize_exit();
5062 5069
}
5063 5070

  
......
5096 5103
	if (sc->sc_softled)
5097 5104
		ath_led_event(sc, sc->sc_txrix);
5098 5105

  
5099
	ath_start(ifp);
5106
	ath_start_locked(ifp);
5100 5107
	wlan_serialize_exit();
5101 5108
}
5102 5109

  
......
5129 5136
	if (sc->sc_softled)
5130 5137
		ath_led_event(sc, sc->sc_txrix);
5131 5138

  
5132
	ath_start(ifp);
5139
	ath_start_locked(ifp);
5133 5140
	wlan_serialize_exit();
5134 5141
}
5135 5142