Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Oct 2008 05:09:43 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 151252 for review
Message-ID:  <200810110509.m9B59hep092554@repoman.freebsd.org>

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

Change 151252 by sam@sam_ebb on 2008/10/11 05:09:39

	o distinguish between adhoc and ahdemo modes
	o do not require 1/2 and 1/4 rate channels be present in the
	  calibration list when doing a gsm regulatory change; the
	  existing 900MHz cards are not self-identifying so there is
	  no way (using the calibration channel list) to check

Affected files ...

.. //depot/projects/vap/sbin/ifconfig/ifieee80211.c#30 edit

Differences ...

==== //depot/projects/vap/sbin/ifconfig/ifieee80211.c#30 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sbin/ifconfig/ifieee80211.c,v 1.59 2008/09/22 00:30:26 sam Exp $
+ * $FreeBSD: src/sbin/ifconfig/ifieee80211.c,v 1.57 2008/08/14 03:49:14 thompsa Exp $
  */
 
 /*-
@@ -1769,14 +1769,21 @@
 					printf("%u: skip, flags 0x%x not available\n", freq, chanFlags);
 				continue;
 			}
+			/*
+			 * NB: don't enforce 1/2 and 1/4 rate channels being
+			 * specified in the device's calibration list for
+			 * 900MHz cards because most are not self-identifying.
+			 */
 			if ((flags & IEEE80211_CHAN_HALF) &&
-			    (chanFlags & IEEE80211_CHAN_HALF) == 0) {
+			    ((chanFlags & IEEE80211_CHAN_HALF) == 0 &&
+			     (flags & IEEE80211_CHAN_GSM) == 0)) {
 				if (verbose)
 					printf("%u: skip, device does not support half-rate channels\n", freq);
 				continue;
 			}
 			if ((flags & IEEE80211_CHAN_QUARTER) &&
-			    (chanFlags & IEEE80211_CHAN_QUARTER) == 0) {
+			    ((chanFlags & IEEE80211_CHAN_HALF) == 0 &&
+			     (flags & IEEE80211_CHAN_GSM) == 0)) {
 				if (verbose)
 					printf("%u: skip, device does not support quarter-rate channels\n", freq);
 				continue;
@@ -3533,8 +3540,12 @@
 	(void) strncpy(ifmr.ifm_name, name, sizeof(ifmr.ifm_name));
 
 	if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) >= 0) {
-		if (ifmr.ifm_current & IFM_IEEE80211_ADHOC)
-			return IEEE80211_M_IBSS;	/* XXX ahdemo */
+		if (ifmr.ifm_current & IFM_IEEE80211_ADHOC) {
+			if (ifmr.ifm_current & IFM_FLAG0)
+				return IEEE80211_M_AHDEMO;
+			else
+				return IEEE80211_M_IBSS;
+		}
 		if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP)
 			return IEEE80211_M_HOSTAP;
 		if (ifmr.ifm_current & IFM_IEEE80211_MONITOR)
@@ -4243,6 +4254,7 @@
 			}
 		}
 	}
+
 	if (get80211val(s, IEEE80211_IOC_BEACON_INTERVAL, &val) != -1) {
 		/* XXX default define not visible */
 		if (val != 100 || verbose)



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