diff options
| author | Adrian Chadd <adrian@FreeBSD.org> | 2012-10-14 23:52:30 +0000 |
|---|---|---|
| committer | Adrian Chadd <adrian@FreeBSD.org> | 2012-10-14 23:52:30 +0000 |
| commit | 13aa9ee5c275952bb689ed6ad53a85ee1d51e7c0 (patch) | |
| tree | 111ca92c5621bc1a4cd9c1e03452831a7e4d0fd2 /sys/dev/ath | |
| parent | 42cdd52718460a4172ee6e51c6686a0cdf094554 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ath')
| -rw-r--r-- | sys/dev/ath/if_ath_tx.c | 14 | ||||
| -rw-r--r-- | sys/dev/ath/if_athvar.h | 20 |
2 files changed, 26 insertions, 8 deletions
diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index 3c2d4d5502db..21c4f3188403 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -2947,7 +2947,7 @@ ath_tx_tid_filt_addbuf(struct ath_softc *sc, struct ath_tid *tid, 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_softc *sc, struct ath_tid *tid) 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, struct ath_node *an, /* 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, struct ath_node *an, 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, struct ath_node *an, int tid) * 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); } diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h index af24789d1004..183f28bc067d 100644 --- a/sys/dev/ath/if_athvar.h +++ b/sys/dev/ath/if_athvar.h @@ -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 */ |
