PERFORCE change 124956 for review
Tai-hwa Liang
avatar at FreeBSD.org
Thu Aug 9 07:59:49 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=124956
Change 124956 by avatar at avatar_t40 on 2007/08/09 14:59:34
Fixing invalid channel display in ifconfig(8) by implementing
required ioctl().
Note that other information provided by ifconfig(8) such like
"list chan" or "list ap" are still not available at this moment.
Before an(4) is connected to wlan(4), users are encouraged to use
ancontrol(8) to retrieve aforementioned information.
Reported by: dhw (http://lists.freebsd.org/pipermail/freebsd-current/2007-July/074848.html)
Reviewed by: ambrisko
Tested by: dhw
MFP4 after: 2 weeks
Affected files ...
.. //depot/projects/wifi/sys/dev/an/if_an.c#16 edit
Differences ...
==== //depot/projects/wifi/sys/dev/an/if_an.c#16 (text+ko) ====
@@ -1862,6 +1862,7 @@
struct ifreq *ifr;
struct thread *td = curthread;
struct ieee80211req *ireq;
+ struct ieee80211_channel ch;
u_int8_t tmpstr[IEEE80211_NWID_LEN*2];
u_int8_t *tmpptr;
struct an_ltv_genconfig *config;
@@ -2217,6 +2218,22 @@
}
ireq->i_val = status->an_cur_channel;
break;
+ case IEEE80211_IOC_CURCHAN:
+ sc->areq.an_type = AN_RID_STATUS;
+ if (an_read_record(sc,
+ (struct an_ltv_gen *)&sc->areq)) {
+ error = EINVAL;
+ break;
+ }
+ bzero(&ch, sizeof(ch));
+ ch.ic_freq = ieee80211_ieee2mhz(status->an_cur_channel,
+ IEEE80211_CHAN_B);
+ ch.ic_flags = IEEE80211_CHAN_B;
+ ch.ic_ieee = status->an_cur_channel;
+ AN_UNLOCK(sc);
+ error = copyout(&ch, ireq->i_data, sizeof(ch));
+ AN_LOCK(sc);
+ break;
case IEEE80211_IOC_POWERSAVE:
sc->areq.an_type = AN_RID_ACTUALCFG;
if (an_read_record(sc,
More information about the p4-projects
mailing list