aboutsummaryrefslogtreecommitdiff
path: root/net/atm/clip.c
diff options
context:
space:
mode:
authorJorge Boncompte [DTI2] <jorge@dti2.net>2011-11-21 10:25:57 +0000
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 e2de7c548b3..11439a7f678 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,
static int clip_mkip(struct atm_vcc *vcc, int timeout)
{
- struct sk_buff_head *rq, queue;
struct clip_vcc *clip_vcc;
- struct sk_buff *skb, *tmp;
- unsigned long flags;
if (!vcc->push)
return -EBADFD;
@@ -479,16 +476,8 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout)
vcc->push = clip_push;
vcc->pop = clip_pop;
- __skb_queue_head_init(&queue);
- rq = &sk_atm(vcc)->sk_receive_queue;
-
- spin_lock_irqsave(&rq->lock, flags);
- skb_queue_splice_init(rq, &queue);
- spin_unlock_irqrestore(&rq->lock, flags);
-
/* re-process everything received between connection setup and MKIP */
- skb_queue_walk_safe(&queue, skb, tmp)
- clip_push(vcc, skb);
+ vcc_process_recv_queue(vcc);
return 0;
}