X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fethernet%2Feth.c;h=87a052a9a84f9b4025ebf430f0c6197afd3a759c;hb=3cb904caa97f5c193df21b8cdf780a826564baff;hp=6617ea47d3656a6b6c6cfa94e546c12dc9648f8e;hpb=ad34ea2cc3845ef4dcd7d12fb0fa8484734bd672;p=linux-2.6 diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index 6617ea47d3..87a052a9a8 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c @@ -62,8 +62,6 @@ #include #include -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) {