From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 21:25:49 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 D4A231065670; Mon, 31 Aug 2009 21:25:49 +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 C4A088FC12; Mon, 31 Aug 2009 21:25:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7VLPnq2039504; Mon, 31 Aug 2009 21:25:49 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VLPnQL039502; Mon, 31 Aug 2009 21:25:49 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200908312125.n7VLPnQL039502@svn.freebsd.org> From: Sam Leffler Date: Mon, 31 Aug 2009 21:25:49 +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: r196717 - 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: Mon, 31 Aug 2009 21:25:49 -0000 Author: sam Date: Mon Aug 31 21:25:49 2009 New Revision: 196717 URL: http://svn.freebsd.org/changeset/base/196717 Log: On resume in sta mode program the beacon timers so when roaming (and the previous ap is no longer in range) the device will deliver bmiss interrupts and trigger the state machine. Also arrange to sync the beacon timers on the next received beacon frame so that when we don't roam we re-synchronize with the ap. Tested by: trasz MFC after: 1 week Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Aug 31 21:07:05 2009 (r196716) +++ head/sys/dev/ath/if_ath.c Mon Aug 31 21:25:49 2009 (r196717) @@ -1236,7 +1236,16 @@ ath_resume(struct ath_softc *sc) if (sc->sc_resume_up) { if (ic->ic_opmode == IEEE80211_M_STA) { ath_init(sc); - ieee80211_beacon_miss(ic); + /* + * Program the beacon registers using the last rx'd + * beacon frame and enable sync on the next beacon + * we see. This should handle the case where we + * wakeup and find the same AP and also the case where + * we wakeup and need to roam. For the latter we + * should get bmiss events that trigger a roam. + */ + ath_beacon_config(sc, NULL); + sc->sc_syncbeacon = 1; } else ieee80211_resume_all(ic); }