From b6130d380fcd56b37c8995c051b49206d719de5a Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Mon, 15 Dec 2008 01:09:01 +0000 Subject: [PATCH] 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). --- sbin/ifconfig/ifieee80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index 1896fd474f46..950d3bd3e0f6 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -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);