realtek: properly update port masks when port leaves bridge
authorJan Hoffmann <jan@3e8.eu>
Sat, 6 May 2023 17:28:52 +0000 (19:28 +0200)
committerSander Vanheule <sander@svanheule.net>
Sun, 7 May 2023 17:07:34 +0000 (19:07 +0200)
commit3af984e46e37d5fa2e700143d85a199c85653872
treea9b97b6bb7d0a79160a49cbcb32d2f053186012d
parent326eb6e482498a676c22d4daa1629ce8c273980d
realtek: properly update port masks when port leaves bridge

Correctly update the isolation mask of the port being configured. The
port_bitmap variable should contain all other bridge members and needs
to be actually removed from the isolation mask instead of added to it.

Also actually remove the port being configured from the pm field of the
other ports, so that any other ports that are currently disabled will be
configured correctly when they are enabled.

Fixes: df8e6be59a1f ("rtl838x: add new architecture")
[fixed updating pm field of other ports]
Fixes: 2b88563ee5aa ("realtek: update the tree to the latest refactored version")
[reintroduced incorrect pm field update]
Fixes: 27029277f98d ("realtek: add switch driver support for the RTL93XX based switches")
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c
target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c