patch-2.4.22 linux-2.4.22/net/atm/mpc.c
Next file: linux-2.4.22/net/atm/pppoatm.c
Previous file: linux-2.4.22/net/atm/lec.h
Back to the patch index
Back to the overall index
- Lines: 53
- Date:
2003-08-25 04:44:44.000000000 -0700
- Orig file:
linux-2.4.21/net/atm/mpc.c
- Orig date:
2003-06-13 07:51:39.000000000 -0700
diff -urN linux-2.4.21/net/atm/mpc.c linux-2.4.22/net/atm/mpc.c
@@ -521,7 +521,6 @@
}
atomic_add(skb->truesize, &entry->shortcut->sk->wmem_alloc);
- ATM_SKB(skb)->iovcnt = 0; /* just to be safe ... */
ATM_SKB(skb)->atm_options = entry->shortcut->atm_options;
entry->shortcut->send(entry->shortcut, skb);
entry->packets_fwded++;
@@ -730,28 +729,22 @@
eg->packets_rcvd++;
mpc->eg_ops->put(eg);
+ memset(ATM_SKB(new_skb), 0, sizeof(struct atm_skb_data));
netif_rx(new_skb);
return;
}
static struct atmdev_ops mpc_ops = { /* only send is required */
- close: mpoad_close,
- send: msg_from_mpoad
+ .close = mpoad_close,
+ .send = msg_from_mpoad
};
static struct atm_dev mpc_dev = {
- &mpc_ops, /* device operations */
- NULL, /* PHY operations */
- "mpc", /* device type name */
- 42, /* device index (dummy) */
- NULL, /* VCC table */
- NULL, /* last VCC */
- NULL, /* per-device data */
- NULL, /* private PHY data */
- { 0 }, /* device flags */
- NULL, /* local ATM address */
- { 0 } /* no ESI */
+ .ops = &mpc_ops,
+ .type = "mpc",
+ .number = 42,
+ .lock = SPIN_LOCK_UNLOCKED
/* rest of the members will be 0 */
};
@@ -869,7 +862,7 @@
struct mpoa_client *mpc = find_mpc_by_vcc(vcc);
struct k_message *mesg = (struct k_message*)skb->data;
- atomic_sub(skb->truesize+ATM_PDU_OVHD, &vcc->sk->wmem_alloc);
+ atomic_sub(skb->truesize, &vcc->sk->wmem_alloc);
if (mpc == NULL) {
printk("mpoa: msg_from_mpoad: no mpc found\n");
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)