Date: Mon, 15 Dec 2008 01:09:01 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r186102 - head/sbin/ifconfig Message-ID: <200812150109.mBF191l2079634@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sam Date: Mon Dec 15 01:09:01 2008 New Revision: 186102 URL: http://svn.freebsd.org/changeset/base/186102 Log: 0 is a potential ISO CC; use new NO_COUNTRY #define to identify when the CC is not set. Note NO_COUNTRY is set 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). Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Mon Dec 15 01:06:49 2008 (r186101) +++ head/sbin/ifconfig/ifieee80211.c Mon Dec 15 01:09:01 2008 (r186102) @@ -425,7 +425,7 @@ setregdomain_cb(int s, void *arg) 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 @@ setregdomain_cb(int s, void *arg) 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812150109.mBF191l2079634>