From owner-svn-src-all@FreeBSD.ORG Sun Oct 28 04:18:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D24D6DC; Sun, 28 Oct 2012 04:18:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 536098FC08; Sun, 28 Oct 2012 04:18:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9S4IoxI026787; Sun, 28 Oct 2012 04:18:50 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9S4IoCD026785; Sun, 28 Oct 2012 04:18:50 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210280418.q9S4IoCD026785@svn.freebsd.org> From: Adrian Chadd Date: Sun, 28 Oct 2012 04:18:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242205 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 04:18:50 -0000 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;