aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/synclink.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-20 20:43:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-20 20:43:29 -0400
commitdb6d8c7a4027b48d797b369a53f8470aaeed7063 (patch)
treee140c104a89abc2154e1f41a7db8ebecbb6fa0b4 /drivers/char/synclink.c
parent3a533374283aea50eab3976d8a6d30532175f009 (diff)
parentfb65a7c091529bfffb1262515252c0d0f6241c5c (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/synclink.c')
-rw-r--r--drivers/char/synclink.c33
1 files changed, 15 insertions, 18 deletions
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,
7744static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) 7743static 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)
7975static void hdlcdev_tx_timeout(struct net_device *dev) 7973static 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/**