From owner-svn-src-head@FreeBSD.ORG Tue Feb 10 23:48:30 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 203C01065672; Tue, 10 Feb 2009 23:48:30 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DF0D8FC08; Tue, 10 Feb 2009 23:48:30 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1ANmT11007866; Tue, 10 Feb 2009 23:48:29 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1ANmTqo007864; Tue, 10 Feb 2009 23:48:29 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902102348.n1ANmTqo007864@svn.freebsd.org> From: Sam Leffler Date: Tue, 10 Feb 2009 23:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188465 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 10 Feb 2009 23:48:31 -0000 Author: sam Date: Tue Feb 10 23:48:29 2009 New Revision: 188465 URL: http://svn.freebsd.org/changeset/base/188465 Log: don't do phantom beacon miss checking for s/w beacon miss handling, this can mistakenly drop events that cause the s/w bmiss timer to never get re-armed Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Feb 10 23:22:29 2009 (r188464) +++ head/sys/dev/ath/if_ath.c Tue Feb 10 23:48:29 2009 (r188465) @@ -1372,29 +1372,34 @@ ath_fatal_proc(void *arg, int pending) static void ath_bmiss_vap(struct ieee80211vap *vap) { - struct ifnet *ifp = vap->iv_ic->ic_ifp; - struct ath_softc *sc = ifp->if_softc; - u_int64_t lastrx = sc->sc_lastrx; - u_int64_t tsf = ath_hal_gettsf64(sc->sc_ah); - u_int bmisstimeout = - vap->iv_bmissthreshold * vap->iv_bss->ni_intval * 1024; - - DPRINTF(sc, ATH_DEBUG_BEACON, - "%s: tsf %llu lastrx %lld (%llu) bmiss %u\n", - __func__, (unsigned long long) tsf, - (unsigned long long)(tsf - lastrx), - (unsigned long long) lastrx, bmisstimeout); /* * Workaround phantom bmiss interrupts by sanity-checking * the time of our last rx'd frame. If it is within the * beacon miss interval then ignore the interrupt. If it's * truly a bmiss we'll get another interrupt soon and that'll - * be dispatched up for processing. + * be dispatched up for processing. Note this applies only + * for h/w beacon miss events. */ - if (tsf - lastrx > bmisstimeout) - ATH_VAP(vap)->av_bmiss(vap); - else - sc->sc_stats.ast_bmiss_phantom++; + if ((vap->iv_flags_ext & IEEE80211_FEXT_SWBMISS) == 0) { + struct ifnet *ifp = vap->iv_ic->ic_ifp; + struct ath_softc *sc = ifp->if_softc; + u_int64_t lastrx = sc->sc_lastrx; + u_int64_t tsf = ath_hal_gettsf64(sc->sc_ah); + u_int bmisstimeout = + vap->iv_bmissthreshold * vap->iv_bss->ni_intval * 1024; + + DPRINTF(sc, ATH_DEBUG_BEACON, + "%s: tsf %llu lastrx %lld (%llu) bmiss %u\n", + __func__, (unsigned long long) tsf, + (unsigned long long)(tsf - lastrx), + (unsigned long long) lastrx, bmisstimeout); + + if (tsf - lastrx <= bmisstimeout) { + sc->sc_stats.ast_bmiss_phantom++; + return; + } + } + ATH_VAP(vap)->av_bmiss(vap); } static int