svn commit: r224862 - user/adrian/if_ath_tx/sys/dev/ath

Adrian Chadd adrian at FreeBSD.org
Sun Aug 14 12:21:08 UTC 2011


Author: adrian
Date: Sun Aug 14 12:21:08 2011
New Revision: 224862
URL: http://svn.freebsd.org/changeset/base/224862

Log:
  Begin fleshing out the BAR handling.
  
  net80211 implements BAR frame queuing and completion handofing.
  The first place a BAR should be TXed is when the software retry
  limit has been exceeded for a TID currently doing aggregation.
  The process should be (just so I don't forget):
  
  * pause the TID;
  * send the BAR;
  * unpause the TID in ath_bar_response()
  
  If multiple BAR's are sent, paused will be incremented and decremented
  appropriately until all BAR frames have been transmitted (succesfully
  or otherwise.)
  
  However, using it with the current code is likely not going to work
  because the ath TX code isn't re-entrant w/ the way locking currently
  is implement.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h
  user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Sun Aug 14 11:47:42 2011	(r224861)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Sun Aug 14 12:21:08 2011	(r224862)
@@ -733,10 +733,12 @@ ath_attach(u_int16_t devid, struct ath_s
 	sc->sc_addba_request = ic->ic_addba_request;
 	sc->sc_addba_response = ic->ic_addba_response;
 	sc->sc_addba_stop = ic->ic_addba_stop;
+	sc->sc_bar_response = ic->ic_bar_response;
 
 	ic->ic_addba_request = ath_addba_request;
 	ic->ic_addba_response = ath_addba_response;
 	ic->ic_addba_stop = ath_addba_stop;
+	ic->ic_bar_response = ath_bar_response;
 
 	ieee80211_radiotap_attach(ic,
 	    &sc->sc_tx_th.wt_ihdr, sizeof(sc->sc_tx_th),

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sun Aug 14 11:47:42 2011	(r224861)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sun Aug 14 12:21:08 2011	(r224862)
@@ -2104,6 +2104,12 @@ ath_tx_aggr_retry_unaggr(struct ath_soft
 			ath_tx_update_baw(sc, an, atid,
 			    SEQNO(bf->bf_state.bfs_seqno));
 
+		/* Pause the TID */
+
+		/* Send BAR frame */
+		device_printf(sc->sc_dev, "%s: TID %d: send BAR\n",
+		    __func__, tid);
+
 		/* Free buffer, bf is free after this call */
 		ath_tx_default_comp(sc, bf, 0);
 		return;
@@ -2487,3 +2493,14 @@ ath_addba_stop(struct ieee80211_node *ni
 	ath_tx_cleanup(sc, an, tid);
 	ATH_TXQ_UNLOCK(txq);
 }
+
+void
+ath_bar_response(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap,
+    int status)
+{
+	struct ath_softc *sc = ni->ni_ic->ic_ifp->if_softc;
+
+	device_printf(sc->sc_dev, "%s: called\n", __func__);
+
+	sc->sc_bar_response(ni, tap, status);
+}

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h	Sun Aug 14 11:47:42 2011	(r224861)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.h	Sun Aug 14 12:21:08 2011	(r224862)
@@ -62,5 +62,7 @@ extern	int ath_addba_response(struct iee
     int code, int batimeout);
 extern	void ath_addba_stop(struct ieee80211_node *ni,
     struct ieee80211_tx_ampdu *tap);
+extern	void ath_bar_response(struct ieee80211_node *ni,
+     struct ieee80211_tx_ampdu *tap, int status);
 
 #endif

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h	Sun Aug 14 11:47:42 2011	(r224861)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h	Sun Aug 14 12:21:08 2011	(r224862)
@@ -470,6 +470,9 @@ struct ath_softc {
 				    struct ieee80211_tx_ampdu *, int, int, int);
 	void			(*sc_addba_stop)(struct ieee80211_node *,
 				    struct ieee80211_tx_ampdu *);
+	void			(*sc_bar_response)(struct ieee80211_node *ni,
+				    struct ieee80211_tx_ampdu *tap,
+				    int status);
 };
 
 #define	ATH_LOCK_INIT(_sc) \


More information about the svn-src-user mailing list