diff options
author | sam <sam@FreeBSD.org> | 2009-07-21 19:01:04 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-07-21 19:01:04 +0000 |
commit | 0d00f45642b88a95b53e69a9c2beb4d34619bd7a (patch) | |
tree | 0b04c6c833cd3c2b3a8143aad3750365d2003efe | |
parent | 659a9be16ec80fc252ae9c9cba9ac9ecf7dbcce2 (diff) | |
download | FreeBSD-src-0d00f45642b88a95b53e69a9c2beb4d34619bd7a.zip FreeBSD-src-0d00f45642b88a95b53e69a9c2beb4d34619bd7a.tar.gz |
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)
-rw-r--r-- | sys/dev/ath/if_ath.c | 6 | ||||
-rw-r--r-- | sys/dev/ath/if_athvar.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 0a5787c2..a789f5e 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -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; diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h index 0bd3ea2..29efc4c 100644 --- a/sys/dev/ath/if_athvar.h +++ b/sys/dev/ath/if_athvar.h @@ -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 */ |