aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/pcmcia
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/pcmcia
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/pcmcia')
-rw-r--r--drivers/char/pcmcia/synclink_cs.c28
1 files changed, 12 insertions, 16 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,
4144static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) 4143static 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)
4376static void hdlcdev_tx_timeout(struct net_device *dev) 4374static 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/**