[ETH]: Make eth_type_trans set skb->dev like the other *_type_trans
Arnaldo Carvalho de Melo [Thu, 26 Apr 2007 00:40:23 +0000 (17:40 -0700)]
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>

165 files changed:
arch/ia64/hp/sim/simeth.c
arch/ia64/sn/kernel/xpnet.c
arch/ppc/8260_io/enet.c
arch/ppc/8260_io/fcc_enet.c
arch/ppc/8xx_io/enet.c
arch/ppc/8xx_io/fec.c
drivers/infiniband/hw/amso1100/c2.c
drivers/isdn/hysdn/hysdn_net.c
drivers/net/3c501.c
drivers/net/3c505.c
drivers/net/3c507.c
drivers/net/3c509.c
drivers/net/3c515.c
drivers/net/3c523.c
drivers/net/3c527.c
drivers/net/3c59x.c
drivers/net/7990.c
drivers/net/8139cp.c
drivers/net/8139too.c
drivers/net/82596.c
drivers/net/a2065.c
drivers/net/acenic.c
drivers/net/amd8111e.c
drivers/net/ariadne.c
drivers/net/arm/am79c961a.c
drivers/net/arm/at91_ether.c
drivers/net/arm/ep93xx_eth.c
drivers/net/arm/ether1.c
drivers/net/arm/ether3.c
drivers/net/at1700.c
drivers/net/atari_bionet.c
drivers/net/atarilance.c
drivers/net/atl1/atl1_main.c
drivers/net/atp.c
drivers/net/au1000_eth.c
drivers/net/b44.c
drivers/net/bmac.c
drivers/net/cassini.c
drivers/net/chelsio/sge.c
drivers/net/cris/eth_v10.c
drivers/net/cs89x0.c
drivers/net/cxgb3/sge.c
drivers/net/de600.c
drivers/net/de620.c
drivers/net/declance.c
drivers/net/depca.c
drivers/net/dgrs.c
drivers/net/dl2k.c
drivers/net/dm9000.c
drivers/net/eepro.c
drivers/net/eepro100.c
drivers/net/eexpress.c
drivers/net/epic100.c
drivers/net/eth16i.c
drivers/net/ewrk3.c
drivers/net/fealnx.c
drivers/net/fec.c
drivers/net/fec_8xx/fec_main.c
drivers/net/forcedeth.c
drivers/net/fs_enet/fs_enet-main.c
drivers/net/gianfar.c
drivers/net/hamachi.c
drivers/net/hp100.c
drivers/net/ibm_emac/ibm_emac_core.c
drivers/net/ibmlana.c
drivers/net/ibmveth.c
drivers/net/ioc3-eth.c
drivers/net/iseries_veth.c
drivers/net/ixp2000/ixpdev.c
drivers/net/lance.c
drivers/net/lasi_82596.c
drivers/net/lib8390.c
drivers/net/loopback.c
drivers/net/lp486e.c
drivers/net/mac89x0.c
drivers/net/macb.c
drivers/net/mace.c
drivers/net/macmace.c
drivers/net/meth.c
drivers/net/mipsnet.c
drivers/net/mv643xx_eth.c
drivers/net/myri10ge/myri10ge.c
drivers/net/natsemi.c
drivers/net/netx-eth.c
drivers/net/netxen/netxen_nic_init.c
drivers/net/ni5010.c
drivers/net/ni52.c
drivers/net/ni65.c
drivers/net/ns83820.c
drivers/net/pasemi_mac.c
drivers/net/pci-skeleton.c
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/3c589_cs.c
drivers/net/pcmcia/axnet_cs.c
drivers/net/pcmcia/fmvj18x_cs.c
drivers/net/pcmcia/nmclan_cs.c
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/pcmcia/xirc2ps_cs.c
drivers/net/pcnet32.c
drivers/net/qla3xxx.c
drivers/net/r8169.c
drivers/net/rionet.c
drivers/net/saa9730.c
drivers/net/sb1250-mac.c
drivers/net/sc92031.c
drivers/net/seeq8005.c
drivers/net/sgiseeq.c
drivers/net/sis190.c
drivers/net/sis900.c
drivers/net/sk98lin/skge.c
drivers/net/smc911x.c
drivers/net/smc9194.c
drivers/net/smc91x.c
drivers/net/sonic.c
drivers/net/spider_net.c
drivers/net/starfire.c
drivers/net/sun3_82586.c
drivers/net/sun3lance.c
drivers/net/sunbmac.c
drivers/net/sundance.c
drivers/net/sungem.c
drivers/net/sunhme.c
drivers/net/sunlance.c
drivers/net/sunqe.c
drivers/net/tc35815.c
drivers/net/tlan.c
drivers/net/tsi108_eth.c
drivers/net/tulip/de2104x.c
drivers/net/tulip/de4x5.c
drivers/net/tulip/dmfe.c
drivers/net/tulip/interrupt.c
drivers/net/tulip/uli526x.c
drivers/net/tulip/winbond-840.c
drivers/net/tulip/xircom_cb.c
drivers/net/tulip/xircom_tulip_cb.c
drivers/net/tun.c
drivers/net/typhoon.c
drivers/net/via-rhine.c
drivers/net/via-velocity.c
drivers/net/wan/hdlc_fr.c
drivers/net/wan/sbni.c
drivers/net/wireless/airo.c
drivers/net/wireless/arlan-main.c
drivers/net/wireless/atmel.c
drivers/net/wireless/hostap/hostap_80211_rx.c
drivers/net/wireless/netwave_cs.c
drivers/net/wireless/orinoco.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/net/wireless/ray_cs.c
drivers/net/wireless/wavelan.c
drivers/net/wireless/wavelan_cs.c
drivers/net/wireless/zd1201.c
drivers/net/yellowfin.c
drivers/net/znet.c
drivers/usb/gadget/ether.c
drivers/usb/net/catc.c
drivers/usb/net/kaweth.c
drivers/usb/net/pegasus.c
drivers/usb/net/rtl8150.c
drivers/usb/net/usbnet.c
net/atm/lec.c
net/bluetooth/bnep/core.c
net/ethernet/eth.c
net/ieee80211/ieee80211_rx.c
net/irda/irlan/irlan_eth.c

index 424e925..edef008 100644 (file)
@@ -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 */
 
index c8173db..68d59d9 100644 (file)
@@ -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;
 
index a6056c2..48ce84f 100644 (file)
@@ -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),
index 06b84c3..9db825f 100644 (file)
@@ -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),
index b23c45b..bfa3f52 100644 (file)
@@ -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],
index e6c28fb..57a9a61 100644 (file)
@@ -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);
index 59243d9..7698fea 100644 (file)
@@ -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);
index 557d96c..cfa8fa5 100644 (file)
@@ -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);
 
index 06e3378..4bee99b 100644 (file)
@@ -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
index 702bfb2..c693b5a 100644 (file)
@@ -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;
index 54e1d5a..eed4299 100644 (file)
@@ -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);
index f791bf0..c7511c4 100644 (file)
@@ -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. */
index c307ce6..290166d 100644 (file)
@@ -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),
index 17d61eb..6b2036d 100644 (file)
@@ -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);
index 6c7437e..c7b571b 100644 (file)
@@ -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;
index b406ecf..80924f7 100644 (file)
@@ -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. */
index 1b3d11e..c50264a 100644 (file)
@@ -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,
index 12c8453..2f704cb 100644 (file)
@@ -573,7 +573,6 @@ rx_status_loop:
                }
 
                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,
index 99304b2..2101334 100644 (file)
@@ -2013,7 +2013,6 @@ no_early_rx:
 
                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);
index 640d7ca..3ff1155 100644 (file)
@@ -830,7 +830,6 @@ memory_squeeze:
                                lp->stats.rx_dropped++;
                        }
                        else {
-                               skb->dev = dev;
                                if (!rx_in_place) {
                                        /* 16 byte align the data fields */
                                        skb_reserve(skb, 2);
index d76548e..b38fc65 100644 (file)
@@ -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,
index 7138e0e..7122b7b 100644 (file)
@@ -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);
 
                /*
index 962c954..675fe91 100644 (file)
@@ -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);
 
index 9dfc09b..a0e68e7 100644 (file)
@@ -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);
index ddd12d4..8f0d7ce 100644 (file)
@@ -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);
index 1621b8f..152fa7a 100644 (file)
@@ -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;
index dd698b0..2438c5b 100644 (file)
@@ -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);
index a292188..f075ceb 100644 (file)
@@ -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);
index 8411783..32da2eb 100644 (file)
@@ -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);
index 56ae8ba..bed8e0e 100644 (file)
@@ -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);
index 4e3bf6a..f52e7f2 100644 (file)
@@ -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 */
 
index 7e37ac8..dfa8b9b 100644 (file)
@@ -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 );
index 8606eac..e3f1816 100644 (file)
@@ -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;
index 2d306fc..18aba83 100644 (file)
@@ -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);
index 69ae229..97b55f2 100644 (file)
@@ -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);
index d742bfe..f67d97d 100644 (file)
@@ -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 */
index c143304..4612725 100644 (file)
@@ -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;
index c812648..68e37a6 100644 (file)
@@ -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;
index 326d4a6..47fa8dc 100644 (file)
@@ -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)) {
index 8eb5712..9864380 100644 (file)
@@ -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 */
index 4612f71..9774bb1 100644 (file)
@@ -1004,7 +1004,6 @@ skip_this_frame:
                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)
index 027ab2c..8946f7a 100644 (file)
@@ -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) {
index e547ce1..dae97b8 100644 (file)
@@ -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. */
index b6ad0cb..dc48924 100644 (file)
@@ -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 */
index 9f7e1db..95d854e 100644 (file)
@@ -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 */
 
index f3807aa..1834970 100644 (file)
@@ -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);
index a795202..d223c38 100644 (file)
@@ -503,7 +503,6 @@ dgrs_rcv_frame(
                /* discarding the frame */
                goto out;
        }
-       skb->dev = devN;
        skb_reserve(skb, 2);    /* Align IP header */
 
 again:
index 9d446a0..74ec64a 100644 (file)
@@ -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 =
index 615d2b1..8cc1174 100644 (file)
@@ -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);
 
index b446309..39654e1 100644 (file)
@@ -1591,7 +1591,6 @@ eepro_rx(struct net_device *dev)
 
                                break;
                        }
-                       skb->dev = dev;
                        skb_reserve(skb,2);
 
                        if (lp->version == LAN595)
index e28bb1e..db658bc 100644 (file)
@@ -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],
index 3868b80..8aaf5ec 100644 (file)
@@ -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);
index 3a6a83d..4e3f14c 100644 (file)
@@ -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);
index 93283e3..04abf59 100644 (file)
@@ -1175,7 +1175,6 @@ static void eth16i_rx(struct net_device *dev)
                                break;
                        }
 
-                       skb->dev = dev;
                        skb_reserve(skb,2);
 
                        /*
index 714ea11..cb0792c 100644 (file)
@@ -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);
 
index 38a13f4..abe9b08 100644 (file)
@@ -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,
index 6764281..255b091 100644 (file)
@@ -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);
index 77f747a..698dba8 100644 (file)
@@ -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++;
index d04214e..d5d458c 100644 (file)
@@ -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);
index 4a05c14..9f6ef31 100644 (file)
@@ -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),
index d981d4c..1d01919 100644 (file)
@@ -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);
 
index c3c0d67..2521b11 100644 (file)
@@ -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,
index 7dc5185..8118a67 100644 (file)
@@ -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);
index dd8ad87..b1ad62d 100644 (file)
@@ -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);
 
index 3f946c8..fe85d6f 100644 (file)
@@ -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;
 
index 458db05..0573fcf 100644 (file)
@@ -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 */
index 4ad7807..ea07aa5 100644 (file)
@@ -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));
index 0e9ba3c..347d50c 100644 (file)
@@ -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 */
index a4eccb1..6683afc 100644 (file)
@@ -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;
 
index a384332..11cbcb9 100644 (file)
@@ -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,
index 452863d..0edcd12 100644 (file)
@@ -801,7 +801,6 @@ memory_squeeze:
                                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);
index e726c06..5c86e73 100644 (file)
@@ -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);
index 2b739fd..4380e5e 100644 (file)
@@ -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
index 177c502..5fc18da 100644 (file)
@@ -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);
index e960138..90e695d 100644 (file)
@@ -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);
 
index 2e9571b..0c3649b 100644 (file)
@@ -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);
 
index 9ec24f0..b3bd623 100644 (file)
@@ -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);
index 5d541e8..8c07ffc 100644 (file)
@@ -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;
index 7e69ca6..fafe678 100644 (file)
@@ -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++;
index f42b9e2..403f63a 100644 (file)
@@ -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;
 
index 8015a7c..cd9369a 100644 (file)
@@ -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;
index f8efe0e..7c04179 100644 (file)
@@ -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)) ||
index 349b96a..a8d7ff2 100644 (file)
@@ -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,
index a53644f..2b8da0a 100644 (file)
@@ -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++;
index eff965d..5cd4056 100644 (file)
@@ -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);
index 8be0d03..3d5b423 100644 (file)
@@ -562,7 +562,6 @@ static void ni5010_rx(struct net_device *dev)
                return;
        }
 
-       skb->dev = dev;
        skb_reserve(skb, 2);
 
        /* Read packet into buffer */
index a6f4b24..70b6812 100644 (file)
@@ -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);
index 1578f4d..782201d 100644 (file)
@@ -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);
index 9ec6e9e..747988b 100644 (file)
@@ -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);
index d670ac7..3f4213f 100644 (file)
@@ -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);
 
index 6ca4e4f..099972c 100644 (file)
@@ -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);
index c7bd9c1..2b395ee 100644 (file)
@@ -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));
index 461e827..143ae2f 100644 (file)
@@ -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);
index 6139048..fabbe95 100644 (file)
@@ -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);
index 0d7de61..3f93d49 100644 (file)
@@ -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),
index 3b70774..ec0af65 100644 (file)
@@ -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)
index 2561f76..7912dbd 100644 (file)
@@ -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++;
index 5879e7c..809ec44 100644 (file)
@@ -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++;
index 4d94ba7..0791360 100644 (file)
@@ -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,
index a8246eb..40d2639 100755 (executable)
@@ -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);
index 6a77b8a..34280f9 100644 (file)
@@ -2586,7 +2586,6 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
                        pci_action(tp->pci_dev, le64_to_cpu(desc->addr),
                                   tp->rx_buf_sz, PCI_DMA_FROMDEVICE);
 
-                       skb->dev = dev;
                        skb_put(skb, pkt_size);
                        skb->protocol = eth_type_trans(skb, dev);
 
index b7ff484..df6b738 100644 (file)
@@ -115,7 +115,6 @@ static int rionet_rx_clean(struct net_device *ndev)
 
                rnet->rx_skb[i]->data = data;
                skb_put(rnet->rx_skb[i], RIO_MAX_MSG_SIZE);
-               rnet->rx_skb[i]->dev = ndev;
                rnet->rx_skb[i]->protocol =
                    eth_type_trans(rnet->rx_skb[i], ndev);
                error = netif_rx(rnet->rx_skb[i]);
index 143958f..ad94358 100644 (file)
@@ -688,7 +688,6 @@ static int lan_saa9730_rx(struct net_device *dev)
                        } else {
                                lp->stats.rx_bytes += len;
                                lp->stats.rx_packets++;
-                               skb->dev = dev;
                                skb_reserve(skb, 2);    /* 16 byte align */
                                skb_put(skb, len);      /* make room */
                                eth_copy_and_sum(skb,
index 103c317..0a3a379 100644 (file)
@@ -933,9 +933,6 @@ static int sbdma_add_rcvbuffer(sbmacdma_t *d,struct sk_buff *sb)
                }
 
                sbdma_align_skb(sb_new, SMP_CACHE_BYTES, ETHER_ALIGN);
-
-               /* mark skbuff owned by our device */
-               sb_new->dev = d->sbdma_eth->sbm_dev;
        }
        else {
                sb_new = sb;
index c32c21a..5b7284c 100644 (file)
@@ -814,7 +814,6 @@ static void _sc92031_rx_tasklet(struct net_device *dev)
                        memcpy(skb_put(skb, pkt_size), rx_ring + rx_ring_offset, pkt_size);
                }
 
-               skb->dev = dev;
                skb->protocol = eth_type_trans(skb, dev);
                dev->last_rx = jiffies;
                netif_rx(skb);
index 0d6c95c..4bce7c4 100644 (file)
@@ -550,7 +550,6 @@ static void seeq8005_rx(struct net_device *dev)
                                lp->stats.rx_dropped++;
                                break;
                        }
-                       skb->dev = dev;
                        skb_reserve(skb, 2);    /* align data on 16 byte */
                        buf = skb_put(skb,pkt_len);
 
index 52ed522..5a89191 100644 (file)
@@ -318,7 +318,6 @@ static inline void sgiseeq_rx(struct net_device *dev, struct sgiseeq_private *sp
                        skb = dev_alloc_skb(len + 2);
 
                        if (skb) {
-                               skb->dev = dev;
                                skb_reserve(skb, 2);
                                skb_put(skb, len);
 
index 34463ce..bc8de48 100644 (file)
@@ -632,7 +632,6 @@ static int sis190_rx_interrupt(struct net_device *dev,
                        pci_action(tp->pci_dev, le32_to_cpu(desc->addr),
                                   tp->rx_buf_sz, PCI_DMA_FROMDEVICE);
 
-                       skb->dev = dev;
                        skb_put(skb, pkt_size);
                        skb->protocol = eth_type_trans(skb, dev);
 
index b2a3b19..dea0126 100644 (file)
@@ -1160,7 +1160,6 @@ sis900_init_rx_ring(struct net_device *net_dev)
                           buffer */
                        break;
                }
-               skb->dev = net_dev;
                sis_priv->rx_skbuff[i] = skb;
                sis_priv->rx_ring[i].cmdsts = RX_BUF_SIZE;
                 sis_priv->rx_ring[i].bufptr = pci_map_single(sis_priv->pci_dev,
@@ -1800,7 +1799,6 @@ static int sis900_rx(struct net_device *net_dev)
                        sis_priv->stats.rx_packets++;
                        sis_priv->dirty_rx++;
 refill_rx_ring:
-                       skb->dev = net_dev;
                        sis_priv->rx_skbuff[entry] = skb;
                        sis_priv->rx_ring[entry].cmdsts = RX_BUF_SIZE;
                        sis_priv->rx_ring[entry].bufptr =
@@ -1832,7 +1830,6 @@ refill_rx_ring:
                                sis_priv->stats.rx_dropped++;
                                break;
                        }
-                       skb->dev = net_dev;
                        sis_priv->rx_skbuff[entry] = skb;
                        sis_priv->rx_ring[entry].cmdsts = RX_BUF_SIZE;
                        sis_priv->rx_ring[entry].bufptr =
index e94ab25..9ac1fe6 100644 (file)
@@ -2193,7 +2193,6 @@ rx_start:
                                SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC,
                                        FrameLength, pRxPort->PortIndex);
 
-                               pMsg->dev = pAC->dev[pRxPort->PortIndex];
                                pMsg->protocol = eth_type_trans(pMsg,
                                        pAC->dev[pRxPort->PortIndex]);
                                netif_rx(pMsg);
@@ -2246,7 +2245,6 @@ rx_start:
                                (IFF_PROMISC | IFF_ALLMULTI)) != 0 ||
                                (ForRlmt & SK_RLMT_RX_PROTOCOL) ==
                                SK_RLMT_RX_PROTOCOL) {
-                               pMsg->dev = pAC->dev[pRxPort->PortIndex];
                                pMsg->protocol = eth_type_trans(pMsg,
                                        pAC->dev[pRxPort->PortIndex]);
                                netif_rx(pMsg);
index c956141..8a2109a 100644 (file)
@@ -502,7 +502,6 @@ static inline void   smc911x_rcv(struct net_device *dev)
                DBG(SMC_DEBUG_PKTS, "%s: Received packet\n", dev->name,);
                PRINT_PKT(data, ((pkt_len - 4) <= 64) ? pkt_len - 4 : 64);
                dev->last_rx = jiffies;
-               skb->dev = dev;
                skb->protocol = eth_type_trans(skb, dev);
                netif_rx(skb);
                lp->stats.rx_packets++;
@@ -1307,7 +1306,6 @@ smc911x_rx_dma_irq(int dma, void *data)
        lp->current_rx_skb = NULL;
        PRINT_PKT(skb->data, skb->len);
        dev->last_rx = jiffies;
-       skb->dev = dev;
        skb->protocol = eth_type_trans(skb, dev);
        netif_rx(skb);
        lp->stats.rx_packets++;
index bd6e845..36c1eba 100644 (file)
@@ -1262,7 +1262,6 @@ static void smc_rcv(struct net_device *dev)
 
                skb_reserve( skb, 2 );   /* 16 bit alignment */
 
-               skb->dev = dev;
                data = skb_put( skb, packet_length);
 
 #ifdef USE_32_BIT
index 49f4b77..01cc3c7 100644 (file)
@@ -568,7 +568,6 @@ static inline void  smc_rcv(struct net_device *dev)
                PRINT_PKT(data, packet_len - 4);
 
                dev->last_rx = jiffies;
-               skb->dev = dev;
                skb->protocol = eth_type_trans(skb, dev);
                netif_rx(skb);
                lp->stats.rx_packets++;
index ed7aa0a..c6320c7 100644 (file)
@@ -85,7 +85,6 @@ static int sonic_open(struct net_device *dev)
                               dev->name);
                        return -ENOMEM;
                }
-               skb->dev = dev;
                /* align IP header unless DMA requires otherwise */
                if (SONIC_BUS_SCALE(lp->dma_bitmode) == 2)
                        skb_reserve(skb, 2);
@@ -451,7 +450,6 @@ static void sonic_rx(struct net_device *dev)
                                lp->stats.rx_dropped++;
                                break;
                        }
-                       new_skb->dev = dev;
                        /* provide 16 byte IP header alignment unless DMA requires otherwise */
                        if(SONIC_BUS_SCALE(lp->dma_bitmode) == 2)
                                skb_reserve(new_skb, 2);
index e3019d5..f7e0ac7 100644 (file)
@@ -990,7 +990,6 @@ spider_net_pass_skb_up(struct spider_net_descr *descr,
        netdev = card->netdev;
 
        skb = descr->skb;
-       skb->dev = netdev;
        skb_put(skb, hwdescr->valid_size);
 
        /* the card seems to add 2 bytes of junk in front
index 8bba2e3..9d6e454 100644 (file)
@@ -1452,7 +1452,6 @@ static int __netdev_rx(struct net_device *dev, int *quota)
                   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->rx_info[entry].mapping,
index 4757aa6..5bcc749 100644 (file)
@@ -775,7 +775,6 @@ static void sun3_82586_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+swab32((unsigned long) rbd->buffer),totlen,0);
index 7bee45b..0454827 100644 (file)
@@ -851,7 +851,6 @@ static int lance_rx( struct net_device *dev )
                                }
 
 
-                               skb->dev = dev;
                                skb_reserve( skb, 2 );  /* 16 byte align */
                                skb_put( skb, pkt_len );        /* Make room */
 //                             memcpy( skb->data, PKTBUF_ADDR(head), pkt_len );
index 18f8885..2ad8d58 100644 (file)
@@ -855,7 +855,6 @@ static void bigmac_rx(struct bigmac *bp)
                                drops++;
                                goto drop_it;
                        }
-                       copy_skb->dev = bp->dev;
                        skb_reserve(copy_skb, 2);
                        skb_put(copy_skb, len);
                        sbus_dma_sync_single_for_cpu(bp->bigmac_sdev,
index c06ecc8..f51ba31 100644 (file)
@@ -1308,7 +1308,6 @@ static void rx_poll(unsigned long data)
                           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,
                                                            desc->frag[0].addr,
index 08ea61d..db2e1a6 100644 (file)
@@ -845,7 +845,6 @@ static int gem_rx(struct gem *gp, int work_to_do)
                                goto drop_it;
                        }
 
-                       copy_skb->dev = gp->dev;
                        skb_reserve(copy_skb, 2);
                        skb_put(copy_skb, len);
                        pci_dma_sync_single_for_cpu(gp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE);
index 192bbc9..aca592b 100644 (file)
@@ -2058,7 +2058,6 @@ static void happy_meal_rx(struct happy_meal *hp, struct net_device *dev)
                                goto drop_it;
                        }
 
-                       copy_skb->dev = dev;
                        skb_reserve(copy_skb, 2);
                        skb_put(copy_skb, len);
                        hme_dma_sync_for_cpu(hp, dma_addr, len, DMA_FROMDEVICE);
index b0929a4..8f53a1e 100644 (file)
@@ -547,7 +547,6 @@ static void lance_rx_dvma(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 */
                        eth_copy_and_sum(skb,
@@ -721,7 +720,6 @@ static void lance_rx_pio(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 */
                        lance_piocopy_to_skb(skb, &(ib->rx_buf[entry][0]), len);
index f3bad56..fbfb982 100644 (file)
@@ -437,7 +437,6 @@ static void qe_rx(struct sunqe *qep)
                                drops++;
                                qep->net_stats.rx_dropped++;
                        } else {
-                               skb->dev = qep->dev;
                                skb_reserve(skb, 2);
                                skb_put(skb, len);
                                eth_copy_and_sum(skb, (unsigned char *) this_qbuf,
index e3a7e3c..d7741e2 100644 (file)
@@ -1145,7 +1145,6 @@ tc35815_rx(struct net_device *dev)
                                break;
                        }
                        skb_reserve(skb, 2);   /* 16 bit alignment */
-                       skb->dev = dev;
 
                        data = skb_put(skb, pkt_len);
 
index f85f002..2ede3f5 100644 (file)
@@ -1577,7 +1577,6 @@ u32 TLan_HandleRxEOF( struct net_device *dev, u16 host_int )
                                printk(KERN_INFO "TLAN: Couldn't allocate memory for received data.\n");
                        else {
                                head_buffer = priv->rxBuffer + (priv->rxHead * TLAN_MAX_FRAME_SIZE);
-                               skb->dev = dev;
                                skb_reserve(skb, 2);
                                t = (void *) skb_put(skb, frameSize);
 
@@ -1608,7 +1607,6 @@ u32 TLan_HandleRxEOF( struct net_device *dev, u16 host_int )
                                skb->protocol = eth_type_trans( skb, dev );
                                netif_rx( skb );
 
-                               new_skb->dev = dev;
                                skb_reserve( new_skb, 2 );
                                t = (void *) skb_put( new_skb, TLAN_MAX_FRAME_SIZE );
                                head_list->buffer[0].address = pci_map_single(priv->pciDev, new_skb->data, TLAN_MAX_FRAME_SIZE, PCI_DMA_FROMDEVICE);
index d92c5c5..0bfc2c9 100644 (file)
@@ -788,7 +788,6 @@ static int tsi108_complete_rx(struct net_device *dev, int budget)
                        printk(".\n");
                }
 
-               skb->dev = dev;
                skb_put(skb, data->rxring[rx].len);
                skb->protocol = eth_type_trans(skb, dev);
                netif_receive_skb(skb);
index c82befa..8a7effa 100644 (file)
@@ -435,7 +435,6 @@ static void de_rx (struct de_private *de)
                        rx_work = 100;
                        goto rx_next;
                }
-               copy_skb->dev = de->dev;
 
                if (!copying_skb) {
                        pci_unmap_single(de->pdev, mapping,
index 4b3cd3d..e40ddb8 100644 (file)
@@ -3634,7 +3634,6 @@ de4x5_alloc_rx_buff(struct net_device *dev, int index, int len)
     p = dev_alloc_skb(IEEE802_3_SZ + DE4X5_ALIGN + 2);
     if (!p) return NULL;
 
-    p->dev = dev;
     tmp = virt_to_bus(p->data);
     i = ((tmp + DE4X5_ALIGN) & ~DE4X5_ALIGN) - tmp;
     skb_reserve(p, i);
@@ -3655,7 +3654,6 @@ de4x5_alloc_rx_buff(struct net_device *dev, int index, int len)
     p = dev_alloc_skb(len + 2);
     if (!p) return NULL;
 
-    p->dev = dev;
     skb_reserve(p, 2);                                /* Align */
     if (index < lp->rx_old) {                          /* Wrapped buffer */
        short tlen = (lp->rxRingSize - lp->rx_old) * RX_BUFF_SZ;
index 9aeac76..a5e0237 100644 (file)
@@ -988,14 +988,12 @@ static void dmfe_rx_packet(struct DEVICE *dev, struct dmfe_board_info * db)
 
                                                skb = newskb;
                                                /* size less than COPY_SIZE, allocate a rxlen SKB */
-                                               skb->dev = dev;
                                                skb_reserve(skb, 2); /* 16byte align */
                                                memcpy(skb_put(skb, rxlen), rxptr->rx_skb_ptr->data, rxlen);
                                                dmfe_reuse_skb(db, rxptr->rx_skb_ptr);
-                                       } else {
-                                               skb->dev = dev;
+                                       } else
                                                skb_put(skb, rxlen);
-                                       }
+
                                        skb->protocol = eth_type_trans(skb, dev);
                                        netif_rx(skb);
                                        dev->last_rx = jiffies;
index e3488d7..e86df07 100644 (file)
@@ -192,7 +192,6 @@ int tulip_poll(struct net_device *dev, int *budget)
                                   to a minimally-sized skbuff. */
                                if (pkt_len < tulip_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(tp->pdev,
                                                                   tp->rx_buffers[entry].mapping,
@@ -416,7 +415,6 @@ static int tulip_rx(struct net_device *dev)
                           to a minimally-sized skbuff. */
                        if (pkt_len < tulip_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(tp->pdev,
                                                            tp->rx_buffers[entry].mapping,
index 229158e..9a5850f 100644 (file)
@@ -828,14 +828,12 @@ static void uli526x_rx_packet(struct net_device *dev, struct uli526x_board_info
                                        ( (skb = dev_alloc_skb(rxlen + 2) )
                                        != NULL) ) {
                                        /* size less than COPY_SIZE, allocate a rxlen SKB */
-                                       skb->dev = dev;
                                        skb_reserve(skb, 2); /* 16byte align */
                                        memcpy(skb_put(skb, rxlen), rxptr->rx_skb_ptr->tail, rxlen);
                                        uli526x_reuse_skb(db, rxptr->rx_skb_ptr);
-                               } else {
-                                       skb->dev = dev;
+                               } else
                                        skb_put(skb, rxlen);
-                               }
+
                                skb->protocol = eth_type_trans(skb, dev);
                                netif_rx(skb);
                                dev->last_rx = jiffies;
index 002a05e..d74fa87 100644 (file)
@@ -813,7 +813,6 @@ static void init_rxtx_rings(struct net_device *dev)
                np->rx_skbuff[i] = skb;
                if (skb == NULL)
                        break;
-               skb->dev = dev;                 /* Mark as being used by this device. */
                np->rx_addr[i] = pci_map_single(np->pci_dev,skb->data,
                                        np->rx_buf_sz,PCI_DMA_FROMDEVICE);
 
@@ -1229,7 +1228,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->rx_addr[entry],
                                                            np->rx_skbuff[entry]->len,
@@ -1278,7 +1276,6 @@ static int netdev_rx(struct net_device *dev)
                        np->rx_skbuff[entry] = skb;
                        if (skb == NULL)
                                break;                  /* Better luck next round. */
-                       skb->dev = dev;                 /* Mark as being used by this device. */
                        np->rx_addr[entry] = pci_map_single(np->pci_dev,
                                                        skb->data,
                                                        np->rx_buf_sz, PCI_DMA_FROMDEVICE);
index 61d3130..1fe3734 100644 (file)
@@ -1207,7 +1207,6 @@ static void investigate_read_descriptor(struct net_device *dev,struct xircom_pri
                                card->stats.rx_dropped++;
                                goto out;
                        }
-                       skb->dev = dev;
                        skb_reserve(skb, 2);
                        eth_copy_and_sum(skb, (unsigned char*)&card->rx_buffer[bufferoffset / 4], pkt_len, 0);
                        skb_put(skb, pkt_len);
index a998c5d..3f24c82 100644 (file)
@@ -1238,7 +1238,6 @@ xircom_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 */
 #if ! defined(__alpha__)
                                eth_copy_and_sum(skb, bus_to_virt(tp->rx_ring[entry].buffer1),
index 5643d1e..a57aa01 100644 (file)
@@ -254,11 +254,11 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv,
                return -EFAULT;
        }
 
-       skb->dev = tun->dev;
        switch (tun->flags & TUN_TYPE_MASK) {
        case TUN_TUN_DEV:
                skb->mac.raw = skb->data;
                skb->protocol = pi.proto;
+               skb->dev = tun->dev;
                break;
        case TUN_TAP_DEV:
                skb->protocol = eth_type_trans(skb, tun->dev);
index 0d91d09..f2dd776 100644 (file)
@@ -1708,7 +1708,6 @@ typhoon_rx(struct typhoon *tp, struct basic_ring *rxRing, volatile u32 * ready,
 
                if(pkt_len < rx_copybreak &&
                   (new_skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
-                       new_skb->dev = tp->dev;
                        skb_reserve(new_skb, 2);
                        pci_dma_sync_single_for_cpu(tp->pdev, dma_addr,
                                                    PKT_BUF_SZ,
index f3a972e..adea290 100644 (file)
@@ -1486,7 +1486,6 @@ static int rhine_rx(struct net_device *dev, int limit)
                           copying 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(rp->pdev,
                                                            rp->rx_skbuff_dma[entry],
index 8e5d820..9f6cc15 100644 (file)
@@ -1398,7 +1398,6 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx)
                vptr->stats.multicast++;
 
        skb = rd_info->skb;
-       skb->dev = vptr->dev;
 
        pci_dma_sync_single_for_cpu(vptr->pdev, rd_info->skb_dma,
                                    vptr->rx_buf_sz, PCI_DMA_FROMDEVICE);
@@ -1428,7 +1427,7 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx)
                   PCI_DMA_FROMDEVICE);
 
        skb_put(skb, pkt_len - 4);
-       skb->protocol = eth_type_trans(skb, skb->dev);
+       skb->protocol = eth_type_trans(skb, vptr->dev);
 
        stats->rx_bytes += pkt_len;
        netif_rx(skb);
index c6c3c75..3240d10 100644 (file)
@@ -1011,7 +1011,6 @@ static int fr_rx(struct sk_buff *skb)
                stats->rx_bytes += skb->len;
                if (pvc->state.becn)
                        stats->rx_compressed++;
-               skb->dev = dev;
                netif_rx(skb);
                return NET_RX_SUCCESS;
        } else {
index fc5c0c6..35eded7 100644 (file)
@@ -999,11 +999,6 @@ get_rx_buf( struct net_device  *dev )
        if( !skb )
                return  NULL;
 
-#ifdef CONFIG_SBNI_MULTILINE
-       skb->dev = ((struct net_local *) dev->priv)->master;
-#else
-       skb->dev = dev;
-#endif
        skb_reserve( skb, 2 );          /* Align IP on longword boundaries */
        return  skb;
 }
index 2ada76a..e50b148 100644 (file)
@@ -3415,10 +3415,8 @@ badrx:
                                skb->pkt_type = PACKET_OTHERHOST;
                                skb->dev = apriv->wifidev;
                                skb->protocol = htons(ETH_P_802_2);
-                       } else {
-                               skb->dev = dev;
+                       } else
                                skb->protocol = eth_type_trans(skb,dev);
-                       }
                        skb->dev->last_rx = jiffies;
                        skb->ip_summed = CHECKSUM_NONE;
 
@@ -3641,7 +3639,6 @@ badmic:
                }
 #endif /* WIRELESS_SPY */
 
-               skb->dev = ai->dev;
                skb->ip_summed = CHECKSUM_NONE;
                skb->protocol = eth_type_trans(skb, ai->dev);
                skb->dev->last_rx = jiffies;
index 4688e56..498e848 100644 (file)
@@ -1500,7 +1500,6 @@ static void arlan_rx_interrupt(struct net_device *dev, u_char rxStatus, u_short
                                break;
                        }
                        skb_reserve(skb, 2);
-                       skb->dev = dev;
                        skbtmp = skb_put(skb, pkt_len);
 
                        memcpy_fromio(skbtmp + ARLAN_FAKE_HDR_LEN, ((char __iomem *) arlan) + rxOffset, pkt_len - ARLAN_FAKE_HDR_LEN);
index 23eba69..1c17cbe 100644 (file)
@@ -920,7 +920,6 @@ static void fast_rx_path(struct atmel_private *priv,
                memcpy(&skbp[6], header->addr2, 6); /* source address */
 
        priv->dev->last_rx = jiffies;
-       skb->dev = priv->dev;
        skb->protocol = eth_type_trans(skb, priv->dev);
        skb->ip_summed = CHECKSUM_NONE;
        netif_rx(skb);
@@ -1028,7 +1027,6 @@ static void frag_rx_path(struct atmel_private *priv,
                                       priv->rx_buf,
                                       priv->frag_len + 12);
                                priv->dev->last_rx = jiffies;
-                               skb->dev = priv->dev;
                                skb->protocol = eth_type_trans(skb, priv->dev);
                                skb->ip_summed = CHECKSUM_NONE;
                                netif_rx(skb);
index 7e04dc9..f78ee26 100644 (file)
@@ -1083,7 +1083,6 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
        if (skb) {
                skb->protocol = eth_type_trans(skb, dev);
                memset(skb->cb, 0, sizeof(skb->cb));
-               skb->dev = dev;
                netif_rx(skb);
        }
 
index a009ab5..45b00e1 100644 (file)
@@ -1283,7 +1283,6 @@ static int netwave_rx(struct net_device *dev)
 
        skb_reserve( skb, 2);  /* Align IP on 16 byte */
        skb_put( skb, rcvLen);
-       skb->dev = dev;
 
        /* Copy packet fragments to the skb data area */
        ptr = (u_char*) skb->data;
index 4e7f6cf..3f9d78d 100644 (file)
@@ -915,7 +915,6 @@ static void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw)
                memcpy(hdr->h_source, desc.addr2, ETH_ALEN);
 
        dev->last_rx = jiffies;
-       skb->dev = dev;
        skb->protocol = eth_type_trans(skb, dev);
        skb->ip_summed = CHECKSUM_NONE;
        if (fc & IEEE80211_FCTL_TODS)
index b112291..fc2e0f3 100644 (file)
@@ -374,10 +374,6 @@ islpci_eth_receive(islpci_private *priv)
        DEBUG(SHOW_BUFFER_CONTENTS, "\nrx %p ", skb->data);
        display_buffer((char *) skb->data, skb->len);
 #endif
-
-       /* do some additional sk_buff and network layer parameters */
-       skb->dev = ndev;
-
        /* take care of monitor mode and spy monitoring. */
        if (unlikely(priv->iw_mode == IW_MODE_MONITOR))
                discard = islpci_monitor_rx(priv, &skb);
index 47b2ccb..9633b04 100644 (file)
@@ -2232,7 +2232,6 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs, unsigned i
         return;
     }
     skb_reserve( skb, 2);   /* Align IP on 16 byte (TBD check this)*/
-    skb->dev = dev;
 
     DEBUG(4,"ray_cs rx_data total_len = %x, rx_len = %x\n",total_len,rx_len);
 
index 2aa3c76..69cb147 100644 (file)
@@ -2512,8 +2512,6 @@ wv_packet_read(struct net_device * dev, u16 buf_off, int sksize)
                return;
        }
 
-       skb->dev = dev;
-
        /* Copy the packet to the buffer. */
        obram_read(ioaddr, buf_off, skb_put(skb, sksize), sksize);
        skb->protocol = eth_type_trans(skb, dev);
index b042397..9351ee7 100644 (file)
@@ -2884,8 +2884,6 @@ wv_packet_read(struct net_device *                dev,
       return;
     }
 
-  skb->dev = dev;
-
   skb_reserve(skb, 2);
   fd_p = read_ringbuf(dev, fd_p, (char *) skb_put(skb, sksize), sksize);
   skb->protocol = eth_type_trans(skb, dev);
index 6cb66a3..1fe013a 100644 (file)
@@ -327,7 +327,6 @@ static void zd1201_usbrx(struct urb *urb)
                        memcpy(skb_put(skb, 6), &data[datalen-8], 6);
                        memcpy(skb_put(skb, 2), &data[datalen-24], 2);
                        memcpy(skb_put(skb, len), data, len);
-                       skb->dev = zd->dev;
                        skb->dev->last_rx = jiffies;
                        skb->protocol = eth_type_trans(skb, zd->dev);
                        zd->stats.rx_packets++;
@@ -385,7 +384,6 @@ static void zd1201_usbrx(struct urb *urb)
                        memcpy(skb_put(skb, 2), &data[6], 2);
                        memcpy(skb_put(skb, len), data+8, len);
                }
-               skb->dev = zd->dev;
                skb->dev->last_rx = jiffies;
                skb->protocol = eth_type_trans(skb, zd->dev);
                zd->stats.rx_packets++;
index 2412ce4..3f4a7cf 100644 (file)
@@ -1137,7 +1137,6 @@ static int yellowfin_rx(struct net_device *dev)
                                skb = dev_alloc_skb(pkt_len + 2);
                                if (skb == NULL)
                                        break;
-                               skb->dev = dev;
                                skb_reserve(skb, 2);    /* 16 byte align the IP header */
                                eth_copy_and_sum(skb, rx_skb->data, pkt_len, 0);
                                skb_put(skb, pkt_len);
index b24b072..4032e9f 100644 (file)
@@ -774,7 +774,6 @@ static void znet_rx(struct net_device *dev)
                                znet->stats.rx_dropped++;
                                break;
                        }
-                       skb->dev = dev;
 
                        if (&znet->rx_cur[(pkt_len+1)>>1] > znet->rx_end) {
                                int semi_cnt = (znet->rx_end - znet->rx_cur)<<1;
index 04e6b85..8f9f217 100644 (file)
@@ -1766,7 +1766,6 @@ static void rx_complete (struct usb_ep *ep, struct usb_request *req)
                        break;
                }
 
-               skb->dev = dev->net;
                skb->protocol = eth_type_trans (skb, dev->net);
                dev->stats.rx_packets++;
                dev->stats.rx_bytes += skb->len;
index 4852012..d82022d 100644 (file)
@@ -255,7 +255,6 @@ static void catc_rx_done(struct urb *urb)
                if (!(skb = dev_alloc_skb(pkt_len)))
                        return;
 
-               skb->dev = catc->netdev;
                eth_copy_and_sum(skb, pkt_start + pkt_offset, pkt_len, 0);
                skb_put(skb, pkt_len);
 
index de95268..a0cc05d 100644 (file)
@@ -636,8 +636,6 @@ static void kaweth_usb_receive(struct urb *urb)
 
                skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
 
-               skb->dev = net;
-
                eth_copy_and_sum(skb, kaweth->rx_buf + 2, pkt_len, 0);
 
                skb_put(skb, pkt_len);
index 6d12961..13f70e0 100644 (file)
@@ -575,7 +575,6 @@ static void fill_skb_pool(pegasus_t * pegasus)
                 */
                if (pegasus->rx_pool[i] == NULL)
                        return;
-               pegasus->rx_pool[i]->dev = pegasus->net;
                skb_reserve(pegasus->rx_pool[i], 2);
        }
 }
@@ -1415,8 +1414,10 @@ static void pegasus_disconnect(struct usb_interface *intf)
        unlink_all_urbs(pegasus);
        free_all_urbs(pegasus);
        free_skb_pool(pegasus);
-       if (pegasus->rx_skb)
+       if (pegasus->rx_skb != NULL) {
                dev_kfree_skb(pegasus->rx_skb);
+               pegasus->rx_skb = NULL;
+       }
        free_netdev(pegasus->net);
 }
 
index ea153dc..fa598f0 100644 (file)
@@ -646,7 +646,6 @@ static void fill_skb_pool(rtl8150_t *dev)
                if (!skb) {
                        return;
                }
-               skb->dev = dev->netdev;
                skb_reserve(skb, 2);
                dev->rx_skb_pool[i] = skb;
        }
index de69b18..0c5465a 100644 (file)
@@ -203,7 +203,6 @@ void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb)
 {
        int     status;
 
-       skb->dev = dev->net;
        skb->protocol = eth_type_trans (skb, dev->net);
        dev->stats.rx_packets++;
        dev->stats.rx_bytes += skb->len;
index e5ed878..d339645 100644 (file)
@@ -831,10 +831,7 @@ static void lec_push(struct atm_vcc *vcc, struct sk_buff *skb)
                        skb->protocol = tr_type_trans(skb, dev);
                else
 #endif
-               {
-                       skb->dev = dev;
                        skb->protocol = eth_type_trans(skb, dev);
-               }
                priv->stats.rx_packets++;
                priv->stats.rx_bytes += skb->len;
                memset(ATM_SKB(skb), 0, sizeof(struct atm_skb_data));
index b85d149..f7ade18 100644 (file)
@@ -383,7 +383,6 @@ static inline int bnep_rx_frame(struct bnep_session *s, struct sk_buff *skb)
        kfree_skb(skb);
 
        s->stats.rx_packets++;
-       nskb->dev       = dev;
        nskb->ip_summed = CHECKSUM_NONE;
        nskb->protocol  = eth_type_trans(nskb, dev);
        netif_rx_ni(nskb);
index 41c5065..01ecbe4 100644 (file)
@@ -156,6 +156,7 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
        struct ethhdr *eth;
        unsigned char *rawp;
 
+       skb->dev = dev;
        skb->mac.raw = skb->data;
        skb_pull(skb, ETH_HLEN);
        eth = eth_hdr(skb);
index 4084909..d5f5c66 100644 (file)
@@ -800,7 +800,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
        if (skb) {
                skb->protocol = eth_type_trans(skb, dev);
                memset(skb->cb, 0, sizeof(skb->cb));
-               skb->dev = dev;
                skb->ip_summed = CHECKSUM_NONE; /* 802.11 crc not sufficient */
                if (netif_rx(skb) == NET_RX_DROP) {
                        /* netif_rx always succeeds, but it might drop
index 672ab3f..c421521 100644 (file)
@@ -234,8 +234,7 @@ int irlan_eth_receive(void *instance, void *sap, struct sk_buff *skb)
         * might have been previously set by the low level IrDA network
         * device driver
         */
-       skb->dev = self->dev;
-       skb->protocol=eth_type_trans(skb, skb->dev); /* Remove eth header */
+       skb->protocol = eth_type_trans(skb, self->dev); /* Remove eth header */
 
        self->stats.rx_packets++;
        self->stats.rx_bytes += skb->len;