PERFORCE change 141021 for review
Andrew Thompson
thompsa at FreeBSD.org
Fri May 2 00:44:04 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=141021
Change 141021 by thompsa at thompsa_burger on 2008/05/02 00:43:20
Make bwi_stop() do the locking like the corresponding bwi_init() does.
Affected files ...
.. //depot/projects/vap/sys/dev/bwi/if_bwi.c#14 edit
Differences ...
==== //depot/projects/vap/sys/dev/bwi/if_bwi.c#14 (text+ko) ====
@@ -127,6 +127,7 @@
static void bwi_restart(void *, int);
static void bwi_init_statechg(struct bwi_softc *, int);
static void bwi_stop(struct bwi_softc *, int);
+static void bwi_stop_locked(struct bwi_softc *, int);
static int bwi_newbuf(struct bwi_softc *, int, int);
static int bwi_encap(struct bwi_softc *, int, struct mbuf *,
struct ieee80211_node *);
@@ -580,10 +581,7 @@
struct ieee80211com *ic = ifp->if_l2com;
int i;
- BWI_LOCK(sc);
bwi_stop(sc, 1);
- BWI_UNLOCK(sc);
-
callout_drain(&sc->sc_calib_ch);
ieee80211_ifdetach(ic);
@@ -648,9 +646,7 @@
void
bwi_suspend(struct bwi_softc *sc)
{
- BWI_LOCK(sc);
bwi_stop(sc, 1);
- BWI_UNLOCK(sc);
}
void
@@ -665,9 +661,7 @@
int
bwi_shutdown(struct bwi_softc *sc)
{
- BWI_LOCK(sc);
bwi_stop(sc, 1);
- BWI_UNLOCK(sc);
return 0;
}
@@ -1239,7 +1233,7 @@
BWI_LOCK(sc);
- bwi_stop(sc, statechg);
+ bwi_stop_locked(sc, statechg);
bwi_bbp_power_on(sc, BWI_CLOCK_MODE_FAST);
@@ -1306,7 +1300,7 @@
BWI_UNLOCK(sc);
return;
bad:
- bwi_stop(sc, 1);
+ bwi_stop_locked(sc, 1);
BWI_UNLOCK(sc);
}
@@ -1513,6 +1507,14 @@
static void
bwi_stop(struct bwi_softc *sc, int statechg)
{
+ BWI_LOCK(sc);
+ bwi_stop(sc, statechg);
+ BWI_UNLOCK(sc);
+}
+
+static void
+bwi_stop_locked(struct bwi_softc *sc, int statechg)
+{
struct ifnet *ifp = sc->sc_ifp;
struct bwi_mac *mac;
int i, error, pwr_off = 0;
More information about the p4-projects
mailing list