Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Oct 2012 04:18:50 +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: r242205 - head/sys/net80211
Message-ID:  <201210280418.q9S4IoCD026785@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sun Oct 28 04:18:49 2012
New Revision: 242205
URL: http://svn.freebsd.org/changeset/base/242205

Log:
  Add some further BAR TX debugging; it was useful when figuring out
  when BAR TX was actually failing.

Modified:
  head/sys/net80211/ieee80211_ht.c

Modified: head/sys/net80211/ieee80211_ht.c
==============================================================================
--- head/sys/net80211/ieee80211_ht.c	Sun Oct 28 02:55:51 2012	(r242204)
+++ head/sys/net80211/ieee80211_ht.c	Sun Oct 28 04:18:49 2012	(r242205)
@@ -1025,12 +1025,21 @@ ieee80211_ht_node_init(struct ieee80211_
 	struct ieee80211_tx_ampdu *tap;
 	int tid;
 
+	IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N,
+	    ni,
+	    "%s: called",
+	    __func__);
+
 	if (ni->ni_flags & IEEE80211_NODE_HT) {
 		/*
 		 * Clean AMPDU state on re-associate.  This handles the case
 		 * where a station leaves w/o notifying us and then returns
 		 * before node is reaped for inactivity.
 		 */
+		IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N,
+		    ni,
+		    "%s: calling cleanup",
+		    __func__);
 		ieee80211_ht_node_cleanup(ni);
 	}
 	for (tid = 0; tid < WME_NUM_TID; tid++) {
@@ -1052,6 +1061,11 @@ ieee80211_ht_node_cleanup(struct ieee802
 	struct ieee80211com *ic = ni->ni_ic;
 	int i;
 
+	IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N,
+	    ni,
+	    "%s: called",
+	    __func__);
+
 	KASSERT(ni->ni_flags & IEEE80211_NODE_HT, ("not an HT node"));
 
 	/* XXX optimize this */
@@ -1684,6 +1698,11 @@ ampdu_tx_stop(struct ieee80211_tx_ampdu 
 	struct ieee80211_node *ni = tap->txa_ni;
 	struct ieee80211com *ic = ni->ni_ic;
 
+	IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N,
+	    tap->txa_ni,
+	    "%s: called",
+	    __func__);
+
 	KASSERT(tap->txa_flags & IEEE80211_AGGR_SETUP,
 	    ("txa_flags 0x%x tid %d ac %d", tap->txa_flags, tap->txa_tid,
 	    TID_TO_WME_AC(tap->txa_tid)));
@@ -2203,6 +2222,9 @@ bar_timeout(void *arg)
 	} else {
 		ni->ni_vap->iv_stats.is_ampdu_bar_tx_retry++;
 		if (ieee80211_send_bar(ni, tap, tap->txa_seqpending) != 0) {
+			IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N,
+			    ni, "%s: failed to TX, starting timer\n",
+			    __func__);
 			/*
 			 * If ieee80211_send_bar() fails here, the
 			 * timer may have stopped and/or the pending
@@ -2221,12 +2243,20 @@ bar_timeout(void *arg)
 static void
 bar_start_timer(struct ieee80211_tx_ampdu *tap)
 {
+	IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N,
+	    tap->txa_ni,
+	    "%s: called",
+	    __func__);
 	callout_reset(&tap->txa_timer, ieee80211_bar_timeout, bar_timeout, tap);
 }
 
 static void
 bar_stop_timer(struct ieee80211_tx_ampdu *tap)
 {
+	IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N,
+	    tap->txa_ni,
+	    "%s: called",
+	    __func__);
 	callout_stop(&tap->txa_timer);
 }
 
@@ -2258,6 +2288,10 @@ ieee80211_bar_response(struct ieee80211_
 	struct ieee80211_tx_ampdu *tap, int status)
 {
 
+	IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N,
+	    tap->txa_ni,
+	    "%s: called",
+	    __func__);
 	if (status == 0) {		/* got ACK */
 		IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N,
 		    ni, "BAR moves BA win <%u:%u> (%u frames) txseq %u tid %u",
@@ -2292,6 +2326,12 @@ ieee80211_send_bar(struct ieee80211_node
 	uint8_t *frm;
 	int tid, ret;
 
+
+	IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N,
+	    tap->txa_ni,
+	    "%s: called",
+	    __func__);
+
 	if ((tap->txa_flags & IEEE80211_AGGR_RUNNING) == 0) {
 		/* no ADDBA response, should not happen */
 		/* XXX stat+msg */
@@ -2354,6 +2394,9 @@ ieee80211_send_bar(struct ieee80211_node
 	 */
 	ret = ic->ic_raw_xmit(ni, m, NULL);
 	if (ret != 0) {
+		IEEE80211_NOTE(vap, IEEE80211_MSG_DEBUG | IEEE80211_MSG_11N,
+		    ni, "send BAR: failed: (ret = %d)\n",
+		    ret);
 		/* xmit failed, clear state flag */
 		tap->txa_flags &= ~IEEE80211_AGGR_BARPEND;
 		vap->iv_stats.is_ampdu_bar_tx_fail++;
@@ -2364,6 +2407,10 @@ ieee80211_send_bar(struct ieee80211_node
 		bar_start_timer(tap);
 	return 0;
 bad:
+	IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N,
+	    tap->txa_ni,
+	    "%s: bad! ret=%d",
+	    __func__, ret);
 	vap->iv_stats.is_ampdu_bar_tx_fail++;
 	ieee80211_free_node(ni);
 	return ret;



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