realtek: don't add CPU port to multicast portmasks
authorJan Hoffmann <jan@3e8.eu>
Sat, 6 May 2023 23:05:33 +0000 (01:05 +0200)
committerSander Vanheule <sander@svanheule.net>
Sun, 7 May 2023 17:09:02 +0000 (19:09 +0200)
commit6772ae1172ad12cf81b141fd9c5441ad18c0dddf
tree5abda832ebc58afab5503c085f9dc22b00965a0e
parent3356126b8263a5176bd1b633d428865fb0a4ced5
realtek: don't add CPU port to multicast portmasks

There shouldn't be any reason to forward all multicast to the CPU. The
original commit message also doesn't provide a reason for this seemingly
unrelated change.

The current implementation of the delete method is also broken, as it
entirely removes any entry when the portmask contains only the CPU port,
even if it was explicitly created.

Fixes: 724e4af530cd ("realtek: Store and Restore MC memberships for port enable/disable")
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