aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-12-09 12:28:46 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-12-09 12:28:46 +0000
commit8c6f1412b1b9da6d1664b5b7a1767e65da9def70 (patch)
tree7b37e10fa1a3b0e860113aba32191706d0ab4da0 /target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
parent27f36718d31026fadbf2b627eed2d261e98493f6 (diff)
downloadupstream-8c6f1412b1b9da6d1664b5b7a1767e65da9def70.tar.gz
upstream-8c6f1412b1b9da6d1664b5b7a1767e65da9def70.tar.bz2
upstream-8c6f1412b1b9da6d1664b5b7a1767e65da9def70.zip
ar71xx: improve ethernet driver cache footprint by removing an unnecessary pointer
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43588
Diffstat (limited to 'target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
index 2d7c963a44..b18c20b6dd 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
@@ -90,7 +90,6 @@ struct ag71xx_buf {
struct sk_buff *skb;
void *rx_buf;
};
- struct ag71xx_desc *desc;
union {
dma_addr_t dma_addr;
unsigned long timestamp;
@@ -203,6 +202,12 @@ static inline int ag71xx_desc_empty(struct ag71xx_desc *desc)
return (desc->ctrl & DESC_EMPTY) != 0;
}
+static inline struct ag71xx_desc *
+ag71xx_ring_desc(struct ag71xx_ring *ring, int idx)
+{
+ return (struct ag71xx_desc *) &ring->descs_cpu[idx * ring->desc_size];
+}
+
/* Register offsets */
#define AG71XX_REG_MAC_CFG1 0x0000
#define AG71XX_REG_MAC_CFG2 0x0004