From owner-svn-src-head@FreeBSD.ORG Sun Oct 14 23:52:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4209D54D; Sun, 14 Oct 2012 23:52:31 +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 23A668FC08; Sun, 14 Oct 2012 23:52:31 +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 q9ENqUGv068325; Sun, 14 Oct 2012 23:52:30 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ENqUF6068322; Sun, 14 Oct 2012 23:52:30 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210142352.q9ENqUF6068322@svn.freebsd.org> From: Adrian Chadd Date: Sun, 14 Oct 2012 23:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241566 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 14 Oct 2012 23:52:31 -0000 Author: adrian Date: Sun Oct 14 23:52:30 2012 New Revision: 241566 URL: http://svn.freebsd.org/changeset/base/241566 Log: Stop abusing the ATH_TID_*() queue macros for filtered frames and give them their own macro set. Modified: head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Sun Oct 14 23:45:56 2012 (r241565) +++ head/sys/dev/ath/if_ath_tx.c Sun Oct 14 23:52:30 2012 (r241566) @@ -2947,7 +2947,7 @@ ath_tx_tid_filt_addbuf(struct ath_softc ath_tx_set_retry(sc, bf); sc->sc_stats.ast_tx_swfiltered++; - ATH_TID_INSERT_TAIL(&tid->filtq, bf, bf_list); + ATH_TID_FILT_INSERT_TAIL(tid, bf, bf_list); } /* @@ -2996,8 +2996,8 @@ ath_tx_tid_filt_comp_complete(struct ath tid->clrdmask = 1; /* XXX this is really quite inefficient */ - while ((bf = ATH_TID_LAST(&tid->filtq, ath_bufhead_s)) != NULL) { - ATH_TID_REMOVE(&tid->filtq, bf, bf_list); + while ((bf = ATH_TID_FILT_LAST(tid, ath_bufhead_s)) != NULL) { + ATH_TID_FILT_REMOVE(tid, bf, bf_list); ATH_TID_INSERT_HEAD(tid, bf, bf_list); } @@ -3408,7 +3408,7 @@ ath_tx_tid_drain(struct ath_softc *sc, s /* And now, drain the filtered frame queue */ t = 0; for (;;) { - bf = ATH_TID_FIRST(&tid->filtq); + bf = ATH_TID_FILT_FIRST(tid); if (bf == NULL) break; @@ -3417,7 +3417,7 @@ ath_tx_tid_drain(struct ath_softc *sc, s t = 1; } - ATH_TID_REMOVE(&tid->filtq, bf, bf_list); + ATH_TID_FILT_REMOVE(tid, bf, bf_list); ath_tx_tid_drain_pkt(sc, an, tid, bf_cq, bf); } @@ -3667,8 +3667,8 @@ ath_tx_tid_cleanup(struct ath_softc *sc, * we run off and discard/process things. */ /* XXX this is really quite inefficient */ - while ((bf = ATH_TID_LAST(&atid->filtq, ath_bufhead_s)) != NULL) { - ATH_TID_REMOVE(&atid->filtq, bf, bf_list); + while ((bf = ATH_TID_FILT_LAST(atid, ath_bufhead_s)) != NULL) { + ATH_TID_FILT_REMOVE(atid, bf, bf_list); ATH_TID_INSERT_HEAD(atid, bf, bf_list); } Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Sun Oct 14 23:45:56 2012 (r241565) +++ head/sys/dev/ath/if_athvar.h Sun Oct 14 23:52:30 2012 (r241566) @@ -374,7 +374,7 @@ struct ath_txq { #define ATH_TXQ_LAST(_tq, _field) TAILQ_LAST(&(_tq)->axq_q, _field) /* - * These are for the TID software queue and filtered frames queues. + * These are for the TID software queue. */ #define ATH_TID_INSERT_HEAD(_tq, _elm, _field) do { \ TAILQ_INSERT_HEAD(&(_tq)->tid_q, (_elm), _field); \ @@ -391,6 +391,24 @@ struct ath_txq { #define ATH_TID_FIRST(_tq) TAILQ_FIRST(&(_tq)->tid_q) #define ATH_TID_LAST(_tq, _field) TAILQ_LAST(&(_tq)->tid_q, _field) +/* + * These are for the TID filtered frame queue + */ +#define ATH_TID_FILT_INSERT_HEAD(_tq, _elm, _field) do { \ + TAILQ_INSERT_HEAD(&(_tq)->filtq.tid_q, (_elm), _field); \ + (_tq)->axq_depth++; \ +} while (0) +#define ATH_TID_FILT_INSERT_TAIL(_tq, _elm, _field) do { \ + TAILQ_INSERT_TAIL(&(_tq)->filtq.tid_q, (_elm), _field); \ + (_tq)->axq_depth++; \ +} while (0) +#define ATH_TID_FILT_REMOVE(_tq, _elm, _field) do { \ + TAILQ_REMOVE(&(_tq)->filtq.tid_q, _elm, _field); \ + (_tq)->axq_depth--; \ +} while (0) +#define ATH_TID_FILT_FIRST(_tq) TAILQ_FIRST(&(_tq)->filtq.tid_q) +#define ATH_TID_FILT_LAST(_tq, _field) TAILQ_LAST(&(_tq)->filtq.tid_q,_field) + struct ath_vap { struct ieee80211vap av_vap; /* base class */ int av_bslot; /* beacon slot index */