net/hsr: Better frame dispatch

This patch removes the separate paths for frames coming from the outside, and
frames sent from the HSR device, and instead makes all frames go through
hsr_forward_skb() in hsr_forward.c. This greatly improves code readability and
also opens up the possibility for future support of the HSR Interlink device
that is the basis for HSR RedBoxes and HSR QuadBoxes, as well as VLAN
compatibility.

Other improvements:
* A reduction in the number of times an skb is copied on machines without
  HAVE_EFFICIENT_UNALIGNED_ACCESS, which improves throughput somewhat.
* Headers are now created using the standard eth_header(), and using the
  standard hard_header_len.
* Each HSR slave now gets its own private skb, so slave-specific fields can be
  correctly set.

Signed-off-by: Arvid Brodin <arvid.brodin@alten.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/hsr/hsr_slave.h b/net/hsr/hsr_slave.h
index 3055022..3ccfbf7 100644
--- a/net/hsr/hsr_slave.h
+++ b/net/hsr/hsr_slave.h
@@ -20,17 +20,7 @@
 int hsr_add_port(struct hsr_priv *hsr, struct net_device *dev,
 		 enum hsr_port_type pt);
 void hsr_del_port(struct hsr_port *port);
-rx_handler_result_t hsr_handle_frame(struct sk_buff **pskb);
-
-
-#define hsr_for_each_port(hsr, port) \
-	list_for_each_entry_rcu((port), &(hsr)->ports, port_list)
-
-
-static inline bool hsr_port_exists(const struct net_device *dev)
-{
-	return dev->rx_handler == hsr_handle_frame;
-}
+bool hsr_port_exists(const struct net_device *dev);
 
 static inline struct hsr_port *hsr_port_get_rtnl(const struct net_device *dev)
 {