aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm
diff options
context:
space:
mode:
Diffstat (limited to 'net/atm')
-rw-r--r--net/atm/atm_misc.c2
-rw-r--r--net/atm/br2684.c9
-rw-r--r--net/atm/clip.c24
-rw-r--r--net/atm/common.c2
-rw-r--r--net/atm/lec.c2
-rw-r--r--net/atm/mpc.c2
-rw-r--r--net/atm/pppoatm.c1
-rw-r--r--net/atm/proc.c2
8 files changed, 23 insertions, 21 deletions
diff --git a/net/atm/atm_misc.c b/net/atm/atm_misc.c
index fc63526d869..f41f02656ff 100644
--- a/net/atm/atm_misc.c
+++ b/net/atm/atm_misc.c
@@ -9,7 +9,7 @@
9#include <linux/sonet.h> 9#include <linux/sonet.h>
10#include <linux/bitops.h> 10#include <linux/bitops.h>
11#include <linux/errno.h> 11#include <linux/errno.h>
12#include <asm/atomic.h> 12#include <linux/atomic.h>
13 13
14int atm_charge(struct atm_vcc *vcc, int truesize) 14int atm_charge(struct atm_vcc *vcc, int truesize)
15{ 15{
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index 2252c2085da..d07223c834a 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -242,8 +242,6 @@ static int br2684_xmit_vcc(struct sk_buff *skb, struct net_device *dev,
242 if (brdev->payload == p_bridged) { 242 if (brdev->payload == p_bridged) {
243 skb_push(skb, 2); 243 skb_push(skb, 2);
244 memset(skb->data, 0, 2); 244 memset(skb->data, 0, 2);
245 } else { /* p_routed */
246 skb_pull(skb, ETH_HLEN);
247 } 245 }
248 } 246 }
249 skb_debug(skb); 247 skb_debug(skb);
@@ -560,12 +558,13 @@ static int br2684_regvcc(struct atm_vcc *atmvcc, void __user * arg)
560 spin_unlock_irqrestore(&rq->lock, flags); 558 spin_unlock_irqrestore(&rq->lock, flags);
561 559
562 skb_queue_walk_safe(&queue, skb, tmp) { 560 skb_queue_walk_safe(&queue, skb, tmp) {
563 struct net_device *dev = skb->dev; 561 struct net_device *dev;
562
563 br2684_push(atmvcc, skb);
564 dev = skb->dev;
564 565
565 dev->stats.rx_bytes -= skb->len; 566 dev->stats.rx_bytes -= skb->len;
566 dev->stats.rx_packets--; 567 dev->stats.rx_packets--;
567
568 br2684_push(atmvcc, skb);
569 } 568 }
570 569
571 /* initialize netdev carrier state */ 570 /* initialize netdev carrier state */
diff --git a/net/atm/clip.c b/net/atm/clip.c
index 1d4be60e139..852394072fa 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -37,7 +37,7 @@
37#include <linux/uaccess.h> 37#include <linux/uaccess.h>
38#include <asm/byteorder.h> /* for htons etc. */ 38#include <asm/byteorder.h> /* for htons etc. */
39#include <asm/system.h> /* save/restore_flags */ 39#include <asm/system.h> /* save/restore_flags */
40#include <asm/atomic.h> 40#include <linux/atomic.h>
41 41
42#include "common.h" 42#include "common.h"
43#include "resources.h" 43#include "resources.h"
@@ -271,10 +271,8 @@ static const struct neigh_ops clip_neigh_ops = {
271 .family = AF_INET, 271 .family = AF_INET,
272 .solicit = clip_neigh_solicit, 272 .solicit = clip_neigh_solicit,
273 .error_report = clip_neigh_error, 273 .error_report = clip_neigh_error,
274 .output = dev_queue_xmit, 274 .output = neigh_direct_output,
275 .connected_output = dev_queue_xmit, 275 .connected_output = neigh_direct_output,
276 .hh_output = dev_queue_xmit,
277 .queue_xmit = dev_queue_xmit,
278}; 276};
279 277
280static int clip_constructor(struct neighbour *neigh) 278static int clip_constructor(struct neighbour *neigh)
@@ -364,33 +362,37 @@ static netdev_tx_t clip_start_xmit(struct sk_buff *skb,
364 struct net_device *dev) 362 struct net_device *dev)
365{ 363{
366 struct clip_priv *clip_priv = PRIV(dev); 364 struct clip_priv *clip_priv = PRIV(dev);
365 struct dst_entry *dst = skb_dst(skb);
367 struct atmarp_entry *entry; 366 struct atmarp_entry *entry;
367 struct neighbour *n;
368 struct atm_vcc *vcc; 368 struct atm_vcc *vcc;
369 int old; 369 int old;
370 unsigned long flags; 370 unsigned long flags;
371 371
372 pr_debug("(skb %p)\n", skb); 372 pr_debug("(skb %p)\n", skb);
373 if (!skb_dst(skb)) { 373 if (!dst) {
374 pr_err("skb_dst(skb) == NULL\n"); 374 pr_err("skb_dst(skb) == NULL\n");
375 dev_kfree_skb(skb); 375 dev_kfree_skb(skb);
376 dev->stats.tx_dropped++; 376 dev->stats.tx_dropped++;
377 return NETDEV_TX_OK; 377 return NETDEV_TX_OK;
378 } 378 }
379 if (!skb_dst(skb)->neighbour) { 379 n = dst_get_neighbour(dst);
380 if (!n) {
380#if 0 381#if 0
381 skb_dst(skb)->neighbour = clip_find_neighbour(skb_dst(skb), 1); 382 n = clip_find_neighbour(skb_dst(skb), 1);
382 if (!skb_dst(skb)->neighbour) { 383 if (!n) {
383 dev_kfree_skb(skb); /* lost that one */ 384 dev_kfree_skb(skb); /* lost that one */
384 dev->stats.tx_dropped++; 385 dev->stats.tx_dropped++;
385 return 0; 386 return 0;
386 } 387 }
388 dst_set_neighbour(dst, n);
387#endif 389#endif
388 pr_err("NO NEIGHBOUR !\n"); 390 pr_err("NO NEIGHBOUR !\n");
389 dev_kfree_skb(skb); 391 dev_kfree_skb(skb);
390 dev->stats.tx_dropped++; 392 dev->stats.tx_dropped++;
391 return NETDEV_TX_OK; 393 return NETDEV_TX_OK;
392 } 394 }
393 entry = NEIGH2ENTRY(skb_dst(skb)->neighbour); 395 entry = NEIGH2ENTRY(n);
394 if (!entry->vccs) { 396 if (!entry->vccs) {
395 if (time_after(jiffies, entry->expires)) { 397 if (time_after(jiffies, entry->expires)) {
396 /* should be resolved */ 398 /* should be resolved */
@@ -407,7 +409,7 @@ static netdev_tx_t clip_start_xmit(struct sk_buff *skb,
407 } 409 }
408 pr_debug("neigh %p, vccs %p\n", entry, entry->vccs); 410 pr_debug("neigh %p, vccs %p\n", entry, entry->vccs);
409 ATM_SKB(skb)->vcc = vcc = entry->vccs->vcc; 411 ATM_SKB(skb)->vcc = vcc = entry->vccs->vcc;
410 pr_debug("using neighbour %p, vcc %p\n", skb_dst(skb)->neighbour, vcc); 412 pr_debug("using neighbour %p, vcc %p\n", n, vcc);
411 if (entry->vccs->encap) { 413 if (entry->vccs->encap) {
412 void *here; 414 void *here;
413 415
diff --git a/net/atm/common.c b/net/atm/common.c
index 22b963d06a1..14ff9fe3998 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -23,7 +23,7 @@
23#include <linux/uaccess.h> 23#include <linux/uaccess.h>
24#include <linux/poll.h> 24#include <linux/poll.h>
25 25
26#include <asm/atomic.h> 26#include <linux/atomic.h>
27 27
28#include "resources.h" /* atm_find_dev */ 28#include "resources.h" /* atm_find_dev */
29#include "common.h" /* prototypes */ 29#include "common.h" /* prototypes */
diff --git a/net/atm/lec.c b/net/atm/lec.c
index ba48daa68c1..215c9fad7cd 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -1335,7 +1335,7 @@ static void lane2_associate_ind(struct net_device *dev, const u8 *mac_addr,
1335#include <linux/types.h> 1335#include <linux/types.h>
1336#include <linux/timer.h> 1336#include <linux/timer.h>
1337#include <linux/param.h> 1337#include <linux/param.h>
1338#include <asm/atomic.h> 1338#include <linux/atomic.h>
1339#include <linux/inetdevice.h> 1339#include <linux/inetdevice.h>
1340#include <net/route.h> 1340#include <net/route.h>
1341 1341
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index 3ccca42e6f9..aa972409f09 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -1005,7 +1005,7 @@ static int mpoa_event_listener(struct notifier_block *mpoa_notifier,
1005 struct mpoa_client *mpc; 1005 struct mpoa_client *mpc;
1006 struct lec_priv *priv; 1006 struct lec_priv *priv;
1007 1007
1008 dev = (struct net_device *)dev_ptr; 1008 dev = dev_ptr;
1009 1009
1010 if (!net_eq(dev_net(dev), &init_net)) 1010 if (!net_eq(dev_net(dev), &init_net))
1011 return NOTIFY_DONE; 1011 return NOTIFY_DONE;
diff --git a/net/atm/pppoatm.c b/net/atm/pppoatm.c
index e9aced0ec56..db4a11c61d1 100644
--- a/net/atm/pppoatm.c
+++ b/net/atm/pppoatm.c
@@ -37,6 +37,7 @@
37 37
38#include <linux/module.h> 38#include <linux/module.h>
39#include <linux/init.h> 39#include <linux/init.h>
40#include <linux/interrupt.h>
40#include <linux/skbuff.h> 41#include <linux/skbuff.h>
41#include <linux/slab.h> 42#include <linux/slab.h>
42#include <linux/atm.h> 43#include <linux/atm.h>
diff --git a/net/atm/proc.c b/net/atm/proc.c
index be3afdefec5..0d020de8d23 100644
--- a/net/atm/proc.c
+++ b/net/atm/proc.c
@@ -27,7 +27,7 @@
27#include <net/atmclip.h> 27#include <net/atmclip.h>
28#include <linux/uaccess.h> 28#include <linux/uaccess.h>
29#include <linux/param.h> /* for HZ */ 29#include <linux/param.h> /* for HZ */
30#include <asm/atomic.h> 30#include <linux/atomic.h>
31#include "resources.h" 31#include "resources.h"
32#include "common.h" /* atm_proc_init prototype */ 32#include "common.h" /* atm_proc_init prototype */
33#include "signaling.h" /* to get sigd - ugly too */ 33#include "signaling.h" /* to get sigd - ugly too */