--- if_bwn.c 2009-12-22 16:32:53.000000000 -0800 +++ /mnt/t62/sys/dev/bwn/if_bwn.c 2010-01-01 14:45:43.000000000 -0800 @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008 Weongyo Jeong + * Copyright (c) 2009-2010 Weongyo Jeong * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -792,6 +792,8 @@ struct ieee80211com *ic = ifp->if_l2com; int i; + sc->sc_flags |= BWN_FLAG_INVALID; + if (device_is_attached(sc->sc_dev)) { bwn_stop(sc, 1); callout_drain(&sc->sc_task_ch); @@ -2760,14 +2762,14 @@ if (mac->mac_status >= BWN_MAC_STATUS_INITED) { /* XXX FIXME opmode not based on VAP */ - memset(sc->sc_macaddr, 0, IEEE80211_ADDR_LEN); bwn_set_opmode(mac); bwn_set_macaddr(mac); } if (mac->mac_status >= BWN_MAC_STATUS_STARTED) bwn_core_stop(mac); - bwn_core_exit(mac); + if (sc->sc_flags & BWN_FLAG_INVALID) + bwn_core_exit(mac); sc->sc_rf_enabled = 0; ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);