summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_superg.c
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-04-15 20:29:39 +0000
committeradrian <adrian@FreeBSD.org>2012-04-15 20:29:39 +0000
commit69f376da56676e42c047d412618b785d5feb1d3b (patch)
treef01f1b029be7f02776024101a6deb8996053ab04 /sys/net80211/ieee80211_superg.c
parentc5f9250e61e56969e5e887398e4c9d526968812e (diff)
downloadFreeBSD-src-69f376da56676e42c047d412618b785d5feb1d3b.zip
FreeBSD-src-69f376da56676e42c047d412618b785d5feb1d3b.tar.gz
Migrate the net80211 TX aggregation state to be from per-AC to per-TID.
TODO: * Test mwl(4) more thoroughly! Reviewed by: bschmidt (for iwn)
Diffstat (limited to 'sys/net80211/ieee80211_superg.c')
-rw-r--r--sys/net80211/ieee80211_superg.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/net80211/ieee80211_superg.c b/sys/net80211/ieee80211_superg.c
index dfe6f19..172c1f9 100644
--- a/sys/net80211/ieee80211_superg.c
+++ b/sys/net80211/ieee80211_superg.c
@@ -562,9 +562,11 @@ ieee80211_ff_age(struct ieee80211com *ic, struct ieee80211_stageq *sq,
IEEE80211_LOCK(ic);
head = sq->head;
while ((m = sq->head) != NULL && M_AGE_GET(m) < quanta) {
+ int tid = WME_AC_TO_TID(M_WME_GETAC(m));
+
/* clear tap ref to frame */
ni = (struct ieee80211_node *) m->m_pkthdr.rcvif;
- tap = &ni->ni_tx_ampdu[M_WME_GETAC(m)];
+ tap = &ni->ni_tx_ampdu[tid];
KASSERT(tap->txa_private == m, ("staging queue empty"));
tap->txa_private = NULL;
@@ -670,7 +672,7 @@ ieee80211_ff_check(struct ieee80211_node *ni, struct mbuf *m)
* be aggregated with other types of frames when encryption is on?
*/
IEEE80211_LOCK(ic);
- tap = &ni->ni_tx_ampdu[pri];
+ tap = &ni->ni_tx_ampdu[WME_AC_TO_TID(pri)];
mstaged = tap->txa_private; /* NB: we reuse AMPDU state */
ieee80211_txampdu_count_packet(tap);
@@ -783,12 +785,14 @@ ieee80211_ff_node_cleanup(struct ieee80211_node *ni)
struct ieee80211_superg *sg = ic->ic_superg;
struct ieee80211_tx_ampdu *tap;
struct mbuf *m, *head;
- int ac;
+ int tid;
IEEE80211_LOCK(ic);
head = NULL;
- for (ac = 0; ac < WME_NUM_AC; ac++) {
- tap = &ni->ni_tx_ampdu[ac];
+ for (tid = 0; tid < WME_NUM_TID; tid++) {
+ int ac = TID_TO_WME_AC(tid);
+
+ tap = &ni->ni_tx_ampdu[tid];
m = tap->txa_private;
if (m != NULL) {
tap->txa_private = NULL;
OpenPOWER on IntegriCloud