PERFORCE change 137371 for review

Sam Leffler sam at FreeBSD.org
Tue Mar 11 00:36:36 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=137371

Change 137371 by sam at 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;


More information about the p4-projects mailing list