Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Mar 2008 00:36:35 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 137371 for review
Message-ID:  <200803110036.m2B0aZIc061780@repoman.freebsd.org>

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

Change 137371 by sam@sam_ebb on 2008/03/11 00:36:18

	must not cache regdomain state so we get correct status
	when multiple cards are present

Affected files ...

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

Differences ...

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

@@ -180,6 +180,7 @@
 
 static struct ieee80211req_chaninfo chaninfo;
 static struct ieee80211_regdomain regdomain;
+static int gotregdomain = 0;
 static struct ieee80211_roamparams_req roamparams;
 static int gotroam = 0;
 static struct ieee80211_txparams_req txparams;
@@ -422,14 +423,12 @@
 static void
 getregdomain(int s)
 {
-	static int gotrd = 0;
-
-	if (gotrd)
+	if (gotregdomain)
 		return;
 	if (get80211(s, IEEE80211_IOC_REGDOMAIN,
 	    &regdomain, sizeof(regdomain)) < 0)
 		errx(1, "unable to get regulatory domain info");
-	gotrd = 1;
+	gotregdomain = 1;
 }
 
 static void
@@ -4131,7 +4130,7 @@
 	gotroam = 0;
 	gottxparams = 0;
 	gothtconf = 0;
-	/* NB: ok to use cached regdomain state */
+	gotregdomain = 0;
 
 	if (get80211val(s, IEEE80211_IOC_NUMSSIDS, &num) < 0)
 		num = 0;



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