From owner-svn-src-head@freebsd.org Mon Jun 1 06:10:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF65332B157; Mon, 1 Jun 2020 06:10:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49b4Xd5Zzpz4CXX; Mon, 1 Jun 2020 06:10:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B639026B27; Mon, 1 Jun 2020 06:10:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0516APWf017802; Mon, 1 Jun 2020 06:10:25 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0516APxk017801; Mon, 1 Jun 2020 06:10:25 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202006010610.0516APxk017801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 1 Jun 2020 06:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361687 - head/sys/dev/ath X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/dev/ath X-SVN-Commit-Revision: 361687 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2020 06:10:25 -0000 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,