aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files-5.15
diff options
context:
space:
mode:
authorJan Hoffmann <jan@3e8.eu>2023-05-07 01:05:31 +0200
committerSander Vanheule <sander@svanheule.net>2023-05-07 19:09:00 +0200
commit57df840670b6038866ebed877ed9827276b730fe (patch)
tree49ee57a1c4668e337ab103fdd41dc92aee5b0ffa /target/linux/realtek/files-5.15
parent81931756e1490547f8a6e1ef510b52af28c60909 (diff)
downloadupstream-57df840670b6038866ebed877ed9827276b730fe.tar.gz
upstream-57df840670b6038866ebed877ed9827276b730fe.tar.bz2
upstream-57df840670b6038866ebed877ed9827276b730fe.zip
realtek: don't treat first multicast portmask entry as reserved
There doesn't appear to be a reason to do this, as only the last entry is actually reserved for unknown multicast. This also fixes two issues: - As the increment happened after the bounds check, the value of the actually reserved last entry could be overwritten. - On deletion of entries, a corresponding decrement was missing, causing the wrong entry to be marked as free. Fixes: cde31976e375 ("realtek: Add support for Layer 2 Multicast") Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Diffstat (limited to 'target/linux/realtek/files-5.15')
-rw-r--r--target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
index dbf87a6072..43b6d502f7 100644
--- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
@@ -981,7 +981,6 @@ static int rtl83xx_mc_group_alloc(struct rtl838x_switch_priv *priv, int port)
}
set_bit(mc_group, priv->mc_group_bm);
- mc_group++; /* We cannot use group 0, as this is used for lookup miss flooding */
portmask = BIT_ULL(port) | BIT_ULL(priv->cpu_port);
priv->r->write_mcast_pmask(mc_group, portmask);