ath9k: fix an issue in ath_atx_tid paused flag management
authorLorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Sun, 1 Aug 2010 13:47:32 +0000 (15:47 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 4 Aug 2010 19:27:38 +0000 (15:27 -0400)
commit754018494216e07f43c611d342d7d8bd25b22140
treec8918b551fe0a793a3f98ae54415f45f9062e831
parent824b185adf86163e57892f22a878f97bc4bc69ab
ath9k: fix an issue in ath_atx_tid paused flag management

I noticed a possible issue in the paused flag management of the
ath_atx_tid data structure. In particular, in a noisy environment and
under heavy load, I observed that the AGGR session establishment could
fail several times consecutively causing values of the paused flag
greater than one for this TID (ath_tx_pause_tid is called more than
once from ath_tx_aggr_start).

Considering that the session for this TID can not be established also
after the mac80211 stack calls the ieee80211_agg_tx_operational() since
the ath_tx_aggr_resume() lowers the paused flag only by one.

This patch also replaces some BUG_ON calls with WARN_ON, as even if
these unlikely conditions happen, it's not fatal enough to justify a
BUG_ON.

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/xmit.c