]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: allow switches to work without tagging
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 28 Aug 2014 00:04:52 +0000 (17:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Aug 2014 05:59:40 +0000 (22:59 -0700)
commita6ca7599958c2f3aaccfbc7fcaf2c04a72056fc9
treec2a68a4275a8aefb66c4d1e359d76704c6894817
parentd2ef8618baf2645c8d9a19171645f6536ae8db87
net: dsa: allow switches to work without tagging

In case switch port tagging is disabled (voluntarily, or the switch just
does not support it), allow us to continue using the defined set of
dsa_device_ops in net/dsa/slave.c.

We introduce dsa_protocol_is_tagged() to check whether we need to
override skb->protocol and go through the DSA-specifif packet_type
function, or if we just go on and receive the SKB through the normal
path.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
include/net/dsa.h
net/dsa/slave.c