From owner-svn-src-head@FreeBSD.ORG Mon Jun 20 11:46:03 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A185A106566B; Mon, 20 Jun 2011 11:46:03 +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 9196B8FC13; Mon, 20 Jun 2011 11:46:03 +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 p5KBk3nS048382; Mon, 20 Jun 2011 11:46:03 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5KBk309048379; Mon, 20 Jun 2011 11:46:03 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201106201146.p5KBk309048379@svn.freebsd.org> From: Adrian Chadd Date: Mon, 20 Jun 2011 11:46:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223331 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2011 11:46:03 -0000 Author: adrian Date: Mon Jun 20 11:46:03 2011 New Revision: 223331 URL: http://svn.freebsd.org/changeset/base/223331 Log: Add a callback for ADDBA response timeouts. TX for the given TID needs to be paused during ADDBA requests (and unpaused once the session is established.) Since net80211 currently doesn't implement software aggregation, if this pause/unpause is done in the driver (as it is in my development branch) then it will need to be unpaused both on ADDBA response and on ADDBA timeout. This callback allows the driver to unpause TX for the relevant TID. Reviewed by: bschmidt Modified: head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Mon Jun 20 08:37:34 2011 (r223330) +++ head/sys/net80211/ieee80211_ht.c Mon Jun 20 11:46:03 2011 (r223331) @@ -217,6 +217,9 @@ static int ieee80211_addba_response(stru int code, int baparamset, int batimeout); static void ieee80211_addba_stop(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap); +static void null_addba_response_timeout(struct ieee80211_node *ni, + struct ieee80211_tx_ampdu *tap); + static void ieee80211_bar_response(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, int status); static void ampdu_tx_stop(struct ieee80211_tx_ampdu *tap); @@ -234,6 +237,7 @@ ieee80211_ht_attach(struct ieee80211com ic->ic_ampdu_enable = ieee80211_ampdu_enable; ic->ic_addba_request = ieee80211_addba_request; ic->ic_addba_response = ieee80211_addba_response; + ic->ic_addba_response_timeout = null_addba_response_timeout; ic->ic_addba_stop = ieee80211_addba_stop; ic->ic_bar_response = ieee80211_bar_response; ic->ic_ampdu_rx_start = ampdu_rx_start; @@ -1691,14 +1695,23 @@ ampdu_tx_stop(struct ieee80211_tx_ampdu tap->txa_flags &= ~(IEEE80211_AGGR_SETUP | IEEE80211_AGGR_NAK); } +/* + * ADDBA response timeout. + * + * If software aggregation and per-TID queue management was done here, + * that queue would be unpaused after the ADDBA timeout occurs. + */ static void addba_timeout(void *arg) { struct ieee80211_tx_ampdu *tap = arg; + struct ieee80211_node *ni = tap->txa_ni; + struct ieee80211com *ic = ni->ni_ic; /* XXX ? */ tap->txa_flags &= ~IEEE80211_AGGR_XCHGPEND; tap->txa_attempts++; + ic->ic_addba_response_timeout(ni, tap); } static void @@ -1721,6 +1734,12 @@ addba_stop_timeout(struct ieee80211_tx_a } } +static void +null_addba_response_timeout(struct ieee80211_node *ni, + struct ieee80211_tx_ampdu *tap) +{ +} + /* * Default method for requesting A-MPDU tx aggregation. * We setup the specified state block and start a timer Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Mon Jun 20 08:37:34 2011 (r223330) +++ head/sys/net80211/ieee80211_var.h Mon Jun 20 11:46:03 2011 (r223331) @@ -307,6 +307,8 @@ struct ieee80211com { int status, int baparamset, int batimeout); void (*ic_addba_stop)(struct ieee80211_node *, struct ieee80211_tx_ampdu *); + void (*ic_addba_response_timeout)(struct ieee80211_node *, + struct ieee80211_tx_ampdu *); /* BAR response received */ void (*ic_bar_response)(struct ieee80211_node *, struct ieee80211_tx_ampdu *, int status);