From owner-svn-src-all@FreeBSD.ORG Tue Mar 26 04:52:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 64F4FCD1; Tue, 26 Mar 2013 04:52:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3F68C950; Tue, 26 Mar 2013 04:52:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2Q4qHXE010619; Tue, 26 Mar 2013 04:52:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2Q4qH9H010618; Tue, 26 Mar 2013 04:52:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303260452.r2Q4qH9H010618@svn.freebsd.org> From: Adrian Chadd Date: Tue, 26 Mar 2013 04:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248715 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 26 Mar 2013 04:52:17 -0000 Author: adrian Date: Tue Mar 26 04:52:16 2013 New Revision: 248715 URL: http://svnweb.freebsd.org/changeset/base/248715 Log: Convert the CABQ queue code over to use the HAL link pointer method instead of axq_link. This (among a bunch of uncommitted work) is required for EDMA chips to correctly transmit frames on the CABQ. Tested: * AR9280, hostap mode * AR9380/AR9580, hostap mode (staggered beacons) TODO: * This code only really gets called when burst beacons are used; it glues multiple CABQ queues together when sending to the hardware. * More thorough bursted beacon testing! (first requires some work with the beacon queue code for bursted beacons, as that currently uses the link pointer and will fail on EDMA chips.) Modified: head/sys/dev/ath/if_ath_beacon.c Modified: head/sys/dev/ath/if_ath_beacon.c ============================================================================== --- head/sys/dev/ath/if_ath_beacon.c Tue Mar 26 04:48:58 2013 (r248714) +++ head/sys/dev/ath/if_ath_beacon.c Tue Mar 26 04:52:16 2013 (r248715) @@ -632,7 +632,7 @@ ath_beacon_generate(struct ath_softc *sc /* NB: only at DTIM */ ATH_TXQ_LOCK(&avp->av_mcastq); if (nmcastq) { - struct ath_buf *bfm; + struct ath_buf *bfm, *bfc_last; /* * Move frames from the s/w mcast q to the h/w cab q. @@ -645,16 +645,23 @@ ath_beacon_generate(struct ath_softc *sc * MORE data bit set on the last frame of each * intermediary VAP (ie, only clear the MORE * bit of the last frame on the last vap?) - * - * XXX TODO: once we append this, what happens - * to cabq->axq_link? It'll point at the avp - * mcastq link pointer, so things should be OK. - * Just double-check this is what actually happens. */ bfm = TAILQ_FIRST(&avp->av_mcastq.axq_q); ATH_TXQ_LOCK(cabq); - if (cabq->axq_link != NULL) - *cabq->axq_link = bfm->bf_daddr; + + /* + * If there's already a frame on the CABQ, we + * need to link to the end of the last frame. + * We can't use axq_link here because + * EDMA descriptors require some recalculation + * (checksum) to occur. + */ + bfc_last = ATH_TXQ_LAST(cabq, axq_q_s); + if (bfc_last != NULL) { + ath_hal_settxdesclink(sc->sc_ah, + bfc_last->bf_lastds, + bfm->bf_daddr); + } ath_txqmove(cabq, &avp->av_mcastq); ATH_TXQ_UNLOCK(cabq); /*