Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 2008 18:04:44 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 151670 for review
Message-ID:  <200810211804.m9LI4iPP045131@repoman.freebsd.org>

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

Change 151670 by sam@sam_ebb on 2008/10/21 18:04:00

	0 is a potential ISO CC; add a #define and set it to 0xffff
	for now (must be 16 bits as ieee80211_regdomain struct defines
	sku's and cc's as uint16_t which may need fixing)

Affected files ...

.. //depot/projects/vap/sbin/ifconfig/ifieee80211.c#31 edit
.. //depot/projects/vap/sbin/ifconfig/regdomain.c#11 edit
.. //depot/projects/vap/sbin/ifconfig/regdomain.h#3 edit

Differences ...

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

@@ -425,7 +425,7 @@
 	struct ieee80211_devcaps_req dc;
 	struct regdata *rdp = getregdata();
 
-	if (rd->country != 0) {
+	if (rd->country != NO_COUNTRY) {
 		const struct country *cc;
 		/*
 		 * Check current country seting to make sure it's
@@ -456,7 +456,7 @@
 				errx(1, "country %s (%s) is not usable with "
 				    "regdomain %d", cc->isoname, cc->name,
 				    rd->regdomain);
-			else if (rp->cc != 0 && rp->cc != cc)
+			else if (rp->cc != NULL && rp->cc != cc)
 				errx(1, "country %s (%s) is not usable with "
 				   "regdomain %s", cc->isoname, cc->name,
 				   rp->name);

==== //depot/projects/vap/sbin/ifconfig/regdomain.c#11 (text+ko) ====

@@ -152,6 +152,7 @@
 	if (iseq(name, "country") && mt->country == NULL) {
 		mt->country = calloc(1, sizeof(struct country));
 		mt->country->isoname = strdup(id);
+		mt->country->code = NO_COUNTRY;
 		mt->nident++;
 		LIST_INSERT_HEAD(&mt->rdp->countries, mt->country, next);
 		return;
@@ -339,7 +340,7 @@
 	}
 	/* </country> */
 	if (iseq(name, "country") && mt->country != NULL) {
-		if (mt->country->code == 0) {
+		if (mt->country->code == NO_COUNTRY) {
 			warnx("no ISO cc for country at line %ld",
 			   XML_GetCurrentLineNumber(mt->parser));
 		}

==== //depot/projects/vap/sbin/ifconfig/regdomain.h#3 (text+ko) ====

@@ -73,6 +73,7 @@
 
 struct country {
 	enum ISOCountryCode	code;	   
+#define	NO_COUNTRY	0xffff
 	const struct regdomain	*rd;
 	const char*		isoname;
 	const char*		name;



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