[ath] Don't re-program the beacon timers if we miss a beacon in software-beacon STA mode.

This is something I added a few years ago to handle resyncing the beacon if
we miss a beacon or need to sync after association/reassociation/powersave.

However, if we're doing STA+AP mode (eg DWDS) then we don't want
to reprogram the beacons here; this may upset normal AP operation.
I missed checking for the sc->sc_swbmiss flag so I was reinitialising
the beacon timers after every beacon miss / TSFOOR option, and
that isn't likely good.

This plus ensuring that STA's are created with "-beacon" to disable
BMISS/TSFOOR processing will hopefully quieten some of the issues
I've seen with missed beacons / TSFOOR (out of range) interrupts
coming in when operating in STA mode.

Tested:

* AR9380/AR9580, STA+AP modes
This commit is contained in:
Adrian Chadd 2020-06-01 06:10:25 +00:00
parent 694f3fc81c
commit f6287cc63c

View File

@ -447,9 +447,17 @@ ath_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m,
(unsigned int) (nexttbtt >> 10),
(int32_t) tsf_beacon - (int32_t) nexttbtt + tsf_intval);
/* We only do syncbeacon on STA VAPs; not on IBSS */
/*
* We only do syncbeacon on STA VAPs; not on IBSS;
* but don't do it with swbmiss enabled or we
* may end up overwriting AP mode beacon config.
*
* The driver (and net80211) should be smarter about
* this..
*/
if (vap->iv_opmode == IEEE80211_M_STA &&
sc->sc_syncbeacon &&
(!sc->sc_swbmiss) &&
ni == vap->iv_bss &&
(vap->iv_state == IEEE80211_S_RUN || vap->iv_state == IEEE80211_S_SLEEP)) {
DPRINTF(sc, ATH_DEBUG_BEACON,