Skip to content

Commit

Permalink
[PATCH] bcm43xx: optimization of DMA bitfields
Browse files Browse the repository at this point in the history
Convert the bitfields in the bcm43xx DMA code to properly
aligned u8 booleans. These flags are accessed in the DMA
hotpath, so it's a good idea to waste a few bytes of memory
for the sake of speed by not requiring masking (and probably
shifting) of the bitfields.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-Off-By: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Larry Finger authored and John W. Linville committed Aug 29, 2006
1 parent 9c974fb commit 80b60fa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/net/wireless/bcm43xx/bcm43xx_dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,12 @@ struct bcm43xx_dmaring {
u16 mmio_base;
/* DMA controller index number (0-5). */
int index;
u8 tx:1, /* TRUE, if this is a TX ring. */
dma64:1, /* TRUE, if 64-bit DMA is enabled (FALSE if 32bit). */
suspended:1; /* TRUE, if transfers are suspended on this ring. */
/* Boolean. Is this a TX ring? */
u8 tx;
/* Boolean. 64bit DMA if true, 32bit DMA otherwise. */
u8 dma64;
/* Boolean. Are transfers suspended on this ring? */
u8 suspended;
struct bcm43xx_private *bcm;
#ifdef CONFIG_BCM43XX_DEBUG
/* Maximum number of used slots. */
Expand Down

0 comments on commit 80b60fa

Please sign in to comment.