aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm/clip.c
diff options
context:
space:
mode:
authorJorge Boncompte [DTI2] <jorge@dti2.net>2011-11-21 05:25:57 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-22 16:15:42 -0500
commit4e55f5785825f18b1eb6c5cc5a9717e276925805 (patch)
tree31a7c44400e598e82e1de0a7326952d00b28767d /net/atm/clip.c
parent3b829366cc6d0adeb4df2c2d917926f6b41c573d (diff)
atm: Introduce vcc_process_recv_queue
This function moves the implementation found in the clip and br2684 modules to common code, correctly unlinks the skb from the queue before pushing it and makes pppoatm use it. Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/clip.c')
-rw-r--r--net/atm/clip.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c
index e2de7c548b3a..11439a7f6782 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -455,10 +455,7 @@ static netdev_tx_t clip_start_xmit(struct sk_buff *skb,
455 455
456static int clip_mkip(struct atm_vcc *vcc, int timeout) 456static int clip_mkip(struct atm_vcc *vcc, int timeout)
457{ 457{
458 struct sk_buff_head *rq, queue;
459 struct clip_vcc *clip_vcc; 458 struct clip_vcc *clip_vcc;
460 struct sk_buff *skb, *tmp;
461 unsigned long flags;
462 459
463 if (!vcc->push) 460 if (!vcc->push)
464 return -EBADFD; 461 return -EBADFD;
@@ -479,16 +476,8 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout)
479 vcc->push = clip_push; 476 vcc->push = clip_push;
480 vcc->pop = clip_pop; 477 vcc->pop = clip_pop;
481 478
482 __skb_queue_head_init(&queue);
483 rq = &sk_atm(vcc)->sk_receive_queue;
484
485 spin_lock_irqsave(&rq->lock, flags);
486 skb_queue_splice_init(rq, &queue);
487 spin_unlock_irqrestore(&rq->lock, flags);
488
489 /* re-process everything received between connection setup and MKIP */ 479 /* re-process everything received between connection setup and MKIP */
490 skb_queue_walk_safe(&queue, skb, tmp) 480 vcc_process_recv_queue(vcc);
491 clip_push(vcc, skb);
492 481
493 return 0; 482 return 0;
494} 483}