aboutsummaryrefslogtreecommitdiffstats
path: root/net/hsr/hsr_framereg.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-06-27 07:24:49 +1000
committerDave Airlie <airlied@redhat.com>2017-06-27 08:28:30 +1000
commit6d61e70ccc21606ffb8a0a03bd3aba24f659502b (patch)
tree69f5bfb29d085cc42839445d34170bd3ee4f7408 /net/hsr/hsr_framereg.c
parentMerge tag 'hdlcd-for-v4.13-v3' of git://linux-arm.org/linux-ld into drm-next (diff)
parentLinux 4.12-rc7 (diff)
downloadlinux-dev-6d61e70ccc21606ffb8a0a03bd3aba24f659502b.tar.xz
linux-dev-6d61e70ccc21606ffb8a0a03bd3aba24f659502b.zip
Backmerge tag 'v4.12-rc7' into drm-next
Linux 4.12-rc7 Needed at least rc6 for drm-misc-next-fixes, may as well go to rc7
Diffstat (limited to 'net/hsr/hsr_framereg.c')
-rw-r--r--net/hsr/hsr_framereg.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c
index 7ea925816f79..284a9b820df8 100644
--- a/net/hsr/hsr_framereg.c
+++ b/net/hsr/hsr_framereg.c
@@ -158,9 +158,10 @@ struct hsr_node *hsr_add_node(struct list_head *node_db, unsigned char addr[],
/* Get the hsr_node from which 'skb' was sent.
*/
-struct hsr_node *hsr_get_node(struct list_head *node_db, struct sk_buff *skb,
+struct hsr_node *hsr_get_node(struct hsr_port *port, struct sk_buff *skb,
bool is_sup)
{
+ struct list_head *node_db = &port->hsr->node_db;
struct hsr_node *node;
struct ethhdr *ethhdr;
u16 seq_out;
@@ -186,7 +187,11 @@ struct hsr_node *hsr_get_node(struct list_head *node_db, struct sk_buff *skb,
*/
seq_out = hsr_get_skb_sequence_nr(skb) - 1;
} else {
- WARN_ONCE(1, "%s: Non-HSR frame\n", __func__);
+ /* this is called also for frames from master port and
+ * so warn only for non master ports
+ */
+ if (port->type != HSR_PT_MASTER)
+ WARN_ONCE(1, "%s: Non-HSR frame\n", __func__);
seq_out = HSR_SEQNR_START;
}