Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2011 15:21:14 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r225013 - head/sys/net80211
Message-ID:  <201108191521.p7JFLEhA009015@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Fri Aug 19 15:21:13 2011
New Revision: 225013
URL: http://svn.freebsd.org/changeset/base/225013

Log:
  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)

Modified:
  head/sys/net80211/ieee80211_ht.c

Modified: head/sys/net80211/ieee80211_ht.c
==============================================================================
--- head/sys/net80211/ieee80211_ht.c	Fri Aug 19 15:14:13 2011	(r225012)
+++ head/sys/net80211/ieee80211_ht.c	Fri Aug 19 15:21:13 2011	(r225013)
@@ -2309,11 +2309,15 @@ ieee80211_send_bar(struct ieee80211_node
 	    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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108191521.p7JFLEhA009015>