IEEE80211_DPRINTF(("ieee80211_next_scan: chan %d->%d\n",
IEEE80211_DPRINTF(("%s: chan %d->%d\n", __func__,
ieee80211_next_scan(struct ifnet *ifp){	struct ieee80211com *ic = (void *)ifp;	struct ieee80211_channel *chan;	chan = ic->ic_bss->ni_chan;	for (;;) {		if (++chan > &ic->ic_channels[IEEE80211_CHAN_MAX])			chan = &ic->ic_channels[0];		if (isset(ic->ic_chan_scan, ieee80211_chan2ieee(ic, chan))) {			/*			 * Honor channels marked passive-only			 * during an active scan.			 */			if ((ic->ic_flags & IEEE80211_F_ASCAN) == 0 ||			    (chan->ic_flags & IEEE80211_CHAN_PASSIVE) == 0)				break;		}		if (chan == ic->ic_bss->ni_chan) {			ieee80211_end_scan(ifp);			return;		}	}	clrbit(ic->ic_chan_scan, ieee80211_chan2ieee(ic, chan));	IEEE80211_DPRINTF(("ieee80211_next_scan: chan %d->%d\n",	    ieee80211_chan2ieee(ic, ic->ic_bss->ni_chan),	    ieee80211_chan2ieee(ic, chan)));	ic->ic_bss->ni_chan = chan;	ieee80211_new_state(ic, IEEE80211_S_SCAN, -1);}