Date: Mon, 20 Jun 2011 11:46:03 +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: r223331 - head/sys/net80211 Message-ID: <201106201146.p5KBk309048379@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106201146.p5KBk309048379>