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).
This commit is contained in:
Sam Leffler 2008-12-15 01:09:01 +00:00
parent 27c1a6f490
commit b6130d380f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=186102

View File

@ -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);