From owner-svn-src-projects@FreeBSD.ORG Wed Jan 28 19:37:26 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49D2510656C0; Wed, 28 Jan 2009 19:37:26 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CAFC8FC12; Wed, 28 Jan 2009 19:37:26 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0SJbQKq030884; Wed, 28 Jan 2009 19:37:26 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0SJbQK0030883; Wed, 28 Jan 2009 19:37:26 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901281937.n0SJbQK0030883@svn.freebsd.org> From: Sam Leffler Date: Wed, 28 Jan 2009 19:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: 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... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 19:37:26 -0000 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, ®->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