projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ar71xx: improve ethernet driver cache footprint by removing an unnecessary pointer
[openwrt.git]
/
target
/
linux
/
ar71xx
/
files
/
drivers
/
net
/
ethernet
/
atheros
/
ag71xx
/
ag71xx.h
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
2d7c963
..
b18c20b
100644
(file)
--- 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 sk_buff *skb;
void *rx_buf;
};
- struct ag71xx_desc *desc;
union {
dma_addr_t dma_addr;
unsigned long timestamp;
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;
}
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
/* Register offsets */
#define AG71XX_REG_MAC_CFG1 0x0000
#define AG71XX_REG_MAC_CFG2 0x0004