Skip to content
Commit e6c34597 authored by Martin Blumenstingl's avatar Martin Blumenstingl Committed by Jakub Kicinski
Browse files

net: dsa: lantiq_gswip: Consistently use macros for the mac bridge table



Only bits [5:0] in mac_bridge.key[3] are reserved for the FID.
Also, for dynamic (learned) entries, bits [7:4] in mac_bridge.val[0]
represents the port.

Introduce new macros GSWIP_TABLE_MAC_BRIDGE_KEY3_FID and
GSWIP_TABLE_MAC_BRIDGE_VAL0_PORT macro and use it throughout the driver.
Also rename and update GSWIP_TABLE_MAC_BRIDGE_VAL1_STATIC to use the
BIT() macro. This makes the driver code easier to understand.

Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: default avatarMartin Schiller <ms@dev.tdt.de>
Acked-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/20240611135434.3180973-10-ms@dev.tdt.de


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c927b6e4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment