Skip to content

Commit 9316012

Browse files
KanjiMonsterkuba-moo
authored andcommitted
net: dsa: b53: fix extracting VID from entry for BCM5325/65
BCM5325/65's Entry register uses the highest three bits for VALID/STATIC/AGE, so shifting by 53 only will add these to b53_arl_entry::vid. So make sure to mask the vid value as well, to not get invalid VIDs. Fixes: c456553 ("net: dsa: b53: add support for FDB operations on 5325/5365") Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Álvaro Fernández Rojas <noltari@gmail.com> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Link: https://patch.msgid.link/20251128080625.27181-3-jonas.gorski@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 6f268e2 commit 9316012

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/dsa/b53/b53_priv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ static inline void b53_arl_to_entry_25(struct b53_arl_entry *ent,
350350
ent->is_age = !!(mac_vid & ARLTBL_AGE_25);
351351
ent->is_static = !!(mac_vid & ARLTBL_STATIC_25);
352352
u64_to_ether_addr(mac_vid, ent->mac);
353-
ent->vid = mac_vid >> ARLTBL_VID_S_65;
353+
ent->vid = (mac_vid >> ARLTBL_VID_S_65) & ARLTBL_VID_MASK_25;
354354
}
355355

356356
static inline void b53_arl_to_entry_89(struct b53_arl_entry *ent,

0 commit comments

Comments
 (0)