diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2020-05-12 20:20:26 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-12 23:08:07 +0300 |
commit | 1f66b0f0aec671f8fbc86d75b2efdf7c7e0f7880 (patch) | |
tree | 391a0b292f8a28f898f4e43ac7cd90a32a1677ff /include | |
parent | 54a0ed0df49609f4e3f098f8943e38e389dc2e15 (diff) | |
download | linux-1f66b0f0aec671f8fbc86d75b2efdf7c7e0f7880.tar.xz |
net: dsa: tag_8021q: introduce a vid_is_dsa_8021q helper
This function returns a boolean denoting whether the VLAN passed as
argument is part of the 1024-3071 range that the dsa_8021q tagging
scheme uses.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dsa/8021q.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/dsa/8021q.h b/include/linux/dsa/8021q.h index b8daaec0896e..ebc245ff838a 100644 --- a/include/linux/dsa/8021q.h +++ b/include/linux/dsa/8021q.h @@ -50,6 +50,8 @@ int dsa_8021q_rx_switch_id(u16 vid); int dsa_8021q_rx_source_port(u16 vid); +bool vid_is_dsa_8021q(u16 vid); + #else int dsa_port_setup_8021q_tagging(struct dsa_switch *ds, int index, @@ -107,6 +109,11 @@ int dsa_8021q_rx_source_port(u16 vid) return 0; } +bool vid_is_dsa_8021q(u16 vid) +{ + return false; +} + #endif /* IS_ENABLED(CONFIG_NET_DSA_TAG_8021Q) */ #endif /* _NET_DSA_8021Q_H */ |