Commit ff593c59 authored by Denis Vlasenko's avatar Denis Vlasenko Committed by David S. Miller

[NET]: Micro optimization in eth_header()

Signed-off-by: default avatarDenis Vlasenko <vda@ilport.com.ua>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7fe40f73
...@@ -92,10 +92,9 @@ int eth_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, ...@@ -92,10 +92,9 @@ int eth_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
* Set the source hardware address. * Set the source hardware address.
*/ */
if(saddr) if(!saddr)
memcpy(eth->h_source,saddr,dev->addr_len); saddr = dev->dev_addr;
else memcpy(eth->h_source,saddr,dev->addr_len);
memcpy(eth->h_source,dev->dev_addr,dev->addr_len);
/* /*
* Anyway, the loopback-device should never use this function... * Anyway, the loopback-device should never use this function...
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment