Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 May 2005 23:49:36 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 76642 for review
Message-ID:  <200505062349.j46Nna27005940@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=76642

Change 76642 by sam@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];



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505062349.j46Nna27005940>