linux/drivers/net/dsa
Matthias Schiffer c25c961fc7 net: dsa: mt7530: factor out bridge join/leave logic
As preparation for implementing bridge port isolation, move the logic to
add and remove bits in the port matrix into a new helper
mt7530_update_port_member(), which is called from
mt7530_port_bridge_join() and mt7530_port_bridge_leave().

Another part of the preparation is using dsa_port_offloads_bridge_dev()
instead of dsa_port_offloads_bridge() to check for bridge membership, as
we don't have a struct dsa_bridge in mt7530_port_bridge_flags().

The port matrix setting is slightly streamlined, now always first setting
the mt7530_port's pm field and then writing the port matrix from that
field into the hardware register, instead of duplicating the bit
manipulation for both the struct field and the register.

mt7530_port_bridge_join() was previously using |= to update the port
matrix with the port bitmap, which was unnecessary, as pm would only
have the CPU port set before joining a bridge; a simple assignment can
be used for both joining and leaving (and will also work when individual
bits are added/removed in port_bitmap with regard to the previous port
matrix, which is what happens with port isolation).

No functional change intended.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-06-19 13:10:01 +01:00
..
b53 net: dsa: b53: provide own phylink MAC operations 2024-04-25 11:46:38 -07:00
hirschmann net: dsa: hellcreek: Replace kernel.h with what is used 2024-06-10 13:13:02 +01:00
microchip net: dsa: microchip: fix RGMII error in KSZ DSA driver 2024-05-29 18:44:36 -07:00
mv88e6xxx tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
ocelot net: dsa: ocelot: unexport felix_phylink_mac_ops and felix_switch_ops 2024-06-03 13:06:16 +01:00
qca net dsa: qca8k: fix usages of device_get_named_child_node() 2024-06-10 13:12:14 +01:00
realtek net: dsa: realtek: provide own phylink MAC operations 2024-04-30 13:50:01 +02:00
sja1105 net: dsa: sja1105: flower: validate control flags 2024-04-18 17:08:37 -07:00
xrs700x net: dsa: xrs700x: fix missing initialisation of ds->phylink_mac_ops 2024-04-19 12:11:17 +01:00
bcm_sf2_cfp.c net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
bcm_sf2_regs.h net: dsa: bcm_sf2: refactor LED regs access 2021-12-30 17:28:32 -08:00
bcm_sf2.c net: dsa: bcm_sf2: provide own phylink MAC operations 2024-04-17 18:27:42 -07:00
bcm_sf2.h net: dsa: bcm_sf2: drop priv->master_mii_dn 2024-01-05 11:56:36 +00:00
dsa_loop_bdinfo.c net: fill in MODULE_DESCRIPTION()s for dsa_loop_bdinfo 2024-02-09 14:12:02 -08:00
dsa_loop.c net: dsa: dsa_loop: add phylink capabilities 2023-10-11 10:06:05 +01:00
dsa_loop.h
Kconfig net: dsa: lan9303: imply SMSC_PHY 2024-05-29 17:11:45 -07:00
lan9303_i2c.c net: dsa: Switch i2c drivers back to use .probe() 2023-05-31 09:52:55 +01:00
lan9303_mdio.c net: dsa: lan9303: consequently nested-lock physical MDIO 2023-11-02 10:48:09 +01:00
lan9303-core.c net: dsa: lan9303: use ethtool_puts() for lan9303_get_strings() 2024-04-26 12:37:02 -07:00
lan9303.h net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lantiq_gswip.c net: dsa: lantiq_gswip: Improve error message in gswip_port_fdb() 2024-06-13 17:07:11 -07:00
lantiq_pce.h net: dsa: Use the correct style for SPDX License Identifier 2019-09-22 15:25:08 -07:00
Makefile net: dsa: mt7530: introduce driver for MT7988 built-in switch 2023-04-03 10:13:01 +01:00
mt7530-mdio.c net: dsa: mt7530-mdio: read PHY address of switch from device tree 2024-04-23 10:32:40 +02:00
mt7530-mmio.c net: dsa: mt7530: Convert to platform remove callback returning void 2023-09-20 10:25:57 +01:00
mt7530.c net: dsa: mt7530: factor out bridge join/leave logic 2024-06-19 13:10:01 +01:00
mt7530.h net: dsa: mt7530: get rid of mac_port_validate member of mt753x_info 2024-04-24 11:57:03 +01:00
mv88e6060.c net: dsa: mv88e6060: add phylink_get_caps implementation 2023-08-14 18:57:17 -07:00
mv88e6060.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
rzn1_a5psw.c net: dsa: rzn1_a5psw: provide own phylink MAC operations 2024-04-17 18:29:30 -07:00
rzn1_a5psw.h net: dsa: rzn1-a5psw: add vlan support 2023-08-11 11:58:36 +01:00
vitesse-vsc73xx-core.c net: dsa: vsc73xx: Add define for max num of ports 2024-04-22 14:21:32 -07:00
vitesse-vsc73xx-platform.c net: dsa: vitesse-vsc73xx: Convert to platform remove callback returning void 2023-09-20 10:25:58 +01:00
vitesse-vsc73xx-spi.c net: dsa: vitesse-vsc73xx: remove unnecessary set_drvdata() 2022-09-22 19:30:39 -07:00
vitesse-vsc73xx.h net: dsa: vsc73xx: add structure descriptions 2024-04-22 14:21:32 -07:00