Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jan 2009 19:37:25 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r187852 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54...
Message-ID:  <200901281937.n0SJbQK0030883@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Wed Jan 28 19:37:25 2009
New Revision: 187852
URL: http://svn.freebsd.org/changeset/base/187852

Log:
  merge r187635: fix regulatory state check for all vaps' being down

Modified:
  projects/vap7/sys/   (props changed)
  projects/vap7/sys/contrib/pf/   (props changed)
  projects/vap7/sys/dev/   (props changed)
  projects/vap7/sys/dev/ath/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5210/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5211/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5212/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5312/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5416/   (props changed)
  projects/vap7/sys/dev/cxgb/   (props changed)
  projects/vap7/sys/dev/usb2/   (props changed)
  projects/vap7/sys/i386/conf/USB2   (props changed)
  projects/vap7/sys/modules/usb2/   (props changed)
  projects/vap7/sys/net80211/   (props changed)
  projects/vap7/sys/net80211/ieee80211_regdomain.c

Modified: projects/vap7/sys/net80211/ieee80211_regdomain.c
==============================================================================
--- projects/vap7/sys/net80211/ieee80211_regdomain.c	Wed Jan 28 19:36:46 2009	(r187851)
+++ projects/vap7/sys/net80211/ieee80211_regdomain.c	Wed Jan 28 19:37:25 2009	(r187852)
@@ -373,6 +373,13 @@ ieee80211_setregdomain(struct ieee80211v
 			c->ic_maxpower = 2*c->ic_maxregpower;
 	}
 	IEEE80211_LOCK(ic);
+	/* XXX bandaid; a running vap will likely crash */
+	if (!allvapsdown(ic)) {
+		IEEE80211_UNLOCK(ic);
+		IEEE80211_DPRINTF(vap, IEEE80211_MSG_IOCTL,
+		    "%s: reject: vaps are running\n", __func__);
+		return EBUSY;
+	}
 	error = ic->ic_setregdomain(ic, &reg->rd,
 	    reg->chaninfo.ic_nchans, reg->chaninfo.ic_chans);
 	if (error != 0) {
@@ -381,13 +388,6 @@ ieee80211_setregdomain(struct ieee80211v
 		    "%s: driver rejected request, error %u\n", __func__, error);
 		return error;
 	}
-	/* XXX bandaid; a running vap will likely crash */
-	if (!allvapsdown(ic)) {
-		IEEE80211_UNLOCK(ic);
-		IEEE80211_DPRINTF(vap, IEEE80211_MSG_IOCTL,
-		    "%s: reject: vaps are running\n", __func__);
-		return EBUSY;
-	}
 	/*
 	 * Commit: copy in new channel table and reset media state.
 	 * On return the state machines will be clocked so all vaps



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