Lines 52-57
Link Here
|
52 |
#include <net/if_dl.h> |
52 |
#include <net/if_dl.h> |
53 |
#include <net/if_media.h> |
53 |
#include <net/if_media.h> |
54 |
#include <net/if_types.h> |
54 |
#include <net/if_types.h> |
|
|
55 |
#include <net/vnet.h> |
55 |
|
56 |
|
56 |
#include <netinet/in.h> |
57 |
#include <netinet/in.h> |
57 |
#include <netinet/in_systm.h> |
58 |
#include <netinet/in_systm.h> |
Lines 606-614
Link Here
|
606 |
|
607 |
|
607 |
RUN_UNLOCK(sc); |
608 |
RUN_UNLOCK(sc); |
608 |
|
609 |
|
|
|
610 |
CURVNET_SET(vnet0); |
611 |
|
609 |
ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); |
612 |
ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); |
610 |
if (ifp == NULL) { |
613 |
if (ifp == NULL) { |
611 |
device_printf(sc->sc_dev, "can not if_alloc()\n"); |
614 |
device_printf(sc->sc_dev, "can not if_alloc()\n"); |
|
|
615 |
CURVNET_RESTORE(); |
612 |
goto detach; |
616 |
goto detach; |
613 |
} |
617 |
} |
614 |
ic = ifp->if_l2com; |
618 |
ic = ifp->if_l2com; |
Lines 702-707
Link Here
|
702 |
if (bootverbose) |
706 |
if (bootverbose) |
703 |
ieee80211_announce(ic); |
707 |
ieee80211_announce(ic); |
704 |
|
708 |
|
|
|
709 |
CURVNET_RESTORE(); |
710 |
|
705 |
return (0); |
711 |
return (0); |
706 |
|
712 |
|
707 |
detach: |
713 |
detach: |
Lines 739-746
Link Here
|
739 |
usb_callout_drain(&sc->ratectl_ch); |
745 |
usb_callout_drain(&sc->ratectl_ch); |
740 |
ieee80211_draintask(ic, &sc->cmdq_task); |
746 |
ieee80211_draintask(ic, &sc->cmdq_task); |
741 |
ieee80211_draintask(ic, &sc->ratectl_task); |
747 |
ieee80211_draintask(ic, &sc->ratectl_task); |
|
|
748 |
CURVNET_SET(ifp->if_vnet); |
742 |
ieee80211_ifdetach(ic); |
749 |
ieee80211_ifdetach(ic); |
743 |
if_free(ifp); |
750 |
if_free(ifp); |
|
|
751 |
CURVNET_RESTORE(); |
744 |
} |
752 |
} |
745 |
|
753 |
|
746 |
mtx_destroy(&sc->sc_mtx); |
754 |
mtx_destroy(&sc->sc_mtx); |