aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
diff options
context:
space:
mode:
authorJan Hoffmann <jan@3e8.eu>2023-05-07 01:05:30 +0200
committerSander Vanheule <sander@svanheule.net>2023-05-07 19:08:59 +0200
commit81931756e1490547f8a6e1ef510b52af28c60909 (patch)
tree2080c6e13296341a3099fc3574e16b1a43a685d6 /target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
parent8ea27bb959b2181a3f3ca08d3f11b2a116960c87 (diff)
downloadupstream-81931756e1490547f8a6e1ef510b52af28c60909.tar.gz
upstream-81931756e1490547f8a6e1ef510b52af28c60909.tar.bz2
upstream-81931756e1490547f8a6e1ef510b52af28c60909.zip
realtek: fix writing/deletion of CAM entries
Actually use the index returned by rtl83xx_find_l2_cam_entry. 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/drivers/net/dsa/rtl83xx/dsa.c')
-rw-r--r--target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c8
1 files changed, 4 insertions, 4 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 b50330e1b9..dbf87a6072 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
@@ -1660,7 +1660,7 @@ static int rtl83xx_port_fdb_add(struct dsa_switch *ds, int port,
}
/* Hash buckets full, try CAM */
- rtl83xx_find_l2_cam_entry(priv, seed, false, &e);
+ idx = rtl83xx_find_l2_cam_entry(priv, seed, false, &e);
if (idx >= 0) {
rtl83xx_setup_l2_uc_entry(&e, port, vid, mac);
@@ -1698,7 +1698,7 @@ static int rtl83xx_port_fdb_del(struct dsa_switch *ds, int port,
}
/* Check CAM for spillover from hash buckets */
- rtl83xx_find_l2_cam_entry(priv, seed, true, &e);
+ idx = rtl83xx_find_l2_cam_entry(priv, seed, true, &e);
if (idx >= 0) {
e.valid = false;
@@ -1794,7 +1794,7 @@ static int rtl83xx_port_mdb_add(struct dsa_switch *ds, int port,
}
/* Hash buckets full, try CAM */
- rtl83xx_find_l2_cam_entry(priv, seed, false, &e);
+ idx = rtl83xx_find_l2_cam_entry(priv, seed, false, &e);
if (idx >= 0) {
if (e.valid) {
@@ -1857,7 +1857,7 @@ int rtl83xx_port_mdb_del(struct dsa_switch *ds, int port,
}
/* Check CAM for spillover from hash buckets */
- rtl83xx_find_l2_cam_entry(priv, seed, true, &e);
+ idx = rtl83xx_find_l2_cam_entry(priv, seed, true, &e);
if (idx >= 0) {
portmask = rtl83xx_mc_group_del_port(priv, e.mc_portmask_index, port);