diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-06-15 18:14:02 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-15 20:07:49 +0200 |
commit | 7ec60d6e2c400700c740849c9c980aa46499aab4 (patch) | |
tree | 040c211cf6da422d6f11714c97838fdfd9efa5ac /drivers/net/dsa/mv88e6xxx/chip.c | |
parent | net: dsa: mv88e6xxx: prefix Global ATU macros (diff) | |
download | linux-7ec60d6e2c400700c740849c9c980aa46499aab4.tar.xz linux-7ec60d6e2c400700c740849c9c980aa46499aab4.zip |
net: dsa: mv88e6xxx: prefix Global VTU macros
Prefix and document the Global VTU registers macros and give a clear
16-bit registers representation.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/chip.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 066fa63c6b6e..f2ce054913e4 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -1047,7 +1047,8 @@ static int mv88e6xxx_port_vlan_dump(struct dsa_switch *ds, int port, if (!next.valid) break; - if (next.member[port] == GLOBAL_VTU_DATA_MEMBER_TAG_NON_MEMBER) + if (next.member[port] == + MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_NON_MEMBER) continue; /* reinit and dump this VLAN obj */ @@ -1055,7 +1056,8 @@ static int mv88e6xxx_port_vlan_dump(struct dsa_switch *ds, int port, vlan->vid_end = next.vid; vlan->flags = 0; - if (next.member[port] == GLOBAL_VTU_DATA_MEMBER_TAG_UNTAGGED) + if (next.member[port] == + MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNTAGGED) vlan->flags |= BRIDGE_VLAN_INFO_UNTAGGED; if (next.vid == pvid) @@ -1143,7 +1145,7 @@ static int mv88e6xxx_vtu_get(struct mv88e6xxx_chip *chip, u16 vid, /* Exclude all ports */ for (i = 0; i < mv88e6xxx_num_ports(chip); ++i) entry->member[i] = - GLOBAL_VTU_DATA_MEMBER_TAG_NON_MEMBER; + MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_NON_MEMBER; return mv88e6xxx_atu_new(chip, &entry->fid); } @@ -1185,7 +1187,7 @@ static int mv88e6xxx_port_check_hw_vlan(struct dsa_switch *ds, int port, continue; if (vlan.member[i] == - GLOBAL_VTU_DATA_MEMBER_TAG_NON_MEMBER) + MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_NON_MEMBER) continue; if (ds->ports[i].bridge_dev == @@ -1281,11 +1283,11 @@ static void mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port, return; if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port)) - member = GLOBAL_VTU_DATA_MEMBER_TAG_UNMODIFIED; + member = MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNMODIFIED; else if (untagged) - member = GLOBAL_VTU_DATA_MEMBER_TAG_UNTAGGED; + member = MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNTAGGED; else - member = GLOBAL_VTU_DATA_MEMBER_TAG_TAGGED; + member = MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_TAGGED; mutex_lock(&chip->reg_lock); @@ -1312,15 +1314,16 @@ static int _mv88e6xxx_port_vlan_del(struct mv88e6xxx_chip *chip, return err; /* Tell switchdev if this VLAN is handled in software */ - if (vlan.member[port] == GLOBAL_VTU_DATA_MEMBER_TAG_NON_MEMBER) + if (vlan.member[port] == MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_NON_MEMBER) return -EOPNOTSUPP; - vlan.member[port] = GLOBAL_VTU_DATA_MEMBER_TAG_NON_MEMBER; + vlan.member[port] = MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_NON_MEMBER; /* keep the VLAN unless all ports are excluded */ vlan.valid = false; for (i = 0; i < mv88e6xxx_num_ports(chip); ++i) { - if (vlan.member[i] != GLOBAL_VTU_DATA_MEMBER_TAG_NON_MEMBER) { + if (vlan.member[i] != + MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_NON_MEMBER) { vlan.valid = true; break; } |