From 94a88508a575796b20fc6fa8cddca06ee2e64fe3 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Wed, 25 Nov 2015 18:24:49 +0000 Subject: [PATCH] [ath] listen to all beacons in IBSS and software beacon miss. I added MYBEACON support a while ago to listen to beacons that are only for your configured BSSID. For AR9380 and later NICs this results in a lot less chip wakeups in station mode as it then only shows you beacons that are destined to you. However in IBSS mode you really do want to hear all beacons so you can do IBSS merges. Oops. So only use MYBEACON for STA + not-scanning, and just use BEACON for the other modes it used to use BEACON for. This doesn't completely fix IBSS merges though - there are still some conditions to chase down and fix. --- sys/dev/ath/if_ath_rx.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/ath/if_ath_rx.c b/sys/dev/ath/if_ath_rx.c index 1e1f4143920..dbdfb895d72 100644 --- a/sys/dev/ath/if_ath_rx.c +++ b/sys/dev/ath/if_ath_rx.c @@ -172,9 +172,14 @@ ath_calcrxfilter(struct ath_softc *sc) * * Otherwise we only really need to hear beacons from * our own BSSID. + * + * IBSS? software beacon miss? Just receive all beacons. + * We need to hear beacons/probe requests from everyone so + * we can merge ibss. */ - if (ic->ic_opmode == IEEE80211_M_STA || - ic->ic_opmode == IEEE80211_M_IBSS || sc->sc_swbmiss) { + if (ic->ic_opmode == IEEE80211_M_IBSS || sc->sc_swbmiss) { + rfilt |= HAL_RX_FILTER_BEACON; + } else if (ic->ic_opmode == IEEE80211_M_STA) { if (sc->sc_do_mybeacon && ! sc->sc_scanning) { rfilt |= HAL_RX_FILTER_MYBEACON; } else { /* scanning, non-mybeacon chips */ @@ -431,7 +436,6 @@ ath_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m, sc->sc_syncbeacon = 0; } - /* fall thru... */ case IEEE80211_FC0_SUBTYPE_PROBE_RESP: if (vap->iv_opmode == IEEE80211_M_IBSS &&