diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2005-05-13 18:17:09 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2005-05-13 18:17:09 +0000 |
commit | 440b2eeb5a63fa047d04c99a9c3544e16bc554fa (patch) | |
tree | 0efc238baada75904f771845a99b2975ef068e8d | |
parent | 7d0bc5f90795511b250bb74567a818bc4670310d (diff) |
give disassociation a chance when turning the interface down while associated.
avoid usb tx timeouts too.
-rw-r--r-- | sys/dev/usb/if_ral.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c index 299f2dfc3ab..d2994c6c81b 100644 --- a/sys/dev/usb/if_ral.c +++ b/sys/dev/usb/if_ral.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ral.c,v 1.28 2005/04/17 13:41:51 damien Exp $ */ +/* $OpenBSD: if_ral.c,v 1.29 2005/05/13 18:17:08 damien Exp $ */ /*- * Copyright (c) 2005 @@ -2095,6 +2095,8 @@ ural_stop(struct ifnet *ifp, int disable) struct ural_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; + ieee80211_new_state(ic, IEEE80211_S_INIT, -1); + /* disable Rx */ ural_write(sc, RAL_TXRX_CSR2, RAL_DISABLE_RX); @@ -2102,8 +2104,6 @@ ural_stop(struct ifnet *ifp, int disable) ural_write(sc, RAL_MAC_CSR1, RAL_RESET_ASIC | RAL_RESET_BBP); ural_write(sc, RAL_MAC_CSR1, 0); - ieee80211_new_state(ic, IEEE80211_S_INIT, -1); - sc->sc_tx_timer = 0; ifp->if_timer = 0; ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); |