summaryrefslogtreecommitdiff
path: root/net/hsr/hsr_slave.c
diff options
context:
space:
mode:
authorPeter Heise <mail@pheise.de>2016-04-13 14:52:22 +0300
committerDavid S. Miller <davem@davemloft.net>2016-04-16 00:06:48 +0300
commitee1c27977284907d40f7f72c2d078d709f15811f (patch)
tree58c578e321dd8baad0af86ecaf41e6e2f34ddb34 /net/hsr/hsr_slave.c
parent125c8d1233b7dd4688f14dd992d724c20d055dee (diff)
downloadlinux-ee1c27977284907d40f7f72c2d078d709f15811f.tar.xz
net/hsr: Added support for HSR v1
This patch adds support for the newer version 1 of the HSR networking standard. Version 0 is still default and the new version has to be selected via iproute2. Main changes are in the supervision frame handling and its ethertype field. Signed-off-by: Peter Heise <peter.heise@airbus.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr/hsr_slave.c')
-rw-r--r--net/hsr/hsr_slave.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
index 7d37366cc695..f5b60388d02f 100644
--- a/net/hsr/hsr_slave.c
+++ b/net/hsr/hsr_slave.c
@@ -22,6 +22,7 @@ static rx_handler_result_t hsr_handle_frame(struct sk_buff **pskb)
{
struct sk_buff *skb = *pskb;
struct hsr_port *port;
+ u16 protocol;
if (!skb_mac_header_was_set(skb)) {
WARN_ONCE(1, "%s: skb invalid", __func__);
@@ -37,7 +38,8 @@ static rx_handler_result_t hsr_handle_frame(struct sk_buff **pskb)
goto finish_consume;
}
- if (eth_hdr(skb)->h_proto != htons(ETH_P_PRP))
+ protocol = eth_hdr(skb)->h_proto;
+ if (protocol != htons(ETH_P_PRP) && protocol != htons(ETH_P_HSR))
goto finish_pass;
skb_push(skb, ETH_HLEN);