Home
last modified time | relevance | path

Searched hist:e2b2e83e52f756decbaacd8202f28745bab49e07 (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/include/soc/mscc/
H A Docelot.hdiff e2b2e83e52f756decbaacd8202f28745bab49e07 Sat Oct 31 05:29:13 CDT 2020 Vladimir Oltean <vladimir.oltean@nxp.com> net: mscc: ocelot: add a "valid" boolean to struct ocelot_vlan

Currently we are checking in some places whether the port has a native
VLAN on egress or not, by comparing the ocelot_port->vid value with zero.

That works, because VID 0 can never be a native VLAN configured by the
bridge, but now we want to make similar checks for the pvid. That won't
work, because there are cases when we do have the pvid set to 0 (not by
the bridge, by ourselves, but still.. it's confusing). And we can't
encode a negative value into an u16, so add a bool to the structure.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/openbmc/linux/drivers/net/ethernet/mscc/
H A Docelot.cdiff e2b2e83e52f756decbaacd8202f28745bab49e07 Sat Oct 31 05:29:13 CDT 2020 Vladimir Oltean <vladimir.oltean@nxp.com> net: mscc: ocelot: add a "valid" boolean to struct ocelot_vlan

Currently we are checking in some places whether the port has a native
VLAN on egress or not, by comparing the ocelot_port->vid value with zero.

That works, because VID 0 can never be a native VLAN configured by the
bridge, but now we want to make similar checks for the pvid. That won't
work, because there are cases when we do have the pvid set to 0 (not by
the bridge, by ourselves, but still.. it's confusing). And we can't
encode a negative value into an u16, so add a bool to the structure.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>