aboutsummaryrefslogtreecommitdiffstats
path: root/include/soc/mscc/ocelot.h
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-10-20 20:58:52 +0300
committerDavid S. Miller <davem@davemloft.net>2021-10-21 12:14:29 +0100
commitd4004422f6f9fa8e55c04482008c1c9f9edd2d19 (patch)
tree69f90992ad618bc9e25e5538d8686b314eb5e779 /include/soc/mscc/ocelot.h
parentnet: mscc: ocelot: add the local station MAC addresses in VID 0 (diff)
downloadlinux-dev-d4004422f6f9fa8e55c04482008c1c9f9edd2d19.tar.xz
linux-dev-d4004422f6f9fa8e55c04482008c1c9f9edd2d19.zip
net: mscc: ocelot: track the port pvid using a pointer
Now that we have a list of struct ocelot_bridge_vlan entries, we can rewrite the pvid logic to simply point to one of those structures, instead of having a separate structure with a "bool valid". The NULL pointer will represent the lack of a bridge pvid (not to be confused with the lack of a hardware pvid on the port, that is present at all times). Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/soc/mscc/ocelot.h')
-rw-r--r--include/soc/mscc/ocelot.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index b8b1ac943b44..9b872da0c246 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -563,11 +563,6 @@ struct ocelot_vcap_block {
int pol_lpr;
};
-struct ocelot_vlan {
- bool valid;
- u16 vid;
-};
-
struct ocelot_bridge_vlan {
u16 vid;
unsigned long portmask;
@@ -608,7 +603,7 @@ struct ocelot_port {
bool vlan_aware;
/* VLAN that untagged frames are classified to, on ingress */
- struct ocelot_vlan pvid_vlan;
+ const struct ocelot_bridge_vlan *pvid_vlan;
unsigned int ptp_skbs_in_flight;
u8 ptp_cmd;