From de8e4d643690be1dbeb57ce04a050956606732fd Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Mon, 17 Sep 2012 01:21:55 +0000 Subject: [PATCH] Add a per-TID filter queue and filter state bits. These are intended for software TX filtering support, where the NIC decides there has been too many successive failues to a destination and will filter it. Although the filtering is done per-destination (via the keycache), the state and queue is kept per-TID for now. It simplifies the overall architecture design and locking. Whilst here, add ATH_TID_UNLOCK_ASSERT(). --- sys/dev/ath/if_athvar.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h index 4168771755c..6c8c5fce6a7 100644 --- a/sys/dev/ath/if_athvar.h +++ b/sys/dev/ath/if_athvar.h @@ -107,6 +107,12 @@ struct ath_tid { int ac; /* which AC gets this trafic */ int hwq_depth; /* how many buffers are on HW */ + struct { + TAILQ_HEAD(,ath_buf) axq_q; /* filtered queue */ + u_int axq_depth; /* SW queue depth */ + char axq_name[48]; /* lock name */ + } filtq; + /* * Entry on the ath_txq; when there's traffic * to send @@ -114,9 +120,16 @@ struct ath_tid { TAILQ_ENTRY(ath_tid) axq_qelem; int sched; int paused; /* >0 if the TID has been paused */ + + /* + * These are flags - perhaps later collapse + * down to a single uint32_t ? + */ int addba_tx_pending; /* TX ADDBA pending */ int bar_wait; /* waiting for BAR */ int bar_tx; /* BAR TXed */ + int isfiltered; /* is this node currently filtered */ + int clrdmask; /* has clrdmask been set */ /* * Is the TID being cleaned up after a transition @@ -336,6 +349,8 @@ struct ath_txq { #define ATH_TID_LOCK_ASSERT(_sc, _tid) \ ATH_TXQ_LOCK_ASSERT((_sc)->sc_ac2q[(_tid)->ac]) +#define ATH_TID_UNLOCK_ASSERT(_sc, _tid) \ + ATH_TXQ_UNLOCK_ASSERT((_sc)->sc_ac2q[(_tid)->ac]) #define ATH_TXQ_INSERT_HEAD(_tq, _elm, _field) do { \ TAILQ_INSERT_HEAD(&(_tq)->axq_q, (_elm), _field); \