[NET]: Fix sparse warnings
[safe/jmp/linux-2.6] / net / ethernet / eth.c
index 6617ea4..87a052a 100644 (file)
@@ -62,8 +62,6 @@
 #include <asm/system.h>
 #include <asm/checksum.h>
 
-extern int __init netdev_boot_setup(char *str);
-
 __setup("ether=", netdev_boot_setup);
 
 /*
@@ -92,10 +90,9 @@ int eth_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
         *      Set the source hardware address. 
         */
         
-       if(saddr)
-               memcpy(eth->h_source,saddr,dev->addr_len);
-       else
-               memcpy(eth->h_source,dev->dev_addr,dev->addr_len);
+       if(!saddr)
+               saddr = dev->dev_addr;
+       memcpy(eth->h_source,saddr,dev->addr_len);
 
        /*
         *      Anyway, the loopback-device should never use this function... 
@@ -156,7 +153,7 @@ int eth_rebuild_header(struct sk_buff *skb)
  *     This is normal practice and works for any 'now in use' protocol.
  */
  
-unsigned short eth_type_trans(struct sk_buff *skb, struct net_device *dev)
+__be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        struct ethhdr *eth;
        unsigned char *rawp;
@@ -164,7 +161,6 @@ unsigned short eth_type_trans(struct sk_buff *skb, struct net_device *dev)
        skb->mac.raw=skb->data;
        skb_pull(skb,ETH_HLEN);
        eth = eth_hdr(skb);
-       skb->input_dev = dev;
        
        if(*eth->h_dest&1)
        {