PERFORCE change 76642 for review
Sam Leffler
sam at FreeBSD.org
Fri May 6 16:49:37 PDT 2005
http://perforce.freebsd.org/chv.cgi?CH=76642
Change 76642 by sam at sam_ebb on 2005/05/06 23:48:53
o update for channel changes
o cleanup err/errx confusion
Affected files ...
.. //depot/projects/vap/sbin/ifconfig/ifieee80211.c#2 edit
Differences ...
==== //depot/projects/vap/sbin/ifconfig/ifieee80211.c#2 (text+ko) ====
@@ -803,7 +803,7 @@
ireq.i_data = buf;
ireq.i_len = sizeof(buf);
if (ioctl(s, SIOCG80211, &ireq) < 0)
- errx(1, "unable to get scan results");
+ err(1, "unable to get scan results");
len = ireq.i_len;
if (len < sizeof(struct ieee80211req_scan_result))
return;
@@ -898,7 +898,7 @@
ireq.i_data = buf;
ireq.i_len = sizeof(buf);
if (ioctl(s, SIOCG80211, &ireq) < 0)
- errx(1, "unable to get station information");
+ err(1, "unable to get station information");
len = ireq.i_len;
if (len < sizeof(struct ieee80211req_sta_info))
return;
@@ -952,13 +952,11 @@
strlcat(buf, " FHSS", sizeof(buf));
if (IEEE80211_IS_CHAN_A(c))
strlcat(buf, " 11a", sizeof(buf));
- /* XXX 11g schizophrenia */
- if (IEEE80211_IS_CHAN_G(c) ||
- IEEE80211_IS_CHAN_PUREG(c))
+ if (IEEE80211_IS_CHAN_ANYG(c))
strlcat(buf, " 11g", sizeof(buf));
else if (IEEE80211_IS_CHAN_B(c))
strlcat(buf, " 11b", sizeof(buf));
- if (IEEE80211_IS_CHAN_T(c))
+ if (IEEE80211_IS_CHAN_TURBO(c))
strlcat(buf, " Turbo", sizeof(buf));
printf("Channel %3u : %u%c Mhz%-14.14s",
ieee80211_mhz2ieee(c->ic_freq), c->ic_freq,
@@ -981,7 +979,7 @@
ireq.i_data = &chans;
ireq.i_len = sizeof(chans);
if (ioctl(s, SIOCG80211, &ireq) < 0)
- errx(1, "unable to get channel information");
+ err(1, "unable to get channel information");
if (!allchans) {
struct ieee80211req_chanlist active;
@@ -989,7 +987,7 @@
ireq.i_data = &active;
ireq.i_len = sizeof(active);
if (ioctl(s, SIOCG80211, &ireq) < 0)
- errx(1, "unable to get active channel list");
+ err(1, "unable to get active channel list");
memset(&achans, 0, sizeof(achans));
for (i = 0; i < chans.ic_nchans; i++) {
c = &chans.ic_chans[i];
@@ -1032,7 +1030,7 @@
(void) strncpy(ireq.i_name, name, sizeof(ireq.i_name));
ireq.i_type = IEEE80211_IOC_DRIVER_CAPS;
if (ioctl(s, SIOCG80211, &ireq) < 0)
- errx(1, "unable to get driver capabilities");
+ err(1, "unable to get driver capabilities");
caps = (((u_int16_t) ireq.i_val) << 16) | ((u_int16_t) ireq.i_len);
printb(name, caps, IEEE80211_C_BITS);
putchar('\n');
@@ -1197,7 +1195,7 @@
ireq.i_data = &chans;
ireq.i_len = sizeof(chans);
if (ioctl(s, SIOCG80211, &ireq) < 0)
- errx(1, "unable to get channel information");
+ err(1, "unable to get channel information");
freq = ieee80211_ieee2mhz(chan);
for (i = 0; i < chans.ic_nchans; i++) {
c = &chans.ic_chans[i];
More information about the p4-projects
mailing list