forked from luck/tmp_suning_uos_patched
[ETH]: Make eth_type_trans set skb->dev like the other *_type_trans
One less thing for drivers writers to worry about. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
029720f15d
commit
4c13eb6657
|
@ -427,7 +427,6 @@ make_new_skb(struct net_device *dev)
|
|||
printk(KERN_NOTICE "%s: memory squeeze. dropping packet.\n", dev->name);
|
||||
return NULL;
|
||||
}
|
||||
nskb->dev = dev;
|
||||
|
||||
skb_reserve(nskb, 2); /* Align IP on 16 byte boundaries */
|
||||
|
||||
|
|
|
@ -267,7 +267,6 @@ xpnet_receive(partid_t partid, int channel, struct xpnet_message *msg)
|
|||
(void *) skb->data, (void *) skb->tail, (void *) skb->end,
|
||||
skb->len);
|
||||
|
||||
skb->dev = xpnet_device;
|
||||
skb->protocol = eth_type_trans(skb, xpnet_device);
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
|
||||
|
|
|
@ -477,7 +477,6 @@ for (;;) {
|
|||
cep->stats.rx_dropped++;
|
||||
}
|
||||
else {
|
||||
skb->dev = dev;
|
||||
skb_put(skb,pkt_len-4); /* Make room */
|
||||
eth_copy_and_sum(skb,
|
||||
(unsigned char *)__va(bdp->cbd_bufaddr),
|
||||
|
|
|
@ -734,7 +734,6 @@ for (;;) {
|
|||
cep->stats.rx_dropped++;
|
||||
}
|
||||
else {
|
||||
skb->dev = dev;
|
||||
skb_put(skb,pkt_len); /* Make room */
|
||||
eth_copy_and_sum(skb,
|
||||
(unsigned char *)__va(bdp->cbd_bufaddr),
|
||||
|
|
|
@ -506,7 +506,6 @@ for (;;) {
|
|||
cep->stats.rx_dropped++;
|
||||
}
|
||||
else {
|
||||
skb->dev = dev;
|
||||
skb_put(skb,pkt_len-4); /* Make room */
|
||||
eth_copy_and_sum(skb,
|
||||
cep->rx_vaddr[bdp - cep->rx_bd_base],
|
||||
|
|
|
@ -724,7 +724,6 @@ while (!(bdp->cbd_sc & BD_ENET_RX_EMPTY)) {
|
|||
printk("%s: Memory squeeze, dropping packet.\n", dev->name);
|
||||
fep->stats.rx_dropped++;
|
||||
} else {
|
||||
skb->dev = dev;
|
||||
skb_put(skb,pkt_len-4); /* Make room */
|
||||
eth_copy_and_sum(skb, data, pkt_len-4, 0);
|
||||
skb->protocol=eth_type_trans(skb,dev);
|
||||
|
|
|
@ -523,7 +523,6 @@ static void c2_rx_interrupt(struct net_device *netdev)
|
|||
skb->data += sizeof(*rxp_hdr);
|
||||
skb->tail = skb->data + buflen;
|
||||
skb->len = buflen;
|
||||
skb->dev = netdev;
|
||||
skb->protocol = eth_type_trans(skb, netdev);
|
||||
|
||||
netif_rx(skb);
|
||||
|
|
|
@ -214,8 +214,6 @@ hysdn_rx_netpkt(hysdn_card * card, unsigned char *buf, unsigned short len)
|
|||
lp->stats.rx_dropped++;
|
||||
return;
|
||||
}
|
||||
skb->dev = &lp->netdev;
|
||||
|
||||
/* copy the data */
|
||||
memcpy(skb_put(skb, len), buf, len);
|
||||
|
||||
|
|
|
@ -735,7 +735,6 @@ static void el_receive(struct net_device *dev)
|
|||
else
|
||||
{
|
||||
skb_reserve(skb,2); /* Force 16 byte alignment */
|
||||
skb->dev = dev;
|
||||
/*
|
||||
* The read increments through the bytes. The interrupt
|
||||
* handler will fix the pointer when it returns to
|
||||
|
|
|
@ -615,7 +615,6 @@ static void receive_packet(struct net_device *dev, int len)
|
|||
if (test_and_set_bit(0, (void *) &adapter->dmaing))
|
||||
printk(KERN_ERR "%s: rx blocked, DMA in progress, dir %d\n", dev->name, adapter->current_dma.direction);
|
||||
|
||||
skb->dev = dev;
|
||||
adapter->current_dma.direction = 0;
|
||||
adapter->current_dma.length = rlen;
|
||||
adapter->current_dma.skb = skb;
|
||||
|
|
|
@ -873,7 +873,6 @@ static void el16_rx(struct net_device *dev)
|
|||
}
|
||||
|
||||
skb_reserve(skb,2);
|
||||
skb->dev = dev;
|
||||
|
||||
/* 'skb->data' points to the start of sk_buff data area. */
|
||||
memcpy_fromio(skb_put(skb,pkt_len), data_frame + 10, pkt_len);
|
||||
|
|
|
@ -1091,7 +1091,6 @@ el3_rx(struct net_device *dev)
|
|||
printk("Receiving packet size %d status %4.4x.\n",
|
||||
pkt_len, rx_status);
|
||||
if (skb != NULL) {
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2); /* Align IP on 16 byte */
|
||||
|
||||
/* 'skb->data' points to the start of sk_buff data area. */
|
||||
|
|
|
@ -1292,7 +1292,6 @@ static int corkscrew_rx(struct net_device *dev)
|
|||
printk("Receiving packet size %d status %4.4x.\n",
|
||||
pkt_len, rx_status);
|
||||
if (skb != NULL) {
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
|
||||
/* 'skb_put()' points to the start of sk_buff data area. */
|
||||
insl(ioaddr + RX_FIFO,
|
||||
|
@ -1363,7 +1362,6 @@ static int boomerang_rx(struct net_device *dev)
|
|||
copying to a properly sized skbuff. */
|
||||
if (pkt_len < rx_copybreak
|
||||
&& (skb = dev_alloc_skb(pkt_len + 4)) != 0) {
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
|
||||
/* 'skb_put()' points to the start of sk_buff data area. */
|
||||
memcpy(skb_put(skb, pkt_len),
|
||||
|
|
|
@ -988,7 +988,6 @@ static void elmc_rcv_int(struct net_device *dev)
|
|||
rbd->status = 0;
|
||||
skb = (struct sk_buff *) dev_alloc_skb(totlen + 2);
|
||||
if (skb != NULL) {
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2); /* 16 byte alignment */
|
||||
skb_put(skb,totlen);
|
||||
eth_copy_and_sum(skb, (char *) p->base+(unsigned long) rbd->buffer,totlen,0);
|
||||
|
|
|
@ -1189,7 +1189,6 @@ static void mc32_rx_ring(struct net_device *dev)
|
|||
}
|
||||
|
||||
skb->protocol=eth_type_trans(skb,dev);
|
||||
skb->dev=dev;
|
||||
dev->last_rx = jiffies;
|
||||
lp->net_stats.rx_packets++;
|
||||
lp->net_stats.rx_bytes += length;
|
||||
|
|
|
@ -2414,7 +2414,6 @@ static int vortex_rx(struct net_device *dev)
|
|||
printk(KERN_DEBUG "Receiving packet size %d status %4.4x.\n",
|
||||
pkt_len, rx_status);
|
||||
if (skb != NULL) {
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
|
||||
/* 'skb_put()' points to the start of sk_buff data area. */
|
||||
if (vp->bus_master &&
|
||||
|
@ -2491,7 +2490,6 @@ boomerang_rx(struct net_device *dev)
|
|||
/* Check if the packet is long enough to just accept without
|
||||
copying to a properly sized skbuff. */
|
||||
if (pkt_len < rx_copybreak && (skb = dev_alloc_skb(pkt_len + 2)) != 0) {
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
|
||||
pci_dma_sync_single_for_cpu(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE);
|
||||
/* 'skb_put()' points to the start of sk_buff data area. */
|
||||
|
|
|
@ -331,7 +331,6 @@ static int lance_rx (struct net_device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
skb->dev = dev;
|
||||
skb_reserve (skb, 2); /* 16 byte align */
|
||||
skb_put (skb, len); /* make room */
|
||||
eth_copy_and_sum(skb,
|
||||
|
|
|
@ -573,7 +573,6 @@ static int cp_rx_poll (struct net_device *dev, int *budget)
|
|||
}
|
||||
|
||||
skb_reserve(new_skb, RX_OFFSET);
|
||||
new_skb->dev = dev;
|
||||
|
||||
pci_unmap_single(cp->pdev, mapping,
|
||||
buflen, PCI_DMA_FROMDEVICE);
|
||||
|
@ -1082,7 +1081,6 @@ static int cp_refill_rx (struct cp_private *cp)
|
|||
if (!skb)
|
||||
goto err_out;
|
||||
|
||||
skb->dev = cp->dev;
|
||||
skb_reserve(skb, RX_OFFSET);
|
||||
|
||||
mapping = pci_map_single(cp->pdev, skb->data, cp->rx_buf_sz,
|
||||
|
|
|
@ -2013,7 +2013,6 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
|
|||
|
||||
skb = dev_alloc_skb (pkt_size + 2);
|
||||
if (likely(skb)) {
|
||||
skb->dev = dev;
|
||||
skb_reserve (skb, 2); /* 16 byte align the IP fields. */
|
||||
#if RX_BUF_IDX == 3
|
||||
wrap_copy(skb, rx_ring, ring_offset+4, pkt_size);
|
||||
|
|
|
@ -830,7 +830,6 @@ static inline int i596_rx(struct net_device *dev)
|
|||
lp->stats.rx_dropped++;
|
||||
}
|
||||
else {
|
||||
skb->dev = dev;
|
||||
if (!rx_in_place) {
|
||||
/* 16 byte align the data fields */
|
||||
skb_reserve(skb, 2);
|
||||
|
|
|
@ -320,7 +320,6 @@ static int lance_rx (struct net_device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
skb->dev = dev;
|
||||
skb_reserve (skb, 2); /* 16 byte align */
|
||||
skb_put (skb, len); /* make room */
|
||||
eth_copy_and_sum(skb,
|
||||
|
|
|
@ -2027,7 +2027,6 @@ static void ace_rx_int(struct net_device *dev, u32 rxretprd, u32 rxretcsm)
|
|||
*/
|
||||
csum = retdesc->tcp_udp_csum;
|
||||
|
||||
skb->dev = dev;
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
|
||||
/*
|
||||
|
|
|
@ -798,9 +798,7 @@ static int amd8111e_rx_poll(struct net_device *dev, int * budget)
|
|||
pci_unmap_single(lp->pci_dev,lp->rx_dma_addr[rx_index],
|
||||
lp->rx_buff_len-2, PCI_DMA_FROMDEVICE);
|
||||
skb_put(skb, pkt_len);
|
||||
skb->dev = dev;
|
||||
lp->rx_skbuff[rx_index] = new_skb;
|
||||
new_skb->dev = dev;
|
||||
lp->rx_dma_addr[rx_index] = pci_map_single(lp->pci_dev,
|
||||
new_skb->data,
|
||||
lp->rx_buff_len-2,
|
||||
|
@ -926,9 +924,7 @@ static int amd8111e_rx(struct net_device *dev)
|
|||
pci_unmap_single(lp->pci_dev,lp->rx_dma_addr[rx_index],
|
||||
lp->rx_buff_len-2, PCI_DMA_FROMDEVICE);
|
||||
skb_put(skb, pkt_len);
|
||||
skb->dev = dev;
|
||||
lp->rx_skbuff[rx_index] = new_skb;
|
||||
new_skb->dev = dev;
|
||||
lp->rx_dma_addr[rx_index] = pci_map_single(lp->pci_dev,
|
||||
new_skb->data, lp->rx_buff_len-2,PCI_DMA_FROMDEVICE);
|
||||
|
||||
|
|
|
@ -743,7 +743,6 @@ static int ariadne_rx(struct net_device *dev)
|
|||
}
|
||||
|
||||
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb,2); /* 16 byte align */
|
||||
skb_put(skb,pkt_len); /* Make room */
|
||||
eth_copy_and_sum(skb, (char *)priv->rx_buff[entry], pkt_len,0);
|
||||
|
|
|
@ -526,7 +526,6 @@ am79c961_rx(struct net_device *dev, struct dev_priv *priv)
|
|||
skb = dev_alloc_skb(len + 2);
|
||||
|
||||
if (skb) {
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2);
|
||||
|
||||
am_readbuffer(dev, pktaddr, skb_put(skb, len), len);
|
||||
|
|
|
@ -858,7 +858,6 @@ static void at91ether_rx(struct net_device *dev)
|
|||
skb_reserve(skb, 2);
|
||||
memcpy(skb_put(skb, pktlen), p_recv, pktlen);
|
||||
|
||||
skb->dev = dev;
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
dev->last_rx = jiffies;
|
||||
lp->stats.rx_bytes += pktlen;
|
||||
|
|
|
@ -255,7 +255,6 @@ static int ep93xx_rx(struct net_device *dev, int *budget)
|
|||
|
||||
skb = dev_alloc_skb(length + 2);
|
||||
if (likely(skb != NULL)) {
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2);
|
||||
dma_sync_single(NULL, ep->descs->rdesc[entry].buf_addr,
|
||||
length, DMA_FROM_DEVICE);
|
||||
|
|
|
@ -875,7 +875,6 @@ ether1_recv_done (struct net_device *dev)
|
|||
skb = dev_alloc_skb (length + 2);
|
||||
|
||||
if (skb) {
|
||||
skb->dev = dev;
|
||||
skb_reserve (skb, 2);
|
||||
|
||||
ether1_readbuffer (dev, skb_put (skb, length), rbd.rbd_bufl, length);
|
||||
|
|
|
@ -661,7 +661,6 @@ if (next_ptr < RX_START || next_ptr >= RX_END) {
|
|||
if (skb) {
|
||||
unsigned char *buf;
|
||||
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2);
|
||||
buf = skb_put(skb, length);
|
||||
ether3_readbuffer(dev, buf + 12, length - 12);
|
||||
|
|
|
@ -768,7 +768,6 @@ net_rx(struct net_device *dev)
|
|||
lp->stats.rx_dropped++;
|
||||
break;
|
||||
}
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb,2);
|
||||
|
||||
insw(ioaddr + DATAPORT, skb_put(skb,pkt_len), (pkt_len + 1) >> 1);
|
||||
|
|
|
@ -544,7 +544,6 @@ bionet_poll_rx(struct net_device *dev) {
|
|||
break;
|
||||
}
|
||||
|
||||
skb->dev = dev;
|
||||
skb_reserve( skb, 2 ); /* 16 Byte align */
|
||||
skb_put( skb, pkt_len ); /* make room */
|
||||
|
||||
|
|
|
@ -1047,7 +1047,6 @@ static int lance_rx( struct net_device *dev )
|
|||
pkt_len );
|
||||
}
|
||||
|
||||
skb->dev = dev;
|
||||
skb_reserve( skb, 2 ); /* 16 byte align */
|
||||
skb_put( skb, pkt_len ); /* Make room */
|
||||
lp->memcpy_f( skb->data, PKTBUF_ADDR(head), pkt_len );
|
||||
|
|
|
@ -408,7 +408,6 @@ static void atl1_rx_checksum(struct atl1_adapter *adapter,
|
|||
static u16 atl1_alloc_rx_buffers(struct atl1_adapter *adapter)
|
||||
{
|
||||
struct atl1_rfd_ring *rfd_ring = &adapter->rfd_ring;
|
||||
struct net_device *netdev = adapter->netdev;
|
||||
struct pci_dev *pdev = adapter->pdev;
|
||||
struct page *page;
|
||||
unsigned long offset;
|
||||
|
@ -444,7 +443,6 @@ static u16 atl1_alloc_rx_buffers(struct atl1_adapter *adapter)
|
|||
* the 14 byte MAC header is removed
|
||||
*/
|
||||
skb_reserve(skb, NET_IP_ALIGN);
|
||||
skb->dev = netdev;
|
||||
|
||||
buffer_info->alloced = 1;
|
||||
buffer_info->skb = skb;
|
||||
|
|
|
@ -793,7 +793,6 @@ static void net_rx(struct net_device *dev)
|
|||
lp->stats.rx_dropped++;
|
||||
goto done;
|
||||
}
|
||||
skb->dev = dev;
|
||||
|
||||
skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
|
||||
read_block(ioaddr, pkt_len, skb_put(skb,pkt_len), dev->if_port);
|
||||
|
|
|
@ -1205,7 +1205,6 @@ static int au1000_rx(struct net_device *dev)
|
|||
aup->stats.rx_dropped++;
|
||||
continue;
|
||||
}
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2); /* 16 byte IP header align */
|
||||
eth_copy_and_sum(skb,
|
||||
(unsigned char *)pDB->vaddr, frmlen, 0);
|
||||
|
|
|
@ -825,7 +825,6 @@ static int b44_rx(struct b44 *bp, int budget)
|
|||
if (copy_skb == NULL)
|
||||
goto drop_it_no_recycle;
|
||||
|
||||
copy_skb->dev = bp->dev;
|
||||
skb_reserve(copy_skb, 2);
|
||||
skb_put(copy_skb, len);
|
||||
/* DMA sync done above, copy just the actual packet */
|
||||
|
|
|
@ -715,7 +715,6 @@ static irqreturn_t bmac_rxdma_intr(int irq, void *dev_id)
|
|||
if (skb != NULL) {
|
||||
nb -= ETHERCRC;
|
||||
skb_put(skb, nb);
|
||||
skb->dev = dev;
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
netif_rx(skb);
|
||||
dev->last_rx = jiffies;
|
||||
|
|
|
@ -1995,7 +1995,6 @@ static int cas_rx_process_pkt(struct cas *cp, struct cas_rx_comp *rxc,
|
|||
return -1;
|
||||
|
||||
*skbref = skb;
|
||||
skb->dev = cp->dev;
|
||||
skb_reserve(skb, swivel);
|
||||
|
||||
p = skb->data;
|
||||
|
|
|
@ -1379,12 +1379,11 @@ static void sge_rx(struct sge *sge, struct freelQ *fl, unsigned int len)
|
|||
}
|
||||
__skb_pull(skb, sizeof(*p));
|
||||
|
||||
skb->dev = adapter->port[p->iff].dev;
|
||||
skb->dev->last_rx = jiffies;
|
||||
st = per_cpu_ptr(sge->port_stats[p->iff], smp_processor_id());
|
||||
st->rx_packets++;
|
||||
|
||||
skb->protocol = eth_type_trans(skb, skb->dev);
|
||||
skb->protocol = eth_type_trans(skb, adapter->port[p->iff].dev);
|
||||
if ((adapter->flags & RX_CSUM_ENABLED) && p->csum == 0xffff &&
|
||||
skb->protocol == htons(ETH_P_IP) &&
|
||||
(skb->data[9] == IPPROTO_TCP || skb->data[9] == IPPROTO_UDP)) {
|
||||
|
|
|
@ -1375,7 +1375,6 @@ e100_rx(struct net_device *dev)
|
|||
myNextRxDesc->descr.buf = L1_CACHE_ALIGN(virt_to_phys(myNextRxDesc->skb->data));
|
||||
}
|
||||
|
||||
skb->dev = dev;
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
|
||||
/* Send the packet to the upper layers */
|
||||
|
|
|
@ -1004,7 +1004,6 @@ dma_rx(struct net_device *dev)
|
|||
return;
|
||||
}
|
||||
skb_reserve(skb, 2); /* longword align L3 header */
|
||||
skb->dev = dev;
|
||||
|
||||
if (bp + length > lp->end_dma_buff) {
|
||||
int semi_cnt = lp->end_dma_buff - bp;
|
||||
|
@ -1702,7 +1701,6 @@ net_rx(struct net_device *dev)
|
|||
return;
|
||||
}
|
||||
skb_reserve(skb, 2); /* longword align L3 header */
|
||||
skb->dev = dev;
|
||||
|
||||
readwords(ioaddr, RX_FRAME_PORT, skb_put(skb, length), length >> 1);
|
||||
if (length & 1)
|
||||
|
|
|
@ -1684,9 +1684,8 @@ static void rx_eth(struct adapter *adap, struct sge_rspq *rq,
|
|||
struct port_info *pi;
|
||||
|
||||
skb_pull(skb, sizeof(*p) + pad);
|
||||
skb->dev = adap->port[p->iff];
|
||||
skb->dev->last_rx = jiffies;
|
||||
skb->protocol = eth_type_trans(skb, skb->dev);
|
||||
skb->protocol = eth_type_trans(skb, adap->port[p->iff]);
|
||||
pi = netdev_priv(skb->dev);
|
||||
if (pi->rx_csum_offload && p->csum_valid && p->csum == 0xffff &&
|
||||
!p->fragment) {
|
||||
|
|
|
@ -359,7 +359,6 @@ static void de600_rx_intr(struct net_device *dev)
|
|||
}
|
||||
/* else */
|
||||
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb,2); /* Align */
|
||||
|
||||
/* 'skb->data' points to the start of sk_buff data area. */
|
||||
|
|
|
@ -697,7 +697,6 @@ static int de620_rx_intr(struct net_device *dev)
|
|||
}
|
||||
else { /* Yep! Go get it! */
|
||||
skb_reserve(skb,2); /* Align */
|
||||
skb->dev = dev;
|
||||
/* skb->data points to the start of sk_buff data area */
|
||||
buffer = skb_put(skb,size);
|
||||
/* copy the packet into the buffer */
|
||||
|
|
|
@ -616,7 +616,6 @@ static int lance_rx(struct net_device *dev)
|
|||
}
|
||||
lp->stats.rx_bytes += len;
|
||||
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2); /* 16 byte align */
|
||||
skb_put(skb, len); /* make room */
|
||||
|
||||
|
|
|
@ -1044,7 +1044,6 @@ static int depca_rx(struct net_device *dev)
|
|||
unsigned char *buf;
|
||||
skb_reserve(skb, 2); /* 16 byte align the IP header */
|
||||
buf = skb_put(skb, pkt_len);
|
||||
skb->dev = dev;
|
||||
if (entry < lp->rx_old) { /* Wrapped buffer */
|
||||
len = (lp->rxRingMask - lp->rx_old + 1) * RX_BUFF_SZ;
|
||||
memcpy_fromio(buf, lp->rx_buff[lp->rx_old], len);
|
||||
|
|
|
@ -503,7 +503,6 @@ dgrs_rcv_frame(
|
|||
/* discarding the frame */
|
||||
goto out;
|
||||
}
|
||||
skb->dev = devN;
|
||||
skb_reserve(skb, 2); /* Align IP header */
|
||||
|
||||
again:
|
||||
|
|
|
@ -504,7 +504,6 @@ rio_timer (unsigned long data)
|
|||
break;
|
||||
}
|
||||
np->rx_skbuff[entry] = skb;
|
||||
skb->dev = dev;
|
||||
/* 16 byte align the IP header */
|
||||
skb_reserve (skb, 2);
|
||||
np->rx_ring[entry].fraginfo =
|
||||
|
@ -575,7 +574,6 @@ alloc_list (struct net_device *dev)
|
|||
dev->name);
|
||||
break;
|
||||
}
|
||||
skb->dev = dev; /* Mark as being used by this device. */
|
||||
skb_reserve (skb, 2); /* 16 byte align the IP header. */
|
||||
/* Rubicon now supports 40 bits of addressing space. */
|
||||
np->rx_ring[i].fraginfo =
|
||||
|
@ -866,7 +864,6 @@ receive_packet (struct net_device *dev)
|
|||
DMA_48BIT_MASK,
|
||||
np->rx_buf_sz,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
skb->dev = dev;
|
||||
/* 16 byte align the IP header */
|
||||
skb_reserve (skb, 2);
|
||||
eth_copy_and_sum (skb,
|
||||
|
@ -910,7 +907,6 @@ receive_packet (struct net_device *dev)
|
|||
break;
|
||||
}
|
||||
np->rx_skbuff[entry] = skb;
|
||||
skb->dev = dev;
|
||||
/* 16 byte align the IP header */
|
||||
skb_reserve (skb, 2);
|
||||
np->rx_ring[entry].fraginfo =
|
||||
|
|
|
@ -954,7 +954,6 @@ dm9000_rx(struct net_device *dev)
|
|||
/* Move data from DM9000 */
|
||||
if (GoodPacket
|
||||
&& ((skb = dev_alloc_skb(RxLen + 4)) != NULL)) {
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2);
|
||||
rdptr = (u8 *) skb_put(skb, RxLen - 4);
|
||||
|
||||
|
|
|
@ -1591,7 +1591,6 @@ eepro_rx(struct net_device *dev)
|
|||
|
||||
break;
|
||||
}
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb,2);
|
||||
|
||||
if (lp->version == LAN595)
|
||||
|
|
|
@ -1793,7 +1793,6 @@ speedo_rx(struct net_device *dev)
|
|||
copying to a properly sized skbuff. */
|
||||
if (pkt_len < rx_copybreak
|
||||
&& (skb = dev_alloc_skb(pkt_len + 2)) != 0) {
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
|
||||
/* 'skb_put()' points to the start of sk_buff data area. */
|
||||
pci_dma_sync_single_for_cpu(sp->pdev, sp->rx_ring_dma[entry],
|
||||
|
|
|
@ -976,7 +976,6 @@ static void eexp_hw_rx_pio(struct net_device *dev)
|
|||
lp->stats.rx_dropped++;
|
||||
break;
|
||||
}
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2);
|
||||
outw(pbuf+10, ioaddr+READ_PTR);
|
||||
insw(ioaddr+DATAPORT, skb_put(skb,pkt_len),(pkt_len+1)>>1);
|
||||
|
|
|
@ -934,7 +934,6 @@ static void epic_init_ring(struct net_device *dev)
|
|||
ep->rx_skbuff[i] = skb;
|
||||
if (skb == NULL)
|
||||
break;
|
||||
skb->dev = dev; /* Mark as being used by this device. */
|
||||
skb_reserve(skb, 2); /* 16 byte align the IP header. */
|
||||
ep->rx_ring[i].bufaddr = pci_map_single(ep->pci_dev,
|
||||
skb->data, ep->rx_buf_sz, PCI_DMA_FROMDEVICE);
|
||||
|
@ -1199,7 +1198,6 @@ static int epic_rx(struct net_device *dev, int budget)
|
|||
to a minimally-sized skbuff. */
|
||||
if (pkt_len < rx_copybreak
|
||||
&& (skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2); /* 16 byte align the IP header */
|
||||
pci_dma_sync_single_for_cpu(ep->pci_dev,
|
||||
ep->rx_ring[entry].bufaddr,
|
||||
|
@ -1236,7 +1234,6 @@ static int epic_rx(struct net_device *dev, int budget)
|
|||
skb = ep->rx_skbuff[entry] = dev_alloc_skb(ep->rx_buf_sz);
|
||||
if (skb == NULL)
|
||||
break;
|
||||
skb->dev = dev; /* Mark as being used by this device. */
|
||||
skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
|
||||
ep->rx_ring[entry].bufaddr = pci_map_single(ep->pci_dev,
|
||||
skb->data, ep->rx_buf_sz, PCI_DMA_FROMDEVICE);
|
||||
|
|
|
@ -1175,7 +1175,6 @@ static void eth16i_rx(struct net_device *dev)
|
|||
break;
|
||||
}
|
||||
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb,2);
|
||||
|
||||
/*
|
||||
|
|
|
@ -993,7 +993,6 @@ static int ewrk3_rx(struct net_device *dev)
|
|||
|
||||
if ((skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
|
||||
unsigned char *p;
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2); /* Align to 16 bytes */
|
||||
p = skb_put(skb, pkt_len);
|
||||
|
||||
|
|
|
@ -1719,7 +1719,6 @@ static int netdev_rx(struct net_device *dev)
|
|||
to a minimally-sized skbuff. */
|
||||
if (pkt_len < rx_copybreak &&
|
||||
(skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2); /* 16 byte align the IP header */
|
||||
pci_dma_sync_single_for_cpu(np->pci_dev,
|
||||
np->cur_rx->buffer,
|
||||
|
|
|
@ -647,7 +647,6 @@ while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) {
|
|||
printk("%s: Memory squeeze, dropping packet.\n", dev->name);
|
||||
fep->stats.rx_dropped++;
|
||||
} else {
|
||||
skb->dev = dev;
|
||||
skb_put(skb,pkt_len-4); /* Make room */
|
||||
eth_copy_and_sum(skb, data, pkt_len-4, 0);
|
||||
skb->protocol=eth_type_trans(skb,dev);
|
||||
|
|
|
@ -561,7 +561,6 @@ static int fec_enet_rx_common(struct net_device *dev, int *budget)
|
|||
skbn = dev_alloc_skb(ENET_RX_FRSIZE);
|
||||
|
||||
if (skbn != NULL) {
|
||||
skb->dev = dev;
|
||||
skb_put(skb, pkt_len); /* Make room */
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
received++;
|
||||
|
|
|
@ -1385,7 +1385,6 @@ static int nv_alloc_rx(struct net_device *dev)
|
|||
while (np->put_rx.orig != less_rx) {
|
||||
struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz + NV_RX_ALLOC_PAD);
|
||||
if (skb) {
|
||||
skb->dev = dev;
|
||||
np->put_rx_ctx->skb = skb;
|
||||
np->put_rx_ctx->dma = pci_map_single(np->pci_dev, skb->data,
|
||||
skb->end-skb->data, PCI_DMA_FROMDEVICE);
|
||||
|
@ -1416,7 +1415,6 @@ static int nv_alloc_rx_optimized(struct net_device *dev)
|
|||
while (np->put_rx.ex != less_rx) {
|
||||
struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz + NV_RX_ALLOC_PAD);
|
||||
if (skb) {
|
||||
skb->dev = dev;
|
||||
np->put_rx_ctx->skb = skb;
|
||||
np->put_rx_ctx->dma = pci_map_single(np->pci_dev, skb->data,
|
||||
skb->end-skb->data, PCI_DMA_FROMDEVICE);
|
||||
|
|
|
@ -170,7 +170,6 @@ static int fs_enet_rx_napi(struct net_device *dev, int *budget)
|
|||
skbn = dev_alloc_skb(ENET_RX_FRSIZE);
|
||||
|
||||
if (skbn != NULL) {
|
||||
skb->dev = dev;
|
||||
skb_put(skb, pkt_len); /* Make room */
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
received++;
|
||||
|
@ -304,7 +303,6 @@ static int fs_enet_rx_non_napi(struct net_device *dev)
|
|||
skbn = dev_alloc_skb(ENET_RX_FRSIZE);
|
||||
|
||||
if (skbn != NULL) {
|
||||
skb->dev = dev;
|
||||
skb_put(skb, pkt_len); /* Make room */
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
received++;
|
||||
|
@ -516,7 +514,6 @@ void fs_init_bds(struct net_device *dev)
|
|||
break;
|
||||
}
|
||||
fep->rx_skbuff[i] = skb;
|
||||
skb->dev = dev;
|
||||
CBDW_BUFADDR(bdp,
|
||||
dma_map_single(fep->dev, skb->data,
|
||||
L1_CACHE_ALIGN(PKT_MAXBUF_SIZE),
|
||||
|
|
|
@ -1295,8 +1295,6 @@ struct sk_buff * gfar_new_skb(struct net_device *dev, struct rxbd8 *bdp)
|
|||
*/
|
||||
skb_reserve(skb, alignamount);
|
||||
|
||||
skb->dev = dev;
|
||||
|
||||
bdp->bufPtr = dma_map_single(NULL, skb->data,
|
||||
priv->rx_buffer_size, DMA_FROM_DEVICE);
|
||||
|
||||
|
|
|
@ -1568,7 +1568,6 @@ static int hamachi_rx(struct net_device *dev)
|
|||
printk(KERN_ERR "%s: rx_copybreak non-zero "
|
||||
"not good with RX_CHECKSUM\n", dev->name);
|
||||
#endif
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2); /* 16 byte align the IP header */
|
||||
pci_dma_sync_single_for_cpu(hmp->pci_dev,
|
||||
hmp->rx_ring[entry].addr,
|
||||
|
|
|
@ -1816,7 +1816,6 @@ static void hp100_rx(struct net_device *dev)
|
|||
u_char *ptr;
|
||||
|
||||
skb_reserve(skb,2);
|
||||
skb->dev = dev;
|
||||
|
||||
/* ptr to start of the sk_buff data area */
|
||||
skb_put(skb, pkt_len);
|
||||
|
|
|
@ -1398,7 +1398,6 @@ static int emac_poll_rx(void *param, int budget)
|
|||
|
||||
skb_put(skb, len);
|
||||
push_packet:
|
||||
skb->dev = dev->ndev;
|
||||
skb->protocol = eth_type_trans(skb, dev->ndev);
|
||||
emac_rx_csum(dev, skb, ctrl);
|
||||
|
||||
|
|
|
@ -601,7 +601,6 @@ static void irqrx_handler(struct net_device *dev)
|
|||
|
||||
/* set up skb fields */
|
||||
|
||||
skb->dev = dev;
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
|
||||
|
|
|
@ -798,7 +798,6 @@ static int ibmveth_poll(struct net_device *netdev, int *budget)
|
|||
|
||||
skb_reserve(skb, offset);
|
||||
skb_put(skb, length);
|
||||
skb->dev = netdev;
|
||||
skb->protocol = eth_type_trans(skb, netdev);
|
||||
|
||||
netif_receive_skb(skb); /* send it up */
|
||||
|
|
|
@ -633,8 +633,6 @@ static inline void ioc3_rx(struct ioc3_private *ip)
|
|||
|
||||
ip->rx_skbs[rx_entry] = NULL; /* Poison */
|
||||
|
||||
new_skb->dev = priv_netdev(ip);
|
||||
|
||||
/* Because we reserve afterwards. */
|
||||
skb_put(new_skb, (1664 + RX_OFFSET));
|
||||
rxb = (struct ioc3_erxbuf *) new_skb->data;
|
||||
|
@ -940,7 +938,6 @@ static void ioc3_alloc_rings(struct net_device *dev)
|
|||
}
|
||||
|
||||
ip->rx_skbs[i] = skb;
|
||||
skb->dev = dev;
|
||||
|
||||
/* Because we reserve afterwards. */
|
||||
skb_put(skb, (1664 + RX_OFFSET));
|
||||
|
|
|
@ -1540,7 +1540,6 @@ static void veth_receive(struct veth_lpar_connection *cnx,
|
|||
}
|
||||
|
||||
skb_put(skb, length);
|
||||
skb->dev = dev;
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
netif_rx(skb); /* send it up */
|
||||
|
|
|
@ -110,11 +110,10 @@ static int ixpdev_rx(struct net_device *dev, int *budget)
|
|||
|
||||
skb = dev_alloc_skb(desc->pkt_length + 2);
|
||||
if (likely(skb != NULL)) {
|
||||
skb->dev = nds[desc->channel];
|
||||
skb_reserve(skb, 2);
|
||||
eth_copy_and_sum(skb, buf, desc->pkt_length, 0);
|
||||
skb_put(skb, desc->pkt_length);
|
||||
skb->protocol = eth_type_trans(skb, skb->dev);
|
||||
skb->protocol = eth_type_trans(skb, nds[desc->channel]);
|
||||
|
||||
skb->dev->last_rx = jiffies;
|
||||
|
||||
|
|
|
@ -1184,7 +1184,6 @@ lance_rx(struct net_device *dev)
|
|||
}
|
||||
break;
|
||||
}
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb,2); /* 16 byte align */
|
||||
skb_put(skb,pkt_len); /* Make room */
|
||||
eth_copy_and_sum(skb,
|
||||
|
|
|
@ -801,7 +801,6 @@ static inline int i596_rx(struct net_device *dev)
|
|||
lp->stats.rx_dropped++;
|
||||
}
|
||||
else {
|
||||
skb->dev = dev;
|
||||
if (!rx_in_place) {
|
||||
/* 16 byte align the data fields */
|
||||
dma_sync_single_for_cpu(lp->dev, (dma_addr_t)WSWAPchar(rbd->b_data), PKT_BUF_SZ, DMA_FROM_DEVICE);
|
||||
|
|
|
@ -722,7 +722,6 @@ static void ei_receive(struct net_device *dev)
|
|||
else
|
||||
{
|
||||
skb_reserve(skb,2); /* IP headers on 16 byte boundaries */
|
||||
skb->dev = dev;
|
||||
skb_put(skb, pkt_len); /* Make room */
|
||||
ei_block_input(dev, pkt_len, skb, current_offset + sizeof(rx_frame));
|
||||
skb->protocol=eth_type_trans(skb,dev);
|
||||
|
|
|
@ -137,7 +137,6 @@ static int loopback_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
skb_orphan(skb);
|
||||
|
||||
skb->protocol = eth_type_trans(skb,dev);
|
||||
skb->dev = dev;
|
||||
#ifndef LOOPBACK_MUST_CHECKSUM
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
#endif
|
||||
|
|
|
@ -676,7 +676,6 @@ i596_rx_one(struct net_device *dev, struct i596_private *lp,
|
|||
return 1;
|
||||
}
|
||||
|
||||
skb->dev = dev;
|
||||
memcpy(skb_put(skb,pkt_len), rfd->data, pkt_len);
|
||||
|
||||
skb->protocol = eth_type_trans(skb,dev);
|
||||
|
|
|
@ -530,7 +530,6 @@ net_rx(struct net_device *dev)
|
|||
return;
|
||||
}
|
||||
skb_put(skb, length);
|
||||
skb->dev = dev;
|
||||
|
||||
memcpy_fromio(skb->data, dev->mem_start + PP_RxFrame, length);
|
||||
|
||||
|
|
|
@ -357,7 +357,6 @@ static int macb_rx_frame(struct macb *bp, unsigned int first_frag,
|
|||
}
|
||||
|
||||
skb_reserve(skb, RX_OFFSET);
|
||||
skb->dev = bp->dev;
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
skb_put(skb, len);
|
||||
|
||||
|
|
|
@ -939,7 +939,6 @@ static irqreturn_t mace_rxdma_intr(int irq, void *dev_id)
|
|||
else /* Ethernet header; mace includes FCS */
|
||||
nb -= 8;
|
||||
skb_put(skb, nb);
|
||||
skb->dev = dev;
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
mp->stats.rx_bytes += skb->len;
|
||||
netif_rx(skb);
|
||||
|
|
|
@ -621,7 +621,6 @@ static void mace_dma_rx_frame(struct net_device *dev, struct mace_frame *mf)
|
|||
skb_reserve(skb,2);
|
||||
memcpy(skb_put(skb, mf->len), mf->data, mf->len);
|
||||
|
||||
skb->dev = dev;
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
netif_rx(skb);
|
||||
dev->last_rx = jiffies;
|
||||
|
|
|
@ -421,7 +421,6 @@ static void meth_rx(struct net_device* dev, unsigned long int_status)
|
|||
/* Write metadata, and then pass to the receive level */
|
||||
skb_put(skb_c, len);
|
||||
priv->rx_skbs[priv->rx_write] = skb;
|
||||
skb_c->dev = dev;
|
||||
skb_c->protocol = eth_type_trans(skb_c, dev);
|
||||
dev->last_rx = jiffies;
|
||||
priv->stats.rx_packets++;
|
||||
|
|
|
@ -101,7 +101,6 @@ static inline ssize_t mipsnet_get_fromdev(struct net_device *dev, size_t count)
|
|||
if (ioiocpy_frommipsnet(dev, skb_put(skb, len), len))
|
||||
return -EFAULT;
|
||||
|
||||
skb->dev = dev;
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
|
||||
|
|
|
@ -434,7 +434,6 @@ static int mv643xx_eth_receive_queue(struct net_device *dev, int budget)
|
|||
* received packet
|
||||
*/
|
||||
skb_put(skb, pkt_info.byte_cnt - 4);
|
||||
skb->dev = dev;
|
||||
|
||||
if (pkt_info.cmd_sts & ETH_LAYER_4_CHECKSUM_OK) {
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
|
|
|
@ -1020,7 +1020,6 @@ myri10ge_rx_done(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx,
|
|||
skb_shinfo(skb)->nr_frags = 0;
|
||||
}
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
skb->dev = dev;
|
||||
|
||||
if (mgp->csum_flag) {
|
||||
if ((skb->protocol == htons(ETH_P_IP)) ||
|
||||
|
|
|
@ -2289,7 +2289,6 @@ static void netdev_rx(struct net_device *dev, int *work_done, int work_to_do)
|
|||
* without copying to a minimally-sized skbuff. */
|
||||
if (pkt_len < rx_copybreak
|
||||
&& (skb = dev_alloc_skb(pkt_len + RX_OFFSET)) != NULL) {
|
||||
skb->dev = dev;
|
||||
/* 16 byte align the IP header */
|
||||
skb_reserve(skb, RX_OFFSET);
|
||||
pci_dma_sync_single_for_cpu(np->pci_dev,
|
||||
|
|
|
@ -168,7 +168,6 @@ static void netx_eth_receive(struct net_device *ndev)
|
|||
FIFO_PTR_SEGMENT(seg) | FIFO_PTR_FRAMENO(frameno));
|
||||
|
||||
ndev->last_rx = jiffies;
|
||||
skb->dev = ndev;
|
||||
skb->protocol = eth_type_trans(skb, ndev);
|
||||
netif_rx(skb);
|
||||
priv->stats.rx_packets++;
|
||||
|
|
|
@ -1129,7 +1129,6 @@ netxen_process_rcv(struct netxen_adapter *adapter, int ctxid,
|
|||
port->stats.csummed++;
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
}
|
||||
skb->dev = netdev;
|
||||
if (desc_ctx == RCV_DESC_LRO_CTXID) {
|
||||
/* True length was only available on the last pkt */
|
||||
skb_put(skb, buffer->lro_length);
|
||||
|
|
|
@ -562,7 +562,6 @@ static void ni5010_rx(struct net_device *dev)
|
|||
return;
|
||||
}
|
||||
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2);
|
||||
|
||||
/* Read packet into buffer */
|
||||
|
|
|
@ -934,7 +934,6 @@ static void ni52_rcv_int(struct net_device *dev)
|
|||
skb = (struct sk_buff *) dev_alloc_skb(totlen+2);
|
||||
if(skb != NULL)
|
||||
{
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb,2);
|
||||
skb_put(skb,totlen);
|
||||
eth_copy_and_sum(skb,(char *) p->base+(unsigned long) rbd->buffer,totlen,0);
|
||||
|
|
|
@ -610,7 +610,6 @@ static void *ni65_alloc_mem(struct net_device *dev,char *what,int size,int type)
|
|||
printk(KERN_WARNING "%s: unable to allocate %s memory.\n",dev->name,what);
|
||||
return NULL;
|
||||
}
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb,2+16);
|
||||
skb_put(skb,R_BUF_SIZE); /* grab the whole space .. (not necessary) */
|
||||
ptr = skb->data;
|
||||
|
@ -1094,7 +1093,6 @@ static void ni65_recv_intr(struct net_device *dev,int csr0)
|
|||
if(skb)
|
||||
{
|
||||
skb_reserve(skb,2);
|
||||
skb->dev = dev;
|
||||
#ifdef RCV_VIA_SKB
|
||||
if( (unsigned long) (skb->data + R_BUF_SIZE) > 0x1000000) {
|
||||
skb_put(skb,len);
|
||||
|
|
|
@ -607,7 +607,6 @@ static inline int rx_refill(struct net_device *ndev, gfp_t gfp)
|
|||
res &= 0xf;
|
||||
skb_reserve(skb, res);
|
||||
|
||||
skb->dev = ndev;
|
||||
if (gfp != GFP_ATOMIC)
|
||||
spin_lock_irqsave(&dev->rx_info.lock, flags);
|
||||
res = ns83820_add_rx_skb(dev, skb);
|
||||
|
|
|
@ -334,8 +334,6 @@ static void pasemi_mac_replenish_rx_ring(struct net_device *dev)
|
|||
break;
|
||||
}
|
||||
|
||||
skb->dev = dev;
|
||||
|
||||
dma = pci_map_single(mac->dma_pdev, skb->data, skb->len,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
|
||||
|
|
|
@ -1565,7 +1565,6 @@ static void netdrv_rx_interrupt (struct net_device *dev,
|
|||
|
||||
skb = dev_alloc_skb (pkt_size + 2);
|
||||
if (skb) {
|
||||
skb->dev = dev;
|
||||
skb_reserve (skb, 2); /* 16 byte align the IP fields. */
|
||||
|
||||
eth_copy_and_sum (skb, &rx_ring[ring_offset + 4], pkt_size, 0);
|
||||
|
|
|
@ -1056,7 +1056,6 @@ static int el3_rx(struct net_device *dev, int worklimit)
|
|||
DEBUG(3, " Receiving packet size %d status %4.4x.\n",
|
||||
pkt_len, rx_status);
|
||||
if (skb != NULL) {
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2);
|
||||
insl(ioaddr+RX_FIFO, skb_put(skb, pkt_len),
|
||||
((pkt_len+3)>>2));
|
||||
|
|
|
@ -883,7 +883,6 @@ static int el3_rx(struct net_device *dev)
|
|||
DEBUG(3, " Receiving packet size %d status %4.4x.\n",
|
||||
pkt_len, rx_status);
|
||||
if (skb != NULL) {
|
||||
skb->dev = dev;
|
||||
skb_reserve(skb, 2);
|
||||
insl(ioaddr+RX_FIFO, skb_put(skb, pkt_len),
|
||||
(pkt_len+3)>>2);
|
||||
|
|
|
@ -1496,7 +1496,6 @@ static void ei_receive(struct net_device *dev)
|
|||
else
|
||||
{
|
||||
skb_reserve(skb,2); /* IP headers on 16 byte boundaries */
|
||||
skb->dev = dev;
|
||||
skb_put(skb, pkt_len); /* Make room */
|
||||
ei_block_input(dev, pkt_len, skb, current_offset + sizeof(rx_frame));
|
||||
skb->protocol=eth_type_trans(skb,dev);
|
||||
|
|
|
@ -999,7 +999,6 @@ static void fjn_rx(struct net_device *dev)
|
|||
lp->stats.rx_dropped++;
|
||||
break;
|
||||
}
|
||||
skb->dev = dev;
|
||||
|
||||
skb_reserve(skb, 2);
|
||||
insw(ioaddr + DATAPORT, skb_put(skb, pkt_len),
|
||||
|
|
|
@ -1182,8 +1182,6 @@ static int mace_rx(struct net_device *dev, unsigned char RxCnt)
|
|||
skb = dev_alloc_skb(pkt_len+2);
|
||||
|
||||
if (skb != NULL) {
|
||||
skb->dev = dev;
|
||||
|
||||
skb_reserve(skb, 2);
|
||||
insw(ioaddr + AM2150_RCV, skb_put(skb, pkt_len), pkt_len>>1);
|
||||
if (pkt_len & 1)
|
||||
|
|
|
@ -1669,7 +1669,6 @@ static void smc_rx(struct net_device *dev)
|
|||
(packet_length+1)>>1);
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
|
||||
skb->dev = dev;
|
||||
netif_rx(skb);
|
||||
dev->last_rx = jiffies;
|
||||
smc->stats.rx_packets++;
|
||||
|
|
|
@ -1226,7 +1226,6 @@ xirc2ps_interrupt(int irq, void *dev_id)
|
|||
(pktlen+1)>>1);
|
||||
}
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
skb->dev = dev;
|
||||
netif_rx(skb);
|
||||
dev->last_rx = jiffies;
|
||||
lp->stats.rx_packets++;
|
||||
|
|
|
@ -1206,7 +1206,6 @@ static void pcnet32_rx_entry(struct net_device *dev,
|
|||
PCI_DMA_FROMDEVICE);
|
||||
skb_put(skb, pkt_len);
|
||||
lp->rx_skbuff[entry] = newskb;
|
||||
newskb->dev = dev;
|
||||
lp->rx_dma_addr[entry] =
|
||||
pci_map_single(lp->pci_dev,
|
||||
newskb->data,
|
||||
|
|
|
@ -1873,7 +1873,6 @@ static void ql_process_mac_rx_intr(struct ql3_adapter *qdev,
|
|||
pci_unmap_len(lrg_buf_cb2, maplen),
|
||||
PCI_DMA_FROMDEVICE);
|
||||
prefetch(skb->data);
|
||||
skb->dev = qdev->ndev;
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
skb->protocol = eth_type_trans(skb, qdev->ndev);
|
||||
|
||||
|
@ -1946,7 +1945,6 @@ static void ql_process_macip_rx_intr(struct ql3_adapter *qdev,
|
|||
skb2->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
}
|
||||
}
|
||||
skb2->dev = qdev->ndev;
|
||||
skb2->protocol = eth_type_trans(skb2, qdev->ndev);
|
||||
|
||||
netif_receive_skb(skb2);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user