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)
This commit is contained in:
Adrian Chadd 2011-08-19 15:21:13 +00:00
parent 72dc07eb44
commit 198af96ed7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=225013

View File

@ -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)