Thread (1 message) 1 message, 1 author, 2024-06-13

Re: [PATCH net-next v5 09/12] net: dsa: lantiq_gswip: Consistently use macros for the mac bridge table

From: Vladimir Oltean <olteanv@gmail.com>
Date: 2024-06-13 12:00:45
Also in: linux-devicetree, lkml

On Tue, Jun 11, 2024 at 03:54:31PM +0200, Martin Schiller wrote:
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

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: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
---
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help