Index: dev/pci/if_iwi.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_iwi.c,v retrieving revision 1.60 diff -u -r1.60 if_iwi.c --- dev/pci/if_iwi.c 2006/02/26 19:14:40 1.60 +++ dev/pci/if_iwi.c 2006/08/14 17:47:59 @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwi.c,v 1.60 2006/02/26 19:14:40 damien Exp $ */ +/* $OpenBSD: if_iwi.c,v 1.67 2006/05/01 08:39:17 damien Exp $ */ /*- * Copyright (c) 2004-2006 @@ -1989,6 +1989,8 @@ const char *ucode, *main; int i, error; + iwi_stop(ifp, 0); + if ((error = iwi_reset(sc)) != 0) { printf("%s: could not reset adapter\n", sc->sc_dev.dv_xname); goto fail; @@ -2072,13 +2074,13 @@ goto fail; } + ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_flags |= IFF_RUNNING; + if (ic->ic_opmode != IEEE80211_M_MONITOR) ieee80211_begin_scan(ifp); else ieee80211_new_state(ic, IEEE80211_S_RUN, -1); - - ifp->if_flags &= ~IFF_OACTIVE; - ifp->if_flags |= IFF_RUNNING; return 0;