Date: Mon, 1 Jun 2020 06:10:25 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361687 - head/sys/dev/ath Message-ID: <202006010610.0516APxk017801@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Mon Jun 1 06:10:25 2020 New Revision: 361687 URL: https://svnweb.freebsd.org/changeset/base/361687 Log: [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 Modified: head/sys/dev/ath/if_ath_rx.c Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Mon Jun 1 05:14:01 2020 (r361686) +++ head/sys/dev/ath/if_ath_rx.c Mon Jun 1 06:10:25 2020 (r361687) @@ -447,9 +447,17 @@ ath_recv_mgmt(struct ieee80211_node *ni, struct mbuf * (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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006010610.0516APxk017801>