From owner-svn-src-all@FreeBSD.ORG Wed Aug 24 14:11:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 299E0106566B; Wed, 24 Aug 2011 14:11:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 194588FC18; Wed, 24 Aug 2011 14:11:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p7OEB0ZM057966; Wed, 24 Aug 2011 14:11:00 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7OEB03r057961; Wed, 24 Aug 2011 14:11:00 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201108241411.p7OEB03r057961@svn.freebsd.org> From: Adrian Chadd Date: Wed, 24 Aug 2011 14:11:00 +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: r225145 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2011 14:11:01 -0000 Author: adrian Date: Wed Aug 24 14:11:00 2011 New Revision: 225145 URL: http://svn.freebsd.org/changeset/base/225145 Log: Fix a missing initialisation of bt_flags when setting up the TDMA beacon. The AR5212 HAL didn't check this field; timers are enabled a different way. The AR5416 HAL however did, and since this field was uninitialised, it had whatever was on the stack at the time. This lead to "unpredictable" behaviour. This allows TDMA to work on the AR5416 and later chipsets. Thanks to: paradyse@gmail.com Approved by: re (kib, blanket) Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Wed Aug 24 14:09:32 2011 (r225144) +++ head/sys/dev/ath/if_ath.c Wed Aug 24 14:11:00 2011 (r225145) @@ -5485,6 +5485,8 @@ ath_tdma_settimers(struct ath_softc *sc, bt.bt_nextdba = (nexttbtt<<3) - sc->sc_tdmadbaprep; bt.bt_nextswba = (nexttbtt<<3) - sc->sc_tdmaswbaprep; bt.bt_nextatim = nexttbtt+1; + /* Enables TBTT, DBA, SWBA timers by default */ + bt.bt_flags = 0; ath_hal_beaconsettimers(ah, &bt); }