Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e4ca75b authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller
Browse files

[ETH]: indentation and cleanup



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

Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d3e01f71
Loading
Loading
Loading
Loading
+46 −50
Original line number Diff line number Diff line
@@ -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