diff options
| author | Adrian Chadd <adrian@FreeBSD.org> | 2012-12-09 19:20:28 +0000 |
|---|---|---|
| committer | Adrian Chadd <adrian@FreeBSD.org> | 2012-12-09 19:20:28 +0000 |
| commit | b3c69eef2501efad8caf4e79abe3321f1109ae86 (patch) | |
| tree | 98a74f306ede5fb24c6fafd3a679d8ff70c581a0 /sys/net80211 | |
| parent | 7a50e936c0f94d21731d32b0de748386dc9ed0e2 (diff) | |
Notes
Diffstat (limited to 'sys/net80211')
| -rw-r--r-- | sys/net80211/ieee80211_superg.c | 20 | ||||
| -rw-r--r-- | sys/net80211/ieee80211_superg.h | 3 |
2 files changed, 12 insertions, 11 deletions
diff --git a/sys/net80211/ieee80211_superg.c b/sys/net80211/ieee80211_superg.c index 84b48da1025a..0599f4588d85 100644 --- a/sys/net80211/ieee80211_superg.c +++ b/sys/net80211/ieee80211_superg.c @@ -560,7 +560,6 @@ void ieee80211_ff_age(struct ieee80211com *ic, struct ieee80211_stageq *sq, int quanta) { - struct ieee80211_superg *sg = ic->ic_superg; struct mbuf *m, *head; struct ieee80211_node *ni; struct ieee80211_tx_ampdu *tap; @@ -582,7 +581,6 @@ ieee80211_ff_age(struct ieee80211com *ic, struct ieee80211_stageq *sq, sq->head = m->m_nextpkt; sq->depth--; - sg->ff_stageqdepth--; } if (m == NULL) sq->tail = NULL; @@ -594,9 +592,12 @@ ieee80211_ff_age(struct ieee80211com *ic, struct ieee80211_stageq *sq, } static void -stageq_add(struct ieee80211_stageq *sq, struct mbuf *m) +stageq_add(struct ieee80211com *ic, struct ieee80211_stageq *sq, struct mbuf *m) { int age = ieee80211_ffagemax; + + IEEE80211_LOCK_ASSERT(ic); + if (sq->tail != NULL) { sq->tail->m_nextpkt = m; age -= M_AGE_GET(sq->head); @@ -610,10 +611,12 @@ stageq_add(struct ieee80211_stageq *sq, struct mbuf *m) } static void -stageq_remove(struct ieee80211_stageq *sq, struct mbuf *mstaged) +stageq_remove(struct ieee80211com *ic, struct ieee80211_stageq *sq, struct mbuf *mstaged) { struct mbuf *m, *mprev; + IEEE80211_LOCK_ASSERT(ic); + mprev = NULL; for (m = sq->head; m != NULL; m = m->m_nextpkt) { if (m == mstaged) { @@ -725,7 +728,7 @@ ieee80211_ff_check(struct ieee80211_node *ni, struct mbuf *m) tap->txa_private = NULL; if (mstaged != NULL) - stageq_remove(sq, mstaged); + stageq_remove(ic, sq, mstaged); IEEE80211_UNLOCK(ic); if (mstaged != NULL) { @@ -745,7 +748,7 @@ ieee80211_ff_check(struct ieee80211_node *ni, struct mbuf *m) */ if (mstaged != NULL) { tap->txa_private = NULL; - stageq_remove(sq, mstaged); + stageq_remove(ic, sq, mstaged); IEEE80211_UNLOCK(ic); IEEE80211_NOTE(vap, IEEE80211_MSG_SUPERG, ni, @@ -766,8 +769,7 @@ ieee80211_ff_check(struct ieee80211_node *ni, struct mbuf *m) ("txa_private %p", tap->txa_private)); tap->txa_private = m; - stageq_add(sq, m); - sg->ff_stageqdepth++; + stageq_add(ic, sq, m); IEEE80211_UNLOCK(ic); IEEE80211_NOTE(vap, IEEE80211_MSG_SUPERG, ni, @@ -806,7 +808,7 @@ ieee80211_ff_node_cleanup(struct ieee80211_node *ni) m = tap->txa_private; if (m != NULL) { tap->txa_private = NULL; - stageq_remove(&sg->ff_stageq[ac], m); + stageq_remove(ic, &sg->ff_stageq[ac], m); m->m_nextpkt = head; head = m; } diff --git a/sys/net80211/ieee80211_superg.h b/sys/net80211/ieee80211_superg.h index 81d918e4da85..4df138632fcb 100644 --- a/sys/net80211/ieee80211_superg.h +++ b/sys/net80211/ieee80211_superg.h @@ -66,7 +66,6 @@ struct ieee80211_stageq { struct ieee80211_superg { /* fast-frames staging q */ struct ieee80211_stageq ff_stageq[WME_NUM_AC]; - int ff_stageqdepth; /* cumulative depth */ }; void ieee80211_superg_attach(struct ieee80211com *); @@ -109,7 +108,7 @@ ieee80211_ff_age_all(struct ieee80211com *ic, int quanta) { struct ieee80211_superg *sg = ic->ic_superg; - if (sg != NULL && sg->ff_stageqdepth) { + if (sg != NULL) { if (sg->ff_stageq[WME_AC_VO].depth) ieee80211_ff_age(ic, &sg->ff_stageq[WME_AC_VO], quanta); if (sg->ff_stageq[WME_AC_VI].depth) |
