patch-1.3.6 linux/drivers/net/atp.c
Next file: linux/drivers/net/de4x5.c
Previous file: linux/drivers/net/at1700.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
Thu Jun 29 19:18:50 1995
- Orig file:
v1.3.5/linux/drivers/net/atp.c
- Orig date:
Tue Jun 6 11:22:08 1995
diff -u --recursive --new-file v1.3.5/linux/drivers/net/atp.c linux/drivers/net/atp.c
@@ -670,16 +670,15 @@
int pkt_len = (rx_head.rx_count & 0x7ff) - 4; /* The "-4" is omits the FCS (CRC). */
struct sk_buff *skb;
- skb = alloc_skb(pkt_len, GFP_ATOMIC);
+ skb = dev_alloc_skb(pkt_len);
if (skb == NULL) {
printk("%s: Memory squeeze, dropping packet.\n", dev->name);
lp->stats.rx_dropped++;
goto done;
}
- skb->len = pkt_len;
skb->dev = dev;
- read_block(ioaddr, pkt_len, skb->data, dev->if_port);
+ read_block(ioaddr, pkt_len, skb_put(skb,pkt_len), dev->if_port);
if (net_debug > 6) {
unsigned char *data = skb->data;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this