From 198af96ed78433ef0a8221471c76554887837dbc Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Fri, 19 Aug 2011 15:21:13 +0000 Subject: [PATCH] Correctly handle BAR TX failures. On a TX failure, ic_raw_xmit will still call ieee80211_node_free(). There's no need to call it here. Submitted by: moonlightakkiy@yahoo.ca Approved by: re (kib) --- sys/net80211/ieee80211_ht.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index e6dbbf2724e8..c49a17803bb7 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -2309,11 +2309,15 @@ ieee80211_send_bar(struct ieee80211_node *ni, ni, "send BAR: tid %u ctl 0x%x start %u (attempt %d)", tid, barctl, seq, tap->txa_attempts); + /* + * ic_raw_xmit will free the node reference + * regardless of queue/TX success or failure. + */ ret = ic->ic_raw_xmit(ni, m, NULL); if (ret != 0) { /* xmit failed, clear state flag */ tap->txa_flags &= ~IEEE80211_AGGR_BARPEND; - goto bad; + return ret; } /* XXX hack against tx complete happening before timer is started */ if (tap->txa_flags & IEEE80211_AGGR_BARPEND)