1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-26 16:18:31 +00:00

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)
This commit is contained in:
Sam Leffler 2009-07-21 19:01:04 +00:00
parent 9e367360e3
commit fe0dd78965
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=195807
2 changed files with 6 additions and 1 deletions

View File

@ -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;

View File

@ -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 */