diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-03-26 11:11:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-27 03:46:42 -0400 |
commit | 4fafc12328a4e2d4afbc4541c46be014e22c5b66 (patch) | |
tree | e0b3e4b1f234e4b882e29b891013c75c0b51fef6 /drivers/net/appletalk/ltpc.c | |
parent | c2839d433de2fee2216b41ef8222708949bf989f (diff) |
appletalk: convert LTPC to use internal net_device_stats
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/appletalk/ltpc.c')
-rw-r--r-- | drivers/net/appletalk/ltpc.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c index dc4d49605603..74d9787311e6 100644 --- a/drivers/net/appletalk/ltpc.c +++ b/drivers/net/appletalk/ltpc.c | |||
@@ -261,7 +261,6 @@ static unsigned char *ltdmacbuf; | |||
261 | 261 | ||
262 | struct ltpc_private | 262 | struct ltpc_private |
263 | { | 263 | { |
264 | struct net_device_stats stats; | ||
265 | struct atalk_addr my_addr; | 264 | struct atalk_addr my_addr; |
266 | }; | 265 | }; |
267 | 266 | ||
@@ -699,7 +698,6 @@ static int do_read(struct net_device *dev, void *cbuf, int cbuflen, | |||
699 | static struct timer_list ltpc_timer; | 698 | static struct timer_list ltpc_timer; |
700 | 699 | ||
701 | static int ltpc_xmit(struct sk_buff *skb, struct net_device *dev); | 700 | static int ltpc_xmit(struct sk_buff *skb, struct net_device *dev); |
702 | static struct net_device_stats *ltpc_get_stats(struct net_device *dev); | ||
703 | 701 | ||
704 | static int read_30 ( struct net_device *dev) | 702 | static int read_30 ( struct net_device *dev) |
705 | { | 703 | { |
@@ -726,8 +724,6 @@ static int sendup_buffer (struct net_device *dev) | |||
726 | int dnode, snode, llaptype, len; | 724 | int dnode, snode, llaptype, len; |
727 | int sklen; | 725 | int sklen; |
728 | struct sk_buff *skb; | 726 | struct sk_buff *skb; |
729 | struct ltpc_private *ltpc_priv = netdev_priv(dev); | ||
730 | struct net_device_stats *stats = <pc_priv->stats; | ||
731 | struct lt_rcvlap *ltc = (struct lt_rcvlap *) ltdmacbuf; | 727 | struct lt_rcvlap *ltc = (struct lt_rcvlap *) ltdmacbuf; |
732 | 728 | ||
733 | if (ltc->command != LT_RCVLAP) { | 729 | if (ltc->command != LT_RCVLAP) { |
@@ -779,8 +775,8 @@ static int sendup_buffer (struct net_device *dev) | |||
779 | 775 | ||
780 | skb_reset_transport_header(skb); | 776 | skb_reset_transport_header(skb); |
781 | 777 | ||
782 | stats->rx_packets++; | 778 | dev->stats.rx_packets++; |
783 | stats->rx_bytes+=skb->len; | 779 | dev->stats.rx_bytes += skb->len; |
784 | 780 | ||
785 | /* toss it onwards */ | 781 | /* toss it onwards */ |
786 | netif_rx(skb); | 782 | netif_rx(skb); |
@@ -904,10 +900,6 @@ static int ltpc_xmit(struct sk_buff *skb, struct net_device *dev) | |||
904 | /* in kernel 1.3.xx, on entry skb->data points to ddp header, | 900 | /* in kernel 1.3.xx, on entry skb->data points to ddp header, |
905 | * and skb->len is the length of the ddp data + ddp header | 901 | * and skb->len is the length of the ddp data + ddp header |
906 | */ | 902 | */ |
907 | |||
908 | struct ltpc_private *ltpc_priv = netdev_priv(dev); | ||
909 | struct net_device_stats *stats = <pc_priv->stats; | ||
910 | |||
911 | int i; | 903 | int i; |
912 | struct lt_sendlap cbuf; | 904 | struct lt_sendlap cbuf; |
913 | unsigned char *hdr; | 905 | unsigned char *hdr; |
@@ -936,20 +928,13 @@ static int ltpc_xmit(struct sk_buff *skb, struct net_device *dev) | |||
936 | printk("\n"); | 928 | printk("\n"); |
937 | } | 929 | } |
938 | 930 | ||
939 | stats->tx_packets++; | 931 | dev->stats.tx_packets++; |
940 | stats->tx_bytes+=skb->len; | 932 | dev->stats.tx_bytes += skb->len; |
941 | 933 | ||
942 | dev_kfree_skb(skb); | 934 | dev_kfree_skb(skb); |
943 | return 0; | 935 | return 0; |
944 | } | 936 | } |
945 | 937 | ||
946 | static struct net_device_stats *ltpc_get_stats(struct net_device *dev) | ||
947 | { | ||
948 | struct ltpc_private *ltpc_priv = netdev_priv(dev); | ||
949 | struct net_device_stats *stats = <pc_priv->stats; | ||
950 | return stats; | ||
951 | } | ||
952 | |||
953 | /* initialization stuff */ | 938 | /* initialization stuff */ |
954 | 939 | ||
955 | static int __init ltpc_probe_dma(int base, int dma) | 940 | static int __init ltpc_probe_dma(int base, int dma) |
@@ -1135,7 +1120,6 @@ struct net_device * __init ltpc_probe(void) | |||
1135 | 1120 | ||
1136 | /* Fill in the fields of the device structure with ethernet-generic values. */ | 1121 | /* Fill in the fields of the device structure with ethernet-generic values. */ |
1137 | dev->hard_start_xmit = ltpc_xmit; | 1122 | dev->hard_start_xmit = ltpc_xmit; |
1138 | dev->get_stats = ltpc_get_stats; | ||
1139 | 1123 | ||
1140 | /* add the ltpc-specific things */ | 1124 | /* add the ltpc-specific things */ |
1141 | dev->do_ioctl = <pc_ioctl; | 1125 | dev->do_ioctl = <pc_ioctl; |