patch-1.3.6 linux/drivers/net/znet.c
Next file: linux/drivers/scsi/eata_dma.c
Previous file: linux/drivers/net/wavelan.c
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Thu Jun 29 19:18:51 1995
- Orig file:
v1.3.5/linux/drivers/net/znet.c
- Orig date:
Tue Jun 6 11:22:11 1995
diff -u --recursive --new-file v1.3.5/linux/drivers/net/znet.c linux/drivers/net/znet.c
@@ -548,23 +548,22 @@
/* Malloc up new buffer. */
struct sk_buff *skb;
- skb = alloc_skb(pkt_len, GFP_ATOMIC);
+ skb = dev_alloc_skb(pkt_len);
if (skb == NULL) {
if (znet_debug)
printk(KERN_WARNING "%s: Memory squeeze, dropping packet.\n", dev->name);
lp->stats.rx_dropped++;
break;
}
- skb->len = pkt_len;
skb->dev = dev;
if (&zn.rx_cur[(pkt_len+1)>>1] > zn.rx_end) {
int semi_cnt = (zn.rx_end - zn.rx_cur)<<1;
- memcpy((unsigned char *) (skb + 1), zn.rx_cur, semi_cnt);
- memcpy((unsigned char *) (skb + 1) + semi_cnt, zn.rx_start,
+ memcpy(skb_put(skb,semi_cnt), zn.rx_cur, semi_cnt);
+ memcpy(skb_put(skb,pkt_len-semi_cnt), zn.rx_start,
pkt_len - semi_cnt);
} else {
- memcpy((unsigned char *) (skb + 1), zn.rx_cur, pkt_len);
+ memcpy(skb_put(skb,pkt_len), zn.rx_cur, pkt_len);
if (znet_debug > 6) {
unsigned int *packet = (unsigned int *) (skb + 1);
printk(KERN_DEBUG "Packet data is %08x %08x %08x %08x.\n", packet[0],
Binary files v1.3.5/linux/drivers/scsi/aic7770 and linux/drivers/scsi/aic7770 differ
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