patch-2.3.99-pre6 linux/drivers/net/plip.c
Next file: linux/drivers/net/ppp_async.c
Previous file: linux/drivers/net/pcmcia/xircom_tulip_cb.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Wed Apr 12 09:38:57 2000
- Orig file:
v2.3.99-pre5/linux/drivers/net/plip.c
- Orig date:
Mon Mar 27 08:08:26 2000
diff -u --recursive --new-file v2.3.99-pre5/linux/drivers/net/plip.c linux/drivers/net/plip.c
@@ -687,11 +687,12 @@
return ERROR;
}
/* Malloc up new buffer. */
- rcv->skb = dev_alloc_skb(rcv->length.h);
+ rcv->skb = dev_alloc_skb(rcv->length.h + 2);
if (rcv->skb == NULL) {
printk(KERN_ERR "%s: Memory squeeze.\n", dev->name);
return ERROR;
}
+ skb_reserve(rcv->skb, 2); /* Align IP on 16 byte boundaries */
skb_put(rcv->skb,rcv->length.h);
rcv->skb->dev = dev;
rcv->state = PLIP_PK_DATA;
@@ -989,7 +990,7 @@
switch (nl->connection) {
case PLIP_CN_CLOSING:
- netif_start_queue (dev);
+ netif_wake_queue (dev);
case PLIP_CN_NONE:
case PLIP_CN_SEND:
dev->last_rx = jiffies;
@@ -1035,7 +1036,7 @@
if (skb->len > dev->mtu + dev->hard_header_len) {
printk(KERN_WARNING "%s: packet too big, %d.\n", dev->name, (int)skb->len);
netif_start_queue (dev);
- return 0;
+ return 1;
}
if (net_debug > 2)
@@ -1054,7 +1055,6 @@
mark_bh(IMMEDIATE_BH);
spin_unlock_irq(&nl->lock);
- netif_start_queue (dev);
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)