diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/linux/linux-mtx-1-2.4.27/20-au1x00_ethernet_tx_stats.diff | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/linux/linux-mtx-1-2.4.27/20-au1x00_ethernet_tx_stats.diff')
-rw-r--r-- | recipes/linux/linux-mtx-1-2.4.27/20-au1x00_ethernet_tx_stats.diff | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/recipes/linux/linux-mtx-1-2.4.27/20-au1x00_ethernet_tx_stats.diff b/recipes/linux/linux-mtx-1-2.4.27/20-au1x00_ethernet_tx_stats.diff new file mode 100644 index 0000000000..5fefd991da --- /dev/null +++ b/recipes/linux/linux-mtx-1-2.4.27/20-au1x00_ethernet_tx_stats.diff @@ -0,0 +1,64 @@ +diff -p -u -r1.5.2.33 linux/drivers/net/au1000_eth.c +--- linux/drivers/net/au1000_eth.c 26 Nov 2004 08:40:13 -0000 1.5.2.33 ++++ linux/drivers/net/au1000_eth.c 21 Jan 2005 14:33:47 -0000 +@@ -83,7 +83,7 @@ static void au1000_tx_timeout(struct net + static int au1000_set_config(struct net_device *dev, struct ifmap *map); + static void set_rx_mode(struct net_device *); + static struct net_device_stats *au1000_get_stats(struct net_device *); +-static inline void update_tx_stats(struct net_device *, u32, u32); ++static inline void update_tx_stats(struct net_device *, u32); + static inline void update_rx_stats(struct net_device *, u32); + static void au1000_timer(unsigned long); + static int au1000_ioctl(struct net_device *, struct ifreq *, int); +@@ -1542,14 +1542,11 @@ static void __exit au1000_cleanup_module + + + static inline void +-update_tx_stats(struct net_device *dev, u32 status, u32 pkt_len) ++update_tx_stats(struct net_device *dev, u32 status) + { + struct au1000_private *aup = (struct au1000_private *) dev->priv; + struct net_device_stats *ps = &aup->stats; + +- ps->tx_packets++; +- ps->tx_bytes += pkt_len; +- + if (status & TX_FRAME_ABORTED) { + if (dev->if_port == IF_PORT_100BASEFX) { + if (status & (TX_JAB_TIMEOUT | TX_UNDERRUN)) { +@@ -1582,7 +1579,7 @@ static void au1000_tx_ack(struct net_dev + ptxd = aup->tx_dma_ring[aup->tx_tail]; + + while (ptxd->buff_stat & TX_T_DONE) { +- update_tx_stats(dev, ptxd->status, ptxd->len & 0x3ff); ++ update_tx_stats(dev, ptxd->status); + ptxd->buff_stat &= ~TX_T_DONE; + ptxd->len = 0; + au_sync(); +@@ -1604,6 +1601,7 @@ static void au1000_tx_ack(struct net_dev + static int au1000_tx(struct sk_buff *skb, struct net_device *dev) + { + struct au1000_private *aup = (struct au1000_private *) dev->priv; ++ struct net_device_stats *ps = &aup->stats; + volatile tx_dma_t *ptxd; + u32 buff_stat; + db_dest_t *pDB; +@@ -1623,7 +1621,7 @@ static int au1000_tx(struct sk_buff *skb + return 1; + } + else if (buff_stat & TX_T_DONE) { +- update_tx_stats(dev, ptxd->status, ptxd->len & 0x3ff); ++ update_tx_stats(dev, ptxd->status); + ptxd->len = 0; + } + +@@ -1643,6 +1641,9 @@ static int au1000_tx(struct sk_buff *skb + else + ptxd->len = skb->len; + ++ ps->tx_packets++; ++ ps->tx_bytes += ptxd->len; ++ + ptxd->buff_stat = pDB->dma_addr | TX_DMA_ENABLE; + au_sync(); + dev_kfree_skb(skb); |