summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_iwi.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-07-02 23:10:17 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-07-02 23:10:17 +0000
commita12d5644f5c5a2fa21bd66dfc2c3c4f3ac228ad0 (patch)
tree594442f34d6f7a62ff5af6cdbada393a1d81a464 /sys/dev/pci/if_iwi.c
parent5ebc09d84d30a9d39b6610095d69063ffbda69f0 (diff)
clear IFF_RUNNING & IFF_OACTIVE in foo_stop() before de-allocating resources.
Diffstat (limited to 'sys/dev/pci/if_iwi.c')
-rw-r--r--sys/dev/pci/if_iwi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c
index 15d867cc3f5..f711ed84551 100644
--- a/sys/dev/pci/if_iwi.c
+++ b/sys/dev/pci/if_iwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwi.c,v 1.45 2005/06/20 18:25:14 damien Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.46 2005/07/02 23:10:11 brad Exp $ */
/*-
* Copyright (c) 2004, 2005
@@ -2014,6 +2014,9 @@ iwi_stop(struct ifnet *ifp, int disable)
iwi_stop_master(sc);
CSR_WRITE_4(sc, IWI_CSR_RST, IWI_RST_SW_RESET);
+ ifp->if_timer = 0;
+ ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+
/*
* Release Tx buffers
*/
@@ -2032,9 +2035,6 @@ iwi_stop(struct ifnet *ifp, int disable)
}
}
- ifp->if_timer = 0;
- ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
-
ieee80211_new_state(ic, IEEE80211_S_INIT, -1);
}