From owner-svn-src-head@FreeBSD.ORG Sat Jun 16 04:41:36 2012 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 1E471106564A; Sat, 16 Jun 2012 04:41:36 +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 F40B18FC14; Sat, 16 Jun 2012 04:41:35 +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 q5G4fZNi022718; Sat, 16 Jun 2012 04:41:35 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5G4fZD5022714; Sat, 16 Jun 2012 04:41:35 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206160441.q5G4fZD5022714@svn.freebsd.org> From: Adrian Chadd Date: Sat, 16 Jun 2012 04:41:35 +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: r237153 - in head/sys/dev/ath: . ath_hal 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: Sat, 16 Jun 2012 04:41:36 -0000 Author: adrian Date: Sat Jun 16 04:41:35 2012 New Revision: 237153 URL: http://svn.freebsd.org/changeset/base/237153 Log: Shuffle some more fields in ath_buf so it's not too big. This shaves off 20 bytes - from 288 bytes to 268 bytes. However, it's still too big. Modified: head/sys/dev/ath/ath_hal/ah_desc.h head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/ath_hal/ah_desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_desc.h Sat Jun 16 04:36:08 2012 (r237152) +++ head/sys/dev/ath/ath_hal/ah_desc.h Sat Jun 16 04:41:35 2012 (r237153) @@ -225,6 +225,7 @@ struct ath_desc_status { #define ds_rxstat ds_us.rx /* flags passed to tx descriptor setup methods */ +/* This is a uint16_t field in ath_buf, just be warned! */ #define HAL_TXDESC_CLRDMASK 0x0001 /* clear destination filter mask */ #define HAL_TXDESC_NOACK 0x0002 /* don't wait for ACK */ #define HAL_TXDESC_RTSENA 0x0004 /* enable RTS */ Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Jun 16 04:36:08 2012 (r237152) +++ head/sys/dev/ath/if_ath.c Sat Jun 16 04:41:35 2012 (r237153) @@ -662,6 +662,9 @@ ath_attach(u_int16_t devid, struct ath_s (void) ath_hal_settxchainmask(sc->sc_ah, tx_chainmask); } + device_printf(sc->sc_dev, "%s: sizeof(ath_buf) = %d bytes\n", + __func__, sizeof(struct ath_buf)); + #ifdef ATH_ENABLE_11N /* * Query HT capabilities Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Sat Jun 16 04:36:08 2012 (r237152) +++ head/sys/dev/ath/if_athvar.h Sat Jun 16 04:41:35 2012 (r237153) @@ -236,20 +236,32 @@ struct ath_buf { * These fields are passed into the * descriptor setup functions. */ + + /* Make this an 8 bit value? */ HAL_PKT_TYPE bfs_atype; /* packet type */ - int bfs_pktlen; /* length of this packet */ - int bfs_hdrlen; /* length of this packet header */ + + uint32_t bfs_pktlen; /* length of this packet */ + + uint16_t bfs_hdrlen; /* length of this packet header */ uint16_t bfs_al; /* length of aggregate */ - int bfs_txflags; /* HAL (tx) descriptor flags */ - int bfs_txrate0; /* first TX rate */ - int bfs_try0; /* first try count */ + + uint16_t bfs_txflags; /* HAL (tx) descriptor flags */ + uint8_t bfs_txrate0; /* first TX rate */ + uint8_t bfs_try0; /* first try count */ + + uint16_t bfs_txpower; /* tx power */ uint8_t bfs_ctsrate0; /* Non-zero - use this as ctsrate */ - int bfs_keyix; /* crypto key index */ - int bfs_txpower; /* tx power */ - int bfs_txantenna; /* TX antenna config */ + uint8_t bfs_ctsrate; /* CTS rate */ + + /* 16 bit? */ + int32_t bfs_keyix; /* crypto key index */ + int32_t bfs_txantenna; /* TX antenna config */ + + /* Make this an 8 bit value? */ enum ieee80211_protmode bfs_protmode; - int bfs_ctsrate; /* CTS rate */ - int bfs_ctsduration; /* CTS duration (pre-11n NICs) */ + + /* 16 bit? */ + uint32_t bfs_ctsduration; /* CTS duration (pre-11n NICs) */ struct ath_rc_series bfs_rc[ATH_RC_NUM]; /* non-11n TX series */ } bf_state; };