diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-20 20:43:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-20 20:43:29 -0400 |
commit | db6d8c7a4027b48d797b369a53f8470aaeed7063 (patch) | |
tree | e140c104a89abc2154e1f41a7db8ebecbb6fa0b4 /drivers/char | |
parent | 3a533374283aea50eab3976d8a6d30532175f009 (diff) | |
parent | fb65a7c091529bfffb1262515252c0d0f6241c5c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (1232 commits)
iucv: Fix bad merging.
net_sched: Add size table for qdiscs
net_sched: Add accessor function for packet length for qdiscs
net_sched: Add qdisc_enqueue wrapper
highmem: Export totalhigh_pages.
ipv6 mcast: Omit redundant address family checks in ip6_mc_source().
net: Use standard structures for generic socket address structures.
ipv6 netns: Make several "global" sysctl variables namespace aware.
netns: Use net_eq() to compare net-namespaces for optimization.
ipv6: remove unused macros from net/ipv6.h
ipv6: remove unused parameter from ip6_ra_control
tcp: fix kernel panic with listening_get_next
tcp: Remove redundant checks when setting eff_sacks
tcp: options clean up
tcp: Fix MD5 signatures for non-linear skbs
sctp: Update sctp global memory limit allocations.
sctp: remove unnecessary byteshifting, calculate directly in big-endian
sctp: Allow only 1 listening socket with SO_REUSEADDR
sctp: Do not leak memory on multiple listen() calls
sctp: Support ipv6only AF_INET6 sockets.
...
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 28 | ||||
-rw-r--r-- | drivers/char/synclink.c | 33 | ||||
-rw-r--r-- | drivers/char/synclink_gt.c | 28 | ||||
-rw-r--r-- | drivers/char/synclinkmp.c | 31 |
4 files changed, 53 insertions, 67 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 95743e2682fe..b694d430f10e 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
@@ -3886,9 +3886,8 @@ static bool rx_get_frame(MGSLPC_INFO *info) | |||
3886 | framesize = 0; | 3886 | framesize = 0; |
3887 | #if SYNCLINK_GENERIC_HDLC | 3887 | #if SYNCLINK_GENERIC_HDLC |
3888 | { | 3888 | { |
3889 | struct net_device_stats *stats = hdlc_stats(info->netdev); | 3889 | info->netdev->stats.rx_errors++; |
3890 | stats->rx_errors++; | 3890 | info->netdev->stats.rx_frame_errors++; |
3891 | stats->rx_frame_errors++; | ||
3892 | } | 3891 | } |
3893 | #endif | 3892 | #endif |
3894 | } else | 3893 | } else |
@@ -4144,7 +4143,6 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding, | |||
4144 | static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) | 4143 | static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) |
4145 | { | 4144 | { |
4146 | MGSLPC_INFO *info = dev_to_port(dev); | 4145 | MGSLPC_INFO *info = dev_to_port(dev); |
4147 | struct net_device_stats *stats = hdlc_stats(dev); | ||
4148 | unsigned long flags; | 4146 | unsigned long flags; |
4149 | 4147 | ||
4150 | if (debug_level >= DEBUG_LEVEL_INFO) | 4148 | if (debug_level >= DEBUG_LEVEL_INFO) |
@@ -4159,8 +4157,8 @@ static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4159 | info->tx_put = info->tx_count = skb->len; | 4157 | info->tx_put = info->tx_count = skb->len; |
4160 | 4158 | ||
4161 | /* update network statistics */ | 4159 | /* update network statistics */ |
4162 | stats->tx_packets++; | 4160 | dev->stats.tx_packets++; |
4163 | stats->tx_bytes += skb->len; | 4161 | dev->stats.tx_bytes += skb->len; |
4164 | 4162 | ||
4165 | /* done with socket buffer, so free it */ | 4163 | /* done with socket buffer, so free it */ |
4166 | dev_kfree_skb(skb); | 4164 | dev_kfree_skb(skb); |
@@ -4376,14 +4374,13 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
4376 | static void hdlcdev_tx_timeout(struct net_device *dev) | 4374 | static void hdlcdev_tx_timeout(struct net_device *dev) |
4377 | { | 4375 | { |
4378 | MGSLPC_INFO *info = dev_to_port(dev); | 4376 | MGSLPC_INFO *info = dev_to_port(dev); |
4379 | struct net_device_stats *stats = hdlc_stats(dev); | ||
4380 | unsigned long flags; | 4377 | unsigned long flags; |
4381 | 4378 | ||
4382 | if (debug_level >= DEBUG_LEVEL_INFO) | 4379 | if (debug_level >= DEBUG_LEVEL_INFO) |
4383 | printk("hdlcdev_tx_timeout(%s)\n",dev->name); | 4380 | printk("hdlcdev_tx_timeout(%s)\n",dev->name); |
4384 | 4381 | ||
4385 | stats->tx_errors++; | 4382 | dev->stats.tx_errors++; |
4386 | stats->tx_aborted_errors++; | 4383 | dev->stats.tx_aborted_errors++; |
4387 | 4384 | ||
4388 | spin_lock_irqsave(&info->lock,flags); | 4385 | spin_lock_irqsave(&info->lock,flags); |
4389 | tx_stop(info); | 4386 | tx_stop(info); |
@@ -4416,27 +4413,26 @@ static void hdlcdev_rx(MGSLPC_INFO *info, char *buf, int size) | |||
4416 | { | 4413 | { |
4417 | struct sk_buff *skb = dev_alloc_skb(size); | 4414 | struct sk_buff *skb = dev_alloc_skb(size); |
4418 | struct net_device *dev = info->netdev; | 4415 | struct net_device *dev = info->netdev; |
4419 | struct net_device_stats *stats = hdlc_stats(dev); | ||
4420 | 4416 | ||
4421 | if (debug_level >= DEBUG_LEVEL_INFO) | 4417 | if (debug_level >= DEBUG_LEVEL_INFO) |
4422 | printk("hdlcdev_rx(%s)\n",dev->name); | 4418 | printk("hdlcdev_rx(%s)\n",dev->name); |
4423 | 4419 | ||
4424 | if (skb == NULL) { | 4420 | if (skb == NULL) { |
4425 | printk(KERN_NOTICE "%s: can't alloc skb, dropping packet\n", dev->name); | 4421 | printk(KERN_NOTICE "%s: can't alloc skb, dropping packet\n", dev->name); |
4426 | stats->rx_dropped++; | 4422 | dev->stats.rx_dropped++; |
4427 | return; | 4423 | return; |
4428 | } | 4424 | } |
4429 | 4425 | ||
4430 | memcpy(skb_put(skb, size),buf,size); | 4426 | memcpy(skb_put(skb, size), buf, size); |
4431 | 4427 | ||
4432 | skb->protocol = hdlc_type_trans(skb, info->netdev); | 4428 | skb->protocol = hdlc_type_trans(skb, dev); |
4433 | 4429 | ||
4434 | stats->rx_packets++; | 4430 | dev->stats.rx_packets++; |
4435 | stats->rx_bytes += size; | 4431 | dev->stats.rx_bytes += size; |
4436 | 4432 | ||
4437 | netif_rx(skb); | 4433 | netif_rx(skb); |
4438 | 4434 | ||
4439 | info->netdev->last_rx = jiffies; | 4435 | dev->last_rx = jiffies; |
4440 | } | 4436 | } |
4441 | 4437 | ||
4442 | /** | 4438 | /** |
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index 9f14753fada1..527d220aa4aa 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c | |||
@@ -6631,9 +6631,8 @@ static bool mgsl_get_rx_frame(struct mgsl_struct *info) | |||
6631 | framesize = 0; | 6631 | framesize = 0; |
6632 | #if SYNCLINK_GENERIC_HDLC | 6632 | #if SYNCLINK_GENERIC_HDLC |
6633 | { | 6633 | { |
6634 | struct net_device_stats *stats = hdlc_stats(info->netdev); | 6634 | info->netdev->stats.rx_errors++; |
6635 | stats->rx_errors++; | 6635 | info->netdev->stats.rx_frame_errors++; |
6636 | stats->rx_frame_errors++; | ||
6637 | } | 6636 | } |
6638 | #endif | 6637 | #endif |
6639 | } else | 6638 | } else |
@@ -7744,7 +7743,6 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding, | |||
7744 | static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) | 7743 | static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) |
7745 | { | 7744 | { |
7746 | struct mgsl_struct *info = dev_to_port(dev); | 7745 | struct mgsl_struct *info = dev_to_port(dev); |
7747 | struct net_device_stats *stats = hdlc_stats(dev); | ||
7748 | unsigned long flags; | 7746 | unsigned long flags; |
7749 | 7747 | ||
7750 | if (debug_level >= DEBUG_LEVEL_INFO) | 7748 | if (debug_level >= DEBUG_LEVEL_INFO) |
@@ -7758,8 +7756,8 @@ static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) | |||
7758 | mgsl_load_tx_dma_buffer(info, skb->data, skb->len); | 7756 | mgsl_load_tx_dma_buffer(info, skb->data, skb->len); |
7759 | 7757 | ||
7760 | /* update network statistics */ | 7758 | /* update network statistics */ |
7761 | stats->tx_packets++; | 7759 | dev->stats.tx_packets++; |
7762 | stats->tx_bytes += skb->len; | 7760 | dev->stats.tx_bytes += skb->len; |
7763 | 7761 | ||
7764 | /* done with socket buffer, so free it */ | 7762 | /* done with socket buffer, so free it */ |
7765 | dev_kfree_skb(skb); | 7763 | dev_kfree_skb(skb); |
@@ -7975,14 +7973,13 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
7975 | static void hdlcdev_tx_timeout(struct net_device *dev) | 7973 | static void hdlcdev_tx_timeout(struct net_device *dev) |
7976 | { | 7974 | { |
7977 | struct mgsl_struct *info = dev_to_port(dev); | 7975 | struct mgsl_struct *info = dev_to_port(dev); |
7978 | struct net_device_stats *stats = hdlc_stats(dev); | ||
7979 | unsigned long flags; | 7976 | unsigned long flags; |
7980 | 7977 | ||
7981 | if (debug_level >= DEBUG_LEVEL_INFO) | 7978 | if (debug_level >= DEBUG_LEVEL_INFO) |
7982 | printk("hdlcdev_tx_timeout(%s)\n",dev->name); | 7979 | printk("hdlcdev_tx_timeout(%s)\n",dev->name); |
7983 | 7980 | ||
7984 | stats->tx_errors++; | 7981 | dev->stats.tx_errors++; |
7985 | stats->tx_aborted_errors++; | 7982 | dev->stats.tx_aborted_errors++; |
7986 | 7983 | ||
7987 | spin_lock_irqsave(&info->irq_spinlock,flags); | 7984 | spin_lock_irqsave(&info->irq_spinlock,flags); |
7988 | usc_stop_transmitter(info); | 7985 | usc_stop_transmitter(info); |
@@ -8015,27 +8012,27 @@ static void hdlcdev_rx(struct mgsl_struct *info, char *buf, int size) | |||
8015 | { | 8012 | { |
8016 | struct sk_buff *skb = dev_alloc_skb(size); | 8013 | struct sk_buff *skb = dev_alloc_skb(size); |
8017 | struct net_device *dev = info->netdev; | 8014 | struct net_device *dev = info->netdev; |
8018 | struct net_device_stats *stats = hdlc_stats(dev); | ||
8019 | 8015 | ||
8020 | if (debug_level >= DEBUG_LEVEL_INFO) | 8016 | if (debug_level >= DEBUG_LEVEL_INFO) |
8021 | printk("hdlcdev_rx(%s)\n",dev->name); | 8017 | printk("hdlcdev_rx(%s)\n", dev->name); |
8022 | 8018 | ||
8023 | if (skb == NULL) { | 8019 | if (skb == NULL) { |
8024 | printk(KERN_NOTICE "%s: can't alloc skb, dropping packet\n", dev->name); | 8020 | printk(KERN_NOTICE "%s: can't alloc skb, dropping packet\n", |
8025 | stats->rx_dropped++; | 8021 | dev->name); |
8022 | dev->stats.rx_dropped++; | ||
8026 | return; | 8023 | return; |
8027 | } | 8024 | } |
8028 | 8025 | ||
8029 | memcpy(skb_put(skb, size),buf,size); | 8026 | memcpy(skb_put(skb, size), buf, size); |
8030 | 8027 | ||
8031 | skb->protocol = hdlc_type_trans(skb, info->netdev); | 8028 | skb->protocol = hdlc_type_trans(skb, dev); |
8032 | 8029 | ||
8033 | stats->rx_packets++; | 8030 | dev->stats.rx_packets++; |
8034 | stats->rx_bytes += size; | 8031 | dev->stats.rx_bytes += size; |
8035 | 8032 | ||
8036 | netif_rx(skb); | 8033 | netif_rx(skb); |
8037 | 8034 | ||
8038 | info->netdev->last_rx = jiffies; | 8035 | dev->last_rx = jiffies; |
8039 | } | 8036 | } |
8040 | 8037 | ||
8041 | /** | 8038 | /** |
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index 07aa42a7f397..2c3e43bb2cc9 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c | |||
@@ -1536,7 +1536,6 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding, | |||
1536 | static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) | 1536 | static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) |
1537 | { | 1537 | { |
1538 | struct slgt_info *info = dev_to_port(dev); | 1538 | struct slgt_info *info = dev_to_port(dev); |
1539 | struct net_device_stats *stats = hdlc_stats(dev); | ||
1540 | unsigned long flags; | 1539 | unsigned long flags; |
1541 | 1540 | ||
1542 | DBGINFO(("%s hdlc_xmit\n", dev->name)); | 1541 | DBGINFO(("%s hdlc_xmit\n", dev->name)); |
@@ -1549,8 +1548,8 @@ static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1549 | tx_load(info, skb->data, skb->len); | 1548 | tx_load(info, skb->data, skb->len); |
1550 | 1549 | ||
1551 | /* update network statistics */ | 1550 | /* update network statistics */ |
1552 | stats->tx_packets++; | 1551 | dev->stats.tx_packets++; |
1553 | stats->tx_bytes += skb->len; | 1552 | dev->stats.tx_bytes += skb->len; |
1554 | 1553 | ||
1555 | /* done with socket buffer, so free it */ | 1554 | /* done with socket buffer, so free it */ |
1556 | dev_kfree_skb(skb); | 1555 | dev_kfree_skb(skb); |
@@ -1767,13 +1766,12 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
1767 | static void hdlcdev_tx_timeout(struct net_device *dev) | 1766 | static void hdlcdev_tx_timeout(struct net_device *dev) |
1768 | { | 1767 | { |
1769 | struct slgt_info *info = dev_to_port(dev); | 1768 | struct slgt_info *info = dev_to_port(dev); |
1770 | struct net_device_stats *stats = hdlc_stats(dev); | ||
1771 | unsigned long flags; | 1769 | unsigned long flags; |
1772 | 1770 | ||
1773 | DBGINFO(("%s hdlcdev_tx_timeout\n", dev->name)); | 1771 | DBGINFO(("%s hdlcdev_tx_timeout\n", dev->name)); |
1774 | 1772 | ||
1775 | stats->tx_errors++; | 1773 | dev->stats.tx_errors++; |
1776 | stats->tx_aborted_errors++; | 1774 | dev->stats.tx_aborted_errors++; |
1777 | 1775 | ||
1778 | spin_lock_irqsave(&info->lock,flags); | 1776 | spin_lock_irqsave(&info->lock,flags); |
1779 | tx_stop(info); | 1777 | tx_stop(info); |
@@ -1806,26 +1804,25 @@ static void hdlcdev_rx(struct slgt_info *info, char *buf, int size) | |||
1806 | { | 1804 | { |
1807 | struct sk_buff *skb = dev_alloc_skb(size); | 1805 | struct sk_buff *skb = dev_alloc_skb(size); |
1808 | struct net_device *dev = info->netdev; | 1806 | struct net_device *dev = info->netdev; |
1809 | struct net_device_stats *stats = hdlc_stats(dev); | ||
1810 | 1807 | ||
1811 | DBGINFO(("%s hdlcdev_rx\n", dev->name)); | 1808 | DBGINFO(("%s hdlcdev_rx\n", dev->name)); |
1812 | 1809 | ||
1813 | if (skb == NULL) { | 1810 | if (skb == NULL) { |
1814 | DBGERR(("%s: can't alloc skb, drop packet\n", dev->name)); | 1811 | DBGERR(("%s: can't alloc skb, drop packet\n", dev->name)); |
1815 | stats->rx_dropped++; | 1812 | dev->stats.rx_dropped++; |
1816 | return; | 1813 | return; |
1817 | } | 1814 | } |
1818 | 1815 | ||
1819 | memcpy(skb_put(skb, size),buf,size); | 1816 | memcpy(skb_put(skb, size), buf, size); |
1820 | 1817 | ||
1821 | skb->protocol = hdlc_type_trans(skb, info->netdev); | 1818 | skb->protocol = hdlc_type_trans(skb, dev); |
1822 | 1819 | ||
1823 | stats->rx_packets++; | 1820 | dev->stats.rx_packets++; |
1824 | stats->rx_bytes += size; | 1821 | dev->stats.rx_bytes += size; |
1825 | 1822 | ||
1826 | netif_rx(skb); | 1823 | netif_rx(skb); |
1827 | 1824 | ||
1828 | info->netdev->last_rx = jiffies; | 1825 | dev->last_rx = jiffies; |
1829 | } | 1826 | } |
1830 | 1827 | ||
1831 | /** | 1828 | /** |
@@ -4568,9 +4565,8 @@ check_again: | |||
4568 | 4565 | ||
4569 | #if SYNCLINK_GENERIC_HDLC | 4566 | #if SYNCLINK_GENERIC_HDLC |
4570 | if (framesize == 0) { | 4567 | if (framesize == 0) { |
4571 | struct net_device_stats *stats = hdlc_stats(info->netdev); | 4568 | info->netdev->stats.rx_errors++; |
4572 | stats->rx_errors++; | 4569 | info->netdev->stats.rx_frame_errors++; |
4573 | stats->rx_frame_errors++; | ||
4574 | } | 4570 | } |
4575 | #endif | 4571 | #endif |
4576 | 4572 | ||
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index c4bc09018368..5768c4136342 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c | |||
@@ -1672,7 +1672,6 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding, | |||
1672 | static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) | 1672 | static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) |
1673 | { | 1673 | { |
1674 | SLMP_INFO *info = dev_to_port(dev); | 1674 | SLMP_INFO *info = dev_to_port(dev); |
1675 | struct net_device_stats *stats = hdlc_stats(dev); | ||
1676 | unsigned long flags; | 1675 | unsigned long flags; |
1677 | 1676 | ||
1678 | if (debug_level >= DEBUG_LEVEL_INFO) | 1677 | if (debug_level >= DEBUG_LEVEL_INFO) |
@@ -1686,8 +1685,8 @@ static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1686 | tx_load_dma_buffer(info, skb->data, skb->len); | 1685 | tx_load_dma_buffer(info, skb->data, skb->len); |
1687 | 1686 | ||
1688 | /* update network statistics */ | 1687 | /* update network statistics */ |
1689 | stats->tx_packets++; | 1688 | dev->stats.tx_packets++; |
1690 | stats->tx_bytes += skb->len; | 1689 | dev->stats.tx_bytes += skb->len; |
1691 | 1690 | ||
1692 | /* done with socket buffer, so free it */ | 1691 | /* done with socket buffer, so free it */ |
1693 | dev_kfree_skb(skb); | 1692 | dev_kfree_skb(skb); |
@@ -1903,14 +1902,13 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
1903 | static void hdlcdev_tx_timeout(struct net_device *dev) | 1902 | static void hdlcdev_tx_timeout(struct net_device *dev) |
1904 | { | 1903 | { |
1905 | SLMP_INFO *info = dev_to_port(dev); | 1904 | SLMP_INFO *info = dev_to_port(dev); |
1906 | struct net_device_stats *stats = hdlc_stats(dev); | ||
1907 | unsigned long flags; | 1905 | unsigned long flags; |
1908 | 1906 | ||
1909 | if (debug_level >= DEBUG_LEVEL_INFO) | 1907 | if (debug_level >= DEBUG_LEVEL_INFO) |
1910 | printk("hdlcdev_tx_timeout(%s)\n",dev->name); | 1908 | printk("hdlcdev_tx_timeout(%s)\n",dev->name); |
1911 | 1909 | ||
1912 | stats->tx_errors++; | 1910 | dev->stats.tx_errors++; |
1913 | stats->tx_aborted_errors++; | 1911 | dev->stats.tx_aborted_errors++; |
1914 | 1912 | ||
1915 | spin_lock_irqsave(&info->lock,flags); | 1913 | spin_lock_irqsave(&info->lock,flags); |
1916 | tx_stop(info); | 1914 | tx_stop(info); |
@@ -1943,27 +1941,27 @@ static void hdlcdev_rx(SLMP_INFO *info, char *buf, int size) | |||
1943 | { | 1941 | { |
1944 | struct sk_buff *skb = dev_alloc_skb(size); | 1942 | struct sk_buff *skb = dev_alloc_skb(size); |
1945 | struct net_device *dev = info->netdev; | 1943 | struct net_device *dev = info->netdev; |
1946 | struct net_device_stats *stats = hdlc_stats(dev); | ||
1947 | 1944 | ||
1948 | if (debug_level >= DEBUG_LEVEL_INFO) | 1945 | if (debug_level >= DEBUG_LEVEL_INFO) |
1949 | printk("hdlcdev_rx(%s)\n",dev->name); | 1946 | printk("hdlcdev_rx(%s)\n",dev->name); |
1950 | 1947 | ||
1951 | if (skb == NULL) { | 1948 | if (skb == NULL) { |
1952 | printk(KERN_NOTICE "%s: can't alloc skb, dropping packet\n", dev->name); | 1949 | printk(KERN_NOTICE "%s: can't alloc skb, dropping packet\n", |
1953 | stats->rx_dropped++; | 1950 | dev->name); |
1951 | dev->stats.rx_dropped++; | ||
1954 | return; | 1952 | return; |
1955 | } | 1953 | } |
1956 | 1954 | ||
1957 | memcpy(skb_put(skb, size),buf,size); | 1955 | memcpy(skb_put(skb, size), buf, size); |
1958 | 1956 | ||
1959 | skb->protocol = hdlc_type_trans(skb, info->netdev); | 1957 | skb->protocol = hdlc_type_trans(skb, dev); |
1960 | 1958 | ||
1961 | stats->rx_packets++; | 1959 | dev->stats.rx_packets++; |
1962 | stats->rx_bytes += size; | 1960 | dev->stats.rx_bytes += size; |
1963 | 1961 | ||
1964 | netif_rx(skb); | 1962 | netif_rx(skb); |
1965 | 1963 | ||
1966 | info->netdev->last_rx = jiffies; | 1964 | dev->last_rx = jiffies; |
1967 | } | 1965 | } |
1968 | 1966 | ||
1969 | /** | 1967 | /** |
@@ -4976,9 +4974,8 @@ CheckAgain: | |||
4976 | framesize = 0; | 4974 | framesize = 0; |
4977 | #if SYNCLINK_GENERIC_HDLC | 4975 | #if SYNCLINK_GENERIC_HDLC |
4978 | { | 4976 | { |
4979 | struct net_device_stats *stats = hdlc_stats(info->netdev); | 4977 | info->netdev->stats.rx_errors++; |
4980 | stats->rx_errors++; | 4978 | info->netdev->stats.rx_frame_errors++; |
4981 | stats->rx_frame_errors++; | ||
4982 | } | 4979 | } |
4983 | #endif | 4980 | #endif |
4984 | } | 4981 | } |