Date: Tue, 23 Nov 2004 23:25:09 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 65754 for review Message-ID: <200411232325.iANNP9op079889@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=65754 Change 65754 by sam@sam_ebb on 2004/11/23 23:24:09 o return all channels, not just active ones, for get chan info o add in get chan list to retrieve active channel list Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#19 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#19 (text+ko) ==== @@ -866,6 +866,15 @@ } static int +ieee80211_ioctl_getchanlist(struct ieee80211com *ic, struct ieee80211req *ireq) +{ + + if (sizeof(ic->ic_chan_active) > ireq->i_len) + ireq->i_len = sizeof(ic->ic_chan_active); + return copyout(&ic->ic_chan_active, ireq->i_data, ireq->i_len); +} + +static int ieee80211_ioctl_getchaninfo(struct ieee80211com *ic, struct ieee80211req *ireq) { struct ieee80211req_chaninfo chans; /* XXX off stack? */ @@ -881,7 +890,7 @@ i = 0; memset(&chans, 0, sizeof(chans)); for (; i <= IEEE80211_CHAN_MAX; i++) - if (isset(ic->ic_chan_active, i)) { + if (isset(ic->ic_chan_avail, i)) { struct ieee80211_channel *c = &ic->ic_channels[i]; chans.ic_chans[chans.ic_nchans].ic_freq = c->ic_freq; chans.ic_chans[chans.ic_nchans].ic_flags = c->ic_flags; @@ -1307,6 +1316,9 @@ break; } break; + case IEEE80211_IOC_CHANLIST: + error = ieee80211_ioctl_getchanlist(ic, ireq); + break; case IEEE80211_IOC_ROAMING: ireq->i_val = ic->ic_roaming; break; @@ -1638,7 +1650,7 @@ ieee80211_ioctl_setchanlist(struct ieee80211com *ic, struct ieee80211req *ireq) { struct ieee80211req_chanlist list; - u_char chanlist[roundup(IEEE80211_CHAN_MAX, NBBY)]; + u_char chanlist[IEEE80211_CHAN_BYTES]; int i, j, error; if (ireq->i_len != sizeof(list))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411232325.iANNP9op079889>