realtek: dsa: Simplify port member handling
authorSven Eckelmann <[email protected]>
Thu, 9 Oct 2025 14:28:47 +0000 (16:28 +0200)
committerRobert Marko <[email protected]>
Sun, 12 Oct 2025 10:49:49 +0000 (12:49 +0200)
commit77ce3f1a728cc6f1338d898beaca52a7d9bf3031
treed24c7df36b651ac5c9a1798ea4418f67f2654a7c
parent622e2d0971b5a5e2e5cb822b4dc6ca3a1c0af8be
realtek: dsa: Simplify port member handling

It is not necessary to read the back the current port members for a
specific port for enabling/disabling a port. All these members which are
expected to be in the HW port matrix of an active port are already stored
in the port specific member "pm".

And when a port is disabled, the port must no longer forwarding traffic to
any other port. Just writing 0 to the members is therefore good enough and
no read-back of the old HW state is necessary.

Signed-off-by: Sven Eckelmann <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20360
Signed-off-by: Robert Marko <[email protected]>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c