[ETH]: indentation and cleanup

Run ethernet support through Lindent and fix up.
Applies after docbook comments patch

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Stephen Hemminger 2006-08-17 18:20:18 -07:00 committed by David S. Miller
parent d3e01f7186
commit 2e4ca75b31

View file

@ -95,8 +95,7 @@ int eth_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
saddr = dev->dev_addr;
memcpy(eth->h_source, saddr, dev->addr_len);
if(daddr)
{
if (daddr) {
memcpy(eth->h_dest, daddr, dev->addr_len);
return ETH_HLEN;
}
@ -105,8 +104,7 @@ int eth_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
* Anyway, the loopback-device should never use this function...
*/
if (dev->flags & (IFF_LOOPBACK|IFF_NOARP))
{
if (dev->flags & (IFF_LOOPBACK | IFF_NOARP)) {
memset(eth->h_dest, 0, dev->addr_len);
return ETH_HLEN;
}
@ -129,8 +127,7 @@ int eth_rebuild_header(struct sk_buff *skb)
struct ethhdr *eth = (struct ethhdr *)skb->data;
struct net_device *dev = skb->dev;
switch (eth->h_proto)
{
switch (eth->h_proto) {
#ifdef CONFIG_INET
case __constant_htons(ETH_P_IP):
return arp_find(eth->h_dest, skb);
@ -147,7 +144,6 @@ int eth_rebuild_header(struct sk_buff *skb)
return 0;
}
/**
* eth_type_trans - determine the packet's protocol ID.
* @skb: received socket data
@ -205,6 +201,7 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
*/
return htons(ETH_P_802_2);
}
EXPORT_SYMBOL(eth_type_trans);
/**
* eth_header_parse - extract hardware address from packet
@ -251,14 +248,13 @@ int eth_header_cache(struct neighbour *neigh, struct hh_cache *hh)
*
* Called by Address Resolution module to notify changes in address.
*/
void eth_header_cache_update(struct hh_cache *hh, struct net_device *dev, unsigned char * haddr)
void eth_header_cache_update(struct hh_cache *hh, struct net_device *dev,
unsigned char *haddr)
{
memcpy(((u8 *) hh->hh_data) + HH_DATA_OFF(sizeof(struct ethhdr)),
haddr, dev->addr_len);
}
EXPORT_SYMBOL(eth_type_trans);
/**
* eth_mac_addr - set new Ethernet hardware address
* @dev: network device