Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Stephen Hemminger and committed by
David S. Miller
4fafc123 c2839d43

+4 -20
+4 -20
drivers/net/appletalk/ltpc.c
··· 261 261 262 262 struct ltpc_private 263 263 { 264 - struct net_device_stats stats; 265 264 struct atalk_addr my_addr; 266 265 }; 267 266 ··· 698 699 static struct timer_list ltpc_timer; 699 700 700 701 static int ltpc_xmit(struct sk_buff *skb, struct net_device *dev); 701 - static struct net_device_stats *ltpc_get_stats(struct net_device *dev); 702 702 703 703 static int read_30 ( struct net_device *dev) 704 704 { ··· 724 726 int dnode, snode, llaptype, len; 725 727 int sklen; 726 728 struct sk_buff *skb; 727 - struct ltpc_private *ltpc_priv = netdev_priv(dev); 728 - struct net_device_stats *stats = &ltpc_priv->stats; 729 729 struct lt_rcvlap *ltc = (struct lt_rcvlap *) ltdmacbuf; 730 730 731 731 if (ltc->command != LT_RCVLAP) { ··· 775 779 776 780 skb_reset_transport_header(skb); 777 781 778 - stats->rx_packets++; 779 - stats->rx_bytes+=skb->len; 782 + dev->stats.rx_packets++; 783 + dev->stats.rx_bytes += skb->len; 780 784 781 785 /* toss it onwards */ 782 786 netif_rx(skb); ··· 900 904 /* in kernel 1.3.xx, on entry skb->data points to ddp header, 901 905 * and skb->len is the length of the ddp data + ddp header 902 906 */ 903 - 904 - struct ltpc_private *ltpc_priv = netdev_priv(dev); 905 - struct net_device_stats *stats = &ltpc_priv->stats; 906 - 907 907 int i; 908 908 struct lt_sendlap cbuf; 909 909 unsigned char *hdr; ··· 928 936 printk("\n"); 929 937 } 930 938 931 - stats->tx_packets++; 932 - stats->tx_bytes+=skb->len; 939 + dev->stats.tx_packets++; 940 + dev->stats.tx_bytes += skb->len; 933 941 934 942 dev_kfree_skb(skb); 935 943 return 0; 936 - } 937 - 938 - static struct net_device_stats *ltpc_get_stats(struct net_device *dev) 939 - { 940 - struct ltpc_private *ltpc_priv = netdev_priv(dev); 941 - struct net_device_stats *stats = &ltpc_priv->stats; 942 - return stats; 943 944 } 944 945 945 946 /* initialization stuff */ ··· 1120 1135 1121 1136 /* Fill in the fields of the device structure with ethernet-generic values. */ 1122 1137 dev->hard_start_xmit = ltpc_xmit; 1123 - dev->get_stats = ltpc_get_stats; 1124 1138 1125 1139 /* add the ltpc-specific things */ 1126 1140 dev->do_ioctl = &ltpc_ioctl;