Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Aug 2011 06:26:51 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r224902 - user/adrian/if_ath_tx/sys/dev/ath
Message-ID:  <201108160626.p7G6QpLA044322@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Tue Aug 16 06:26:51 2011
New Revision: 224902
URL: http://svn.freebsd.org/changeset/base/224902

Log:
  Begin to flesh out the 11n aggregation fields needed in ath_buf.
  
  The reference driver splits out the descriptor setup and rate series
  setup into functions separate from the initial TX path from net80211.
  
  The descriptor decisions are made during the ath_tx_start() / ath_tx_raw_xmit()
  calls, but the rate control selection is done at packet scheduling time.
  (I'll have to handle raw frames differently, preserving the rate control
  being requested by the caller.)
  
  I may not end up using all of these fields, but the basic premise still
  holds - ie, in order to do aggregation, I need to delay the descriptor
  setup until the aggregates are formed, and then only set the rate
  control flags on the first packet of the series. (Then I have to set
  the 11n aggregation fields in the first descriptor of each subframe.)
  
  Since I'm going for a unified TX path between legacy and non-legacy
  NICs, I'll have to squirrel away 11n and non-11n copies of the
  rate control decisions; and then use the correct set when setting
  up the multi-rate retry fields (either ath_hal_setupxtxdesc(),
  or ath_hal_set11nratescenario()).

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

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_athrate.h
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_athrate.h	Tue Aug 16 04:35:42 2011	(r224901)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_athrate.h	Tue Aug 16 06:26:51 2011	(r224902)
@@ -77,6 +77,12 @@ struct ath_ratectrl {
 struct ath_ratectrl *ath_rate_attach(struct ath_softc *);
 void	ath_rate_detach(struct ath_ratectrl *);
 
+struct ath_rc_series {
+	uint8_t rix;
+	uint8_t tries;
+	uint8_t flags;
+	uint32_t max4msframelen;
+};
 
 /*
  * State storage handling.

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h	Tue Aug 16 04:35:42 2011	(r224901)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h	Tue Aug 16 06:26:51 2011	(r224902)
@@ -194,14 +194,11 @@ struct ath_buf {
 
 	/* This state is kept to support software retries and aggregation */
 	struct {
-		int bfs_pktlen;		/* length of this packet */
-		int bfs_hdrlen;		/* length of this packet header */
 		int bfs_seqno;		/* sequence number of this packet */
 		int bfs_retries;	/* retry count */
 		uint16_t bfs_tid;	/* packet TID (or TID_MAX for no QoS) */
 		uint16_t bfs_pri;	/* packet AC priority */
 		struct ath_txq *bfs_txq;	/* eventual dest hardware TXQ */
-		uint16_t bfs_al;	/* length of aggregate */
 		uint16_t bfs_pktdur;	/* packet duration (at current rate?) */
 		uint16_t bfs_nframes;	/* number of frames in aggregate */
 		uint16_t bfs_ndelim;	/* number of delims for padding */
@@ -210,6 +207,24 @@ struct ath_buf {
 		int bfs_aggrburst:1;	/* part of aggregate burst? */
 		int bfs_isretried:1;	/* retried frame? */
 		int bfs_dobaw:1;	/* actually check against BAW? */
+		int bfs_shpream:1;	/* use short preamble */
+		int bfs_istxfrag:1;	/* is fragmented */
+		int bfs_nfl;		/* next fragment length */
+
+		/*
+		 * These fields are passed into the
+		 * descriptor setup functions.
+		 */
+		HAL_PKT_TYPE bfs_atype;	/* packet type */
+		int bfs_pktlen;		/* length of this packet */
+		int bfs_hdrlen;		/* length of this packet header */
+		uint16_t bfs_al;	/* length of aggregate */
+		int bfs_flags;		/* HAL descriptor flags */
+		int bfs_keyix;		/* crypto key index */
+		int bfs_keytype;	/* crypto key type */
+		enum ieee80211_protmode bfs_protmode;
+		HAL_11N_RATE_SERIES bfs_rc11n[4];	/* 11n TX series */
+		struct ath_rc_series bfs_rc[4];	/* non-11n TX series */
 	} bf_state;
 };
 typedef STAILQ_HEAD(, ath_buf) ath_bufhead;



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