From owner-svn-src-user@FreeBSD.ORG Tue Aug 16 06:26:52 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 307051065670; Tue, 16 Aug 2011 06:26:52 +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 16FDF8FC0A; Tue, 16 Aug 2011 06:26:52 +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 p7G6QpYg044325; Tue, 16 Aug 2011 06:26:51 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7G6QpLA044322; Tue, 16 Aug 2011 06:26:51 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201108160626.p7G6QpLA044322@svn.freebsd.org> From: Adrian Chadd Date: Tue, 16 Aug 2011 06:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224902 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2011 06:26:52 -0000 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;