Index: sys/dev/usb/if_urtw.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/if_urtw.c,v retrieving revision 1.6 diff -p -u -r1.6 if_urtw.c --- sys/dev/usb/if_urtw.c 16 Oct 2013 18:55:31 -0000 1.6 +++ sys/dev/usb/if_urtw.c 20 Apr 2016 22:21:54 -0000 @@ -729,7 +729,7 @@ urtw_attach(device_t parent, device_t se IFQ_SET_READY(&ifp->if_snd); memcpy(ifp->if_xname, device_xname(self), IFNAMSIZ); - if_attach(ifp); + if_initialize(ifp); ieee80211_ifattach(ic); /* override state transition machine */ @@ -737,10 +737,10 @@ urtw_attach(device_t parent, device_t se ic->ic_newstate = urtw_newstate; ieee80211_media_init(ic, urtw_media_change, ieee80211_media_status); - bpf_attach2(ifp, DLT_IEEE802_11_RADIO, - sizeof(struct ieee80211_frame) + IEEE80211_RADIOTAP_HDRLEN, - &sc->sc_drvbpf); + /* Publish the interface to userland. */ + if_register(ifp); + /* Initialize radio bpf tap. */ sc->sc_rxtap_len = sizeof sc->sc_rxtapu; sc->sc_rxtap.wr_ihdr.it_len = htole16(sc->sc_rxtap_len); sc->sc_rxtap.wr_ihdr.it_present = htole32(URTW_RX_RADIOTAP_PRESENT); @@ -749,6 +749,11 @@ urtw_attach(device_t parent, device_t se sc->sc_txtap.wt_ihdr.it_len = htole16(sc->sc_txtap_len); sc->sc_txtap.wt_ihdr.it_present = htole32(URTW_TX_RADIOTAP_PRESENT); + /* Publish radio bpf tap. */ + bpf_attach2(ifp, DLT_IEEE802_11_RADIO, + sizeof(struct ieee80211_frame) + IEEE80211_RADIOTAP_HDRLEN, + &sc->sc_drvbpf); + printf(", address %s\n", ether_sprintf(ic->ic_myaddr)); ieee80211_announce(ic); Index: sys/dev/usb/if_urtwn.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/if_urtwn.c,v retrieving revision 1.41 diff -p -u -r1.41 if_urtwn.c --- sys/dev/usb/if_urtwn.c 18 Jan 2016 02:45:05 -0000 1.41 +++ sys/dev/usb/if_urtwn.c 20 Apr 2016 22:21:55 -0000 @@ -439,7 +439,8 @@ urtwn_attach(device_t parent, device_t s IFQ_SET_READY(&ifp->if_snd); memcpy(ifp->if_xname, device_xname(sc->sc_dev), IFNAMSIZ); - if_attach(ifp); + if_initialize(ifp); + ifp->if_percpuq = if_percpuq_create(ifp); ieee80211_ifattach(ic); /* override default methods */ @@ -452,10 +453,10 @@ urtwn_attach(device_t parent, device_t s ic->ic_newstate = urtwn_newstate; ieee80211_media_init(ic, urtwn_media_change, ieee80211_media_status); - bpf_attach2(ifp, DLT_IEEE802_11_RADIO, - sizeof(struct ieee80211_frame) + IEEE80211_RADIOTAP_HDRLEN, - &sc->sc_drvbpf); + /* Publish the interface to userland. */ + if_register(ifp); + /* Initialize radio bpf tap. */ sc->sc_rxtap_len = sizeof(sc->sc_rxtapu); sc->sc_rxtap.wr_ihdr.it_len = htole16(sc->sc_rxtap_len); sc->sc_rxtap.wr_ihdr.it_present = htole32(URTWN_RX_RADIOTAP_PRESENT); @@ -464,6 +465,11 @@ urtwn_attach(device_t parent, device_t s sc->sc_txtap.wt_ihdr.it_len = htole16(sc->sc_txtap_len); sc->sc_txtap.wt_ihdr.it_present = htole32(URTWN_TX_RADIOTAP_PRESENT); + /* Publish radio bpf tap. */ + bpf_attach2(ifp, DLT_IEEE802_11_RADIO, + sizeof(struct ieee80211_frame) + IEEE80211_RADIOTAP_HDRLEN, + &sc->sc_drvbpf); + ieee80211_announce(ic); usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev);