diff options
-rw-r--r-- | include/net/atmclip.h | 1 | ||||
-rw-r--r-- | net/atm/clip.c | 30 |
2 files changed, 12 insertions, 19 deletions
diff --git a/include/net/atmclip.h b/include/net/atmclip.h index b5a51a7bb364..467c531b8a7e 100644 --- a/include/net/atmclip.h +++ b/include/net/atmclip.h | |||
@@ -50,7 +50,6 @@ struct atmarp_entry { | |||
50 | struct clip_priv { | 50 | struct clip_priv { |
51 | int number; /* for convenience ... */ | 51 | int number; /* for convenience ... */ |
52 | spinlock_t xoff_lock; /* ensures that pop is atomic (SMP) */ | 52 | spinlock_t xoff_lock; /* ensures that pop is atomic (SMP) */ |
53 | struct net_device_stats stats; | ||
54 | struct net_device *next; /* next CLIP interface */ | 53 | struct net_device *next; /* next CLIP interface */ |
55 | }; | 54 | }; |
56 | 55 | ||
diff --git a/net/atm/clip.c b/net/atm/clip.c index 2d33a83be799..da42fd06b61f 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c | |||
@@ -214,15 +214,15 @@ static void clip_push(struct atm_vcc *vcc, struct sk_buff *skb) | |||
214 | skb->protocol = ((__be16 *) skb->data)[3]; | 214 | skb->protocol = ((__be16 *) skb->data)[3]; |
215 | skb_pull(skb, RFC1483LLC_LEN); | 215 | skb_pull(skb, RFC1483LLC_LEN); |
216 | if (skb->protocol == htons(ETH_P_ARP)) { | 216 | if (skb->protocol == htons(ETH_P_ARP)) { |
217 | PRIV(skb->dev)->stats.rx_packets++; | 217 | skb->dev->stats.rx_packets++; |
218 | PRIV(skb->dev)->stats.rx_bytes += skb->len; | 218 | skb->dev->stats.rx_bytes += skb->len; |
219 | clip_arp_rcv(skb); | 219 | clip_arp_rcv(skb); |
220 | return; | 220 | return; |
221 | } | 221 | } |
222 | } | 222 | } |
223 | clip_vcc->last_use = jiffies; | 223 | clip_vcc->last_use = jiffies; |
224 | PRIV(skb->dev)->stats.rx_packets++; | 224 | skb->dev->stats.rx_packets++; |
225 | PRIV(skb->dev)->stats.rx_bytes += skb->len; | 225 | skb->dev->stats.rx_bytes += skb->len; |
226 | memset(ATM_SKB(skb), 0, sizeof(struct atm_skb_data)); | 226 | memset(ATM_SKB(skb), 0, sizeof(struct atm_skb_data)); |
227 | netif_rx(skb); | 227 | netif_rx(skb); |
228 | } | 228 | } |
@@ -372,7 +372,7 @@ static int clip_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
372 | if (!skb->dst) { | 372 | if (!skb->dst) { |
373 | printk(KERN_ERR "clip_start_xmit: skb->dst == NULL\n"); | 373 | printk(KERN_ERR "clip_start_xmit: skb->dst == NULL\n"); |
374 | dev_kfree_skb(skb); | 374 | dev_kfree_skb(skb); |
375 | clip_priv->stats.tx_dropped++; | 375 | dev->stats.tx_dropped++; |
376 | return 0; | 376 | return 0; |
377 | } | 377 | } |
378 | if (!skb->dst->neighbour) { | 378 | if (!skb->dst->neighbour) { |
@@ -380,13 +380,13 @@ static int clip_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
380 | skb->dst->neighbour = clip_find_neighbour(skb->dst, 1); | 380 | skb->dst->neighbour = clip_find_neighbour(skb->dst, 1); |
381 | if (!skb->dst->neighbour) { | 381 | if (!skb->dst->neighbour) { |
382 | dev_kfree_skb(skb); /* lost that one */ | 382 | dev_kfree_skb(skb); /* lost that one */ |
383 | clip_priv->stats.tx_dropped++; | 383 | dev->stats.tx_dropped++; |
384 | return 0; | 384 | return 0; |
385 | } | 385 | } |
386 | #endif | 386 | #endif |
387 | printk(KERN_ERR "clip_start_xmit: NO NEIGHBOUR !\n"); | 387 | printk(KERN_ERR "clip_start_xmit: NO NEIGHBOUR !\n"); |
388 | dev_kfree_skb(skb); | 388 | dev_kfree_skb(skb); |
389 | clip_priv->stats.tx_dropped++; | 389 | dev->stats.tx_dropped++; |
390 | return 0; | 390 | return 0; |
391 | } | 391 | } |
392 | entry = NEIGH2ENTRY(skb->dst->neighbour); | 392 | entry = NEIGH2ENTRY(skb->dst->neighbour); |
@@ -400,7 +400,7 @@ static int clip_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
400 | skb_queue_tail(&entry->neigh->arp_queue, skb); | 400 | skb_queue_tail(&entry->neigh->arp_queue, skb); |
401 | else { | 401 | else { |
402 | dev_kfree_skb(skb); | 402 | dev_kfree_skb(skb); |
403 | clip_priv->stats.tx_dropped++; | 403 | dev->stats.tx_dropped++; |
404 | } | 404 | } |
405 | return 0; | 405 | return 0; |
406 | } | 406 | } |
@@ -423,8 +423,8 @@ static int clip_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
423 | printk(KERN_WARNING "clip_start_xmit: XOFF->XOFF transition\n"); | 423 | printk(KERN_WARNING "clip_start_xmit: XOFF->XOFF transition\n"); |
424 | return 0; | 424 | return 0; |
425 | } | 425 | } |
426 | clip_priv->stats.tx_packets++; | 426 | dev->stats.tx_packets++; |
427 | clip_priv->stats.tx_bytes += skb->len; | 427 | dev->stats.tx_bytes += skb->len; |
428 | vcc->send(vcc, skb); | 428 | vcc->send(vcc, skb); |
429 | if (atm_may_send(vcc, 0)) { | 429 | if (atm_may_send(vcc, 0)) { |
430 | entry->vccs->xoff = 0; | 430 | entry->vccs->xoff = 0; |
@@ -443,11 +443,6 @@ static int clip_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
443 | return 0; | 443 | return 0; |
444 | } | 444 | } |
445 | 445 | ||
446 | static struct net_device_stats *clip_get_stats(struct net_device *dev) | ||
447 | { | ||
448 | return &PRIV(dev)->stats; | ||
449 | } | ||
450 | |||
451 | static int clip_mkip(struct atm_vcc *vcc, int timeout) | 446 | static int clip_mkip(struct atm_vcc *vcc, int timeout) |
452 | { | 447 | { |
453 | struct clip_vcc *clip_vcc; | 448 | struct clip_vcc *clip_vcc; |
@@ -501,8 +496,8 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout) | |||
501 | 496 | ||
502 | skb_get(skb); | 497 | skb_get(skb); |
503 | clip_push(vcc, skb); | 498 | clip_push(vcc, skb); |
504 | PRIV(skb->dev)->stats.rx_packets--; | 499 | skb->dev->stats.rx_packets--; |
505 | PRIV(skb->dev)->stats.rx_bytes -= len; | 500 | skb->dev->stats.rx_bytes -= len; |
506 | kfree_skb(skb); | 501 | kfree_skb(skb); |
507 | } | 502 | } |
508 | 503 | ||
@@ -561,7 +556,6 @@ static void clip_setup(struct net_device *dev) | |||
561 | { | 556 | { |
562 | dev->hard_start_xmit = clip_start_xmit; | 557 | dev->hard_start_xmit = clip_start_xmit; |
563 | /* sg_xmit ... */ | 558 | /* sg_xmit ... */ |
564 | dev->get_stats = clip_get_stats; | ||
565 | dev->type = ARPHRD_ATM; | 559 | dev->type = ARPHRD_ATM; |
566 | dev->hard_header_len = RFC1483LLC_LEN; | 560 | dev->hard_header_len = RFC1483LLC_LEN; |
567 | dev->mtu = RFC1626_MTU; | 561 | dev->mtu = RFC1626_MTU; |