]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[TR]: Make tr_type_trans set skb->dev
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 19 Mar 2007 22:29:16 +0000 (15:29 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:24:24 +0000 (22:24 -0700)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tokenring/3c359.c
drivers/net/tokenring/ibmtr.c
drivers/net/tokenring/lanstreamer.c
drivers/net/tokenring/olympic.c
drivers/net/tokenring/smctr.c
drivers/net/tokenring/tms380tr.c
net/802/tr.c
net/atm/lec.c

index 7580bdeacadcedca4d168293add3e9388ad8470a..d293423ee8e376365958537daf07b24e46611e6e 100644 (file)
@@ -933,8 +933,6 @@ static void xl_rx(struct net_device *dev)
                                return ;                                
                        }
        
-                       skb->dev = dev ; 
-
                        while (xl_priv->rx_ring_tail != temp_ring_loc) { 
                                copy_len = xl_priv->xl_rx_ring[xl_priv->rx_ring_tail].upfraglen & 0x7FFF ; 
                                frame_length -= copy_len ;  
@@ -967,8 +965,6 @@ static void xl_rx(struct net_device *dev)
                                return ; 
                        }
 
-                       skb->dev = dev ; 
-
                        skb2 = xl_priv->rx_ring_skb[xl_priv->rx_ring_tail] ; 
                        pci_unmap_single(xl_priv->pdev, xl_priv->xl_rx_ring[xl_priv->rx_ring_tail].upfragaddr, xl_priv->pkt_buf_sz,PCI_DMA_FROMDEVICE) ; 
                        skb_put(skb2, frame_length) ; 
index 01d55315ee8c4d701da9edb0439a5c80ed0fa222..1e8958ee2d0ab5905897c088d493f077ed732886 100644 (file)
@@ -1771,7 +1771,6 @@ static void tr_rx(struct net_device *dev)
        /*BMS again, if she comes in with few but leaves with many */
        skb_reserve(skb, sizeof(struct trh_hdr) - lan_hdr_len);
        skb_put(skb, length);
-       skb->dev = dev;
        data = skb->data;
        rbuffer_len = ntohs(readw(rbuf + offsetof(struct rec_buf, buf_len)));
        rbufdata = rbuf + offsetof(struct rec_buf, data);
index 5e1b884e10c10b8653c4a940e43872bd30a047e5..5d849c089a3b62776df3a8a54cd84f997ebaed4b 100644 (file)
@@ -944,8 +944,6 @@ static void streamer_rx(struct net_device *dev)
                                printk(KERN_WARNING "%s: Not enough memory to copy packet to upper layers. \n", dev->name);
                                streamer_priv->streamer_stats.rx_dropped++;
                        } else {        /* we allocated an skb OK */
-                               skb->dev = dev;
-
                                if (buffer_cnt == 1) {
                                        /* release the DMA mapping */
                                        pci_unmap_single(streamer_priv->pci_dev, 
@@ -1607,7 +1605,6 @@ static void streamer_arb_cmd(struct net_device *dev)
                                      frame_data, buffer_len);
                } while (next_ptr && (buff_off = next_ptr));
 
-               mac_frame->dev = dev;
                mac_frame->protocol = tr_type_trans(mac_frame, dev);
 #if STREAMER_NETWORK_MONITOR
                printk(KERN_WARNING "%s: Received MAC Frame, details: \n",
index 683186afcab0e8728835a7dae0b9e07807516104..a62065808881e5a13ccfdf40195b5429de27f9f9 100644 (file)
@@ -814,8 +814,6 @@ static void olympic_rx(struct net_device *dev)
                                        olympic_priv->rx_ring_last_received += i ; 
                                        olympic_priv->rx_ring_last_received &= (OLYMPIC_RX_RING_SIZE -1) ;  
                                } else  {
-                                       skb->dev = dev ; 
-
                                        /* Optimise based upon number of buffers used. 
                                           If only one buffer is used we can simply swap the buffers around.
                                           If more than one then we must use the new buffer and copy the information
@@ -1440,7 +1438,6 @@ static void olympic_arb_cmd(struct net_device *dev)
                        next_ptr=readw(buf_ptr+offsetof(struct mac_receive_buffer,next)); 
                } while (next_ptr && (buf_ptr=olympic_priv->olympic_lap + ntohs(next_ptr)));
 
-               mac_frame->dev = dev;
                mac_frame->protocol = tr_type_trans(mac_frame, dev);
 
                if (olympic_priv->olympic_network_monitor) { 
index cec282a6f62d40b7ded07994bff8e3e729503227..b0296d80e46c7e2710f06591dd9ed6a4c89eb04a 100644 (file)
@@ -3896,7 +3896,6 @@ static int smctr_process_rx_packet(MAC_HEADER *rmf, __u16 size,
                 tp->MacStat.rx_bytes += skb->len;
 
                 /* Kick the packet on up. */
-                skb->dev = dev;
                 skb->protocol = tr_type_trans(skb, dev);
                 netif_rx(skb);
                dev->last_rx = jiffies;
@@ -4483,7 +4482,6 @@ static int smctr_rx_frame(struct net_device *dev)
                                        tp->MacStat.rx_bytes += skb->len;
 
                                        /* Kick the packet on up. */
-                                       skb->dev = dev;
                                        skb->protocol = tr_type_trans(skb, dev);
                                        netif_rx(skb);
                                        dev->last_rx = jiffies;
index ea797ca2b9880096f36cb864518de4dc6ad64514..de6f72775eccff849de67945a145378ac1265698 100644 (file)
@@ -2168,7 +2168,6 @@ static void tms380tr_rcv_status_irq(struct net_device *dev)
                                }
                                else
                                {
-                                       skb->dev        = dev;
                                        skb_put(skb, tp->MaxPacketSize);
                                        rpl->SkbStat    = SKB_DATA_COPY;
                                        ReceiveDataPtr  = rpl->MData;
index a6a6d46e708ccfb4ebd5deca6d18dc3f7bd574eb..987d91559bccf4034927d7942302b0ba9f74d319 100644 (file)
@@ -193,6 +193,7 @@ __be16 tr_type_trans(struct sk_buff *skb, struct net_device *dev)
        struct trllc *trllc;
        unsigned riflen=0;
 
+       skb->dev = dev;
        skb->mac.raw = skb->data;
        trh = tr_hdr(skb);
 
index 3d804d61f6569e0ea0b0963d0abd50bc12204575..e5ed878c8825225da1e67bb4d360268c272e788b 100644 (file)
@@ -825,14 +825,16 @@ static void lec_push(struct atm_vcc *vcc, struct sk_buff *skb)
                if (!hlist_empty(&priv->lec_arp_empty_ones)) {
                        lec_arp_check_empties(priv, vcc, skb);
                }
-               skb->dev = dev;
                skb_pull(skb, 2);       /* skip lec_id */
 #ifdef CONFIG_TR
                if (priv->is_trdev)
                        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));