Index: sys/dev/usb/wlan/if_rsu.c =================================================================== --- sys/dev/usb/wlan/if_rsu.c +++ sys/dev/usb/wlan/if_rsu.c @@ -676,17 +676,20 @@ static void rsu_scan_start(struct ieee80211com *ic) { + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); struct rsu_softc *sc = ic->ic_softc; int error; /* Scanning is done by the firmware. */ RSU_LOCK(sc); - /* XXX TODO: force awake if in in network-sleep? */ - error = rsu_site_survey(sc, TAILQ_FIRST(&ic->ic_vaps)); + /* XXX TODO: force awake if in network-sleep? */ + error = rsu_site_survey(sc, vap); RSU_UNLOCK(sc); - if (error != 0) + if (error != 0) { device_printf(sc->sc_dev, "could not send site survey command\n"); + ieee80211_cancel_scan(vap); + } } static void