diff options
Diffstat (limited to 'net/atm/clip.c')
-rw-r--r-- | net/atm/clip.c | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c index 852394072fa1..11439a7f6782 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c | |||
@@ -189,6 +189,13 @@ static void clip_push(struct atm_vcc *vcc, struct sk_buff *skb) | |||
189 | struct clip_vcc *clip_vcc = CLIP_VCC(vcc); | 189 | struct clip_vcc *clip_vcc = CLIP_VCC(vcc); |
190 | 190 | ||
191 | pr_debug("\n"); | 191 | pr_debug("\n"); |
192 | |||
193 | if (!clip_devs) { | ||
194 | atm_return(vcc, skb->truesize); | ||
195 | kfree_skb(skb); | ||
196 | return; | ||
197 | } | ||
198 | |||
192 | if (!skb) { | 199 | if (!skb) { |
193 | pr_debug("removing VCC %p\n", clip_vcc); | 200 | pr_debug("removing VCC %p\n", clip_vcc); |
194 | if (clip_vcc->entry) | 201 | if (clip_vcc->entry) |
@@ -329,7 +336,7 @@ static struct neigh_table clip_tbl = { | |||
329 | .gc_staletime = 60 * HZ, | 336 | .gc_staletime = 60 * HZ, |
330 | .reachable_time = 30 * HZ, | 337 | .reachable_time = 30 * HZ, |
331 | .delay_probe_time = 5 * HZ, | 338 | .delay_probe_time = 5 * HZ, |
332 | .queue_len = 3, | 339 | .queue_len_bytes = 64 * 1024, |
333 | .ucast_probes = 3, | 340 | .ucast_probes = 3, |
334 | .mcast_probes = 3, | 341 | .mcast_probes = 3, |
335 | .anycast_delay = 1 * HZ, | 342 | .anycast_delay = 1 * HZ, |
@@ -448,10 +455,7 @@ static netdev_tx_t clip_start_xmit(struct sk_buff *skb, | |||
448 | 455 | ||
449 | static int clip_mkip(struct atm_vcc *vcc, int timeout) | 456 | static int clip_mkip(struct atm_vcc *vcc, int timeout) |
450 | { | 457 | { |
451 | struct sk_buff_head *rq, queue; | ||
452 | struct clip_vcc *clip_vcc; | 458 | struct clip_vcc *clip_vcc; |
453 | struct sk_buff *skb, *tmp; | ||
454 | unsigned long flags; | ||
455 | 459 | ||
456 | if (!vcc->push) | 460 | if (!vcc->push) |
457 | return -EBADFD; | 461 | return -EBADFD; |
@@ -472,29 +476,9 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout) | |||
472 | vcc->push = clip_push; | 476 | vcc->push = clip_push; |
473 | vcc->pop = clip_pop; | 477 | vcc->pop = clip_pop; |
474 | 478 | ||
475 | __skb_queue_head_init(&queue); | ||
476 | rq = &sk_atm(vcc)->sk_receive_queue; | ||
477 | |||
478 | spin_lock_irqsave(&rq->lock, flags); | ||
479 | skb_queue_splice_init(rq, &queue); | ||
480 | spin_unlock_irqrestore(&rq->lock, flags); | ||
481 | |||
482 | /* re-process everything received between connection setup and MKIP */ | 479 | /* re-process everything received between connection setup and MKIP */ |
483 | skb_queue_walk_safe(&queue, skb, tmp) { | 480 | vcc_process_recv_queue(vcc); |
484 | if (!clip_devs) { | 481 | |
485 | atm_return(vcc, skb->truesize); | ||
486 | kfree_skb(skb); | ||
487 | } else { | ||
488 | struct net_device *dev = skb->dev; | ||
489 | unsigned int len = skb->len; | ||
490 | |||
491 | skb_get(skb); | ||
492 | clip_push(vcc, skb); | ||
493 | dev->stats.rx_packets--; | ||
494 | dev->stats.rx_bytes -= len; | ||
495 | kfree_skb(skb); | ||
496 | } | ||
497 | } | ||
498 | return 0; | 482 | return 0; |
499 | } | 483 | } |
500 | 484 | ||