From owner-svn-src-head@FreeBSD.ORG Tue Jul 21 19:01:04 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D774A106566B; Tue, 21 Jul 2009 19:01:04 +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 AC1478FC16; Tue, 21 Jul 2009 19:01:04 +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 n6LJ14Nx019317; Tue, 21 Jul 2009 19:01:04 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6LJ14nU019314; Tue, 21 Jul 2009 19:01:04 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200907211901.n6LJ14nU019314@svn.freebsd.org> From: Sam Leffler Date: Tue, 21 Jul 2009 19:01:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195807 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2009 19:01:05 -0000 Author: sam Date: Tue Jul 21 19:01:04 2009 New Revision: 195807 URL: http://svn.freebsd.org/changeset/base/195807 Log: track whether any mesh vaps are present to correctly setup the rx filter when, for example, an ap vap is created first Reviewed by: rpaulo Approved by: re (kib) Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Jul 21 16:54:11 2009 (r195806) +++ head/sys/dev/ath/if_ath.c Tue Jul 21 19:01:04 2009 (r195807) @@ -1023,6 +1023,8 @@ ath_vap_create(struct ieee80211com *ic, sc->sc_nvaps++; if (opmode == IEEE80211_M_STA) sc->sc_nstavaps++; + if (opmode == IEEE80211_M_MBSS) + sc->sc_nmeshvaps++; } switch (ic_opmode) { case IEEE80211_M_IBSS: @@ -1137,6 +1139,8 @@ ath_vap_delete(struct ieee80211vap *vap) vap->iv_opmode == IEEE80211_M_MBSS) { reclaim_address(sc, vap->iv_myaddr); ath_hal_setbssidmask(ah, sc->sc_hwbssidmask); + if (vap->iv_opmode == IEEE80211_M_MBSS) + sc->sc_nmeshvaps--; } if (vap->iv_opmode != IEEE80211_M_WDS) sc->sc_nvaps--; @@ -2381,7 +2385,7 @@ ath_calcrxfilter(struct ath_softc *sc) if (ic->ic_opmode == IEEE80211_M_HOSTAP && IEEE80211_IS_CHAN_ANYG(ic->ic_curchan)) rfilt |= HAL_RX_FILTER_BEACON; - if (ic->ic_opmode == IEEE80211_M_MBSS) { + if (sc->sc_nmeshvaps) { rfilt |= HAL_RX_FILTER_BEACON; if (sc->sc_hasbmatch) rfilt |= HAL_RX_FILTER_BSSID; Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Tue Jul 21 16:54:11 2009 (r195806) +++ head/sys/dev/ath/if_athvar.h Tue Jul 21 19:01:04 2009 (r195807) @@ -203,6 +203,7 @@ struct ath_softc { int sc_debug; int sc_nvaps; /* # vaps */ int sc_nstavaps; /* # station vaps */ + int sc_nmeshvaps; /* # mbss vaps */ u_int8_t sc_hwbssidmask[IEEE80211_ADDR_LEN]; u_int8_t sc_nbssid0; /* # vap's using base mac */ uint32_t sc_bssidmask; /* bssid mask */