Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41976
b: refs/heads/master
c: c40a27f
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Dec 3, 2006
1 parent 9e63d22 commit 119b17c
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 99 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e9b3d5339d2afd6348e8211f0db695b00261e17
refs/heads/master: c40a27f48ceee648e9cfdda040b69e7010d9f82c
3 changes: 0 additions & 3 deletions trunk/net/atm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ mpoa-objs := mpc.o mpoa_caches.o mpoa_proc.o

obj-$(CONFIG_ATM) += atm.o
obj-$(CONFIG_ATM_CLIP) += clip.o
atm-$(subst m,y,$(CONFIG_ATM_CLIP)) += ipcommon.o
obj-$(CONFIG_ATM_BR2684) += br2684.o
atm-$(subst m,y,$(CONFIG_ATM_BR2684)) += ipcommon.o
atm-$(subst m,y,$(CONFIG_NET_SCH_ATM)) += ipcommon.o
atm-$(CONFIG_PROC_FS) += proc.o

obj-$(CONFIG_ATM_LANE) += lec.o
Expand Down
28 changes: 23 additions & 5 deletions trunk/net/atm/br2684.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Author: Marcell GAL, 2000, XDSL Ltd, Hungary
#include <linux/atmbr2684.h>

#include "common.h"
#include "ipcommon.h"

/*
* Define this to use a version of the code which interacts with the higher
Expand Down Expand Up @@ -500,11 +499,12 @@ Note: we do not have explicit unassign, but look at _push()
*/
int err;
struct br2684_vcc *brvcc;
struct sk_buff_head copy;
struct sk_buff *skb;
struct sk_buff_head *rq;
struct br2684_dev *brdev;
struct net_device *net_dev;
struct atm_backend_br2684 be;
unsigned long flags;

if (copy_from_user(&be, arg, sizeof be))
return -EFAULT;
Expand Down Expand Up @@ -554,12 +554,30 @@ Note: we do not have explicit unassign, but look at _push()
brvcc->old_push = atmvcc->push;
barrier();
atmvcc->push = br2684_push;
skb_queue_head_init(&copy);
skb_migrate(&sk_atm(atmvcc)->sk_receive_queue, &copy);
while ((skb = skb_dequeue(&copy)) != NULL) {

rq = &sk_atm(atmvcc)->sk_receive_queue;

spin_lock_irqsave(&rq->lock, flags);
if (skb_queue_empty(rq)) {
skb = NULL;
} else {
/* NULL terminate the list. */
rq->prev->next = NULL;
skb = rq->next;
}
rq->prev = rq->next = (struct sk_buff *)rq;
rq->qlen = 0;
spin_unlock_irqrestore(&rq->lock, flags);

while (skb) {
struct sk_buff *next = skb->next;

skb->next = skb->prev = NULL;
BRPRIV(skb->dev)->stats.rx_bytes -= skb->len;
BRPRIV(skb->dev)->stats.rx_packets--;
br2684_push(atmvcc, skb);

skb = next;
}
__module_get(THIS_MODULE);
return 0;
Expand Down
29 changes: 24 additions & 5 deletions trunk/net/atm/clip.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

#include "common.h"
#include "resources.h"
#include "ipcommon.h"
#include <net/atmclip.h>


Expand Down Expand Up @@ -469,8 +468,9 @@ static struct net_device_stats *clip_get_stats(struct net_device *dev)
static int clip_mkip(struct atm_vcc *vcc, int timeout)
{
struct clip_vcc *clip_vcc;
struct sk_buff_head copy;
struct sk_buff *skb;
struct sk_buff_head *rq;
unsigned long flags;

if (!vcc->push)
return -EBADFD;
Expand All @@ -490,10 +490,26 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout)
clip_vcc->old_pop = vcc->pop;
vcc->push = clip_push;
vcc->pop = clip_pop;
skb_queue_head_init(&copy);
skb_migrate(&sk_atm(vcc)->sk_receive_queue, &copy);

rq = &sk_atm(vcc)->sk_receive_queue;

spin_lock_irqsave(&rq->lock, flags);
if (skb_queue_empty(rq)) {
skb = NULL;
} else {
/* NULL terminate the list. */
rq->prev->next = NULL;
skb = rq->next;
}
rq->prev = rq->next = (struct sk_buff *)rq;
rq->qlen = 0;
spin_unlock_irqrestore(&rq->lock, flags);

/* re-process everything received between connection setup and MKIP */
while ((skb = skb_dequeue(&copy)) != NULL)
while (skb) {
struct sk_buff *next = skb->next;

skb->next = skb->prev = NULL;
if (!clip_devs) {
atm_return(vcc, skb->truesize);
kfree_skb(skb);
Expand All @@ -506,6 +522,9 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout)
PRIV(skb->dev)->stats.rx_bytes -= len;
kfree_skb(skb);
}

skb = next;
}
return 0;
}

Expand Down
63 changes: 0 additions & 63 deletions trunk/net/atm/ipcommon.c

This file was deleted.

22 changes: 0 additions & 22 deletions trunk/net/atm/ipcommon.h

This file was deleted.

0 comments on commit 119b17c

Please sign in to comment.