2
0
forked from Ivasoft/openwrt

kernel: ar8xxx: get_arl_table now shows all ports of an entry

Multicast ARL entries can have multiple destination ports. Get and dump
all destination ports of each entry, not just the lowest.

Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>
This commit is contained in:
Günther Kelleter
2018-11-26 15:44:31 +01:00
committed by John Crispin
parent be3e69d991
commit 33878b0a40
4 changed files with 13 additions and 19 deletions

View File

@@ -1057,8 +1057,7 @@ static void ar8327_get_arl_entry(struct ar8xxx_priv *priv,
struct mii_bus *bus = priv->mii_bus;
u16 r2, page;
u16 r1_data0, r1_data1, r1_data2, r1_func;
u32 t, val0, val1, val2;
int i;
u32 val0, val1, val2;
split_addr(AR8327_REG_ATU_DATA0, &r1_data0, &r2, &page);
r2 |= 0x10;
@@ -1095,12 +1094,7 @@ static void ar8327_get_arl_entry(struct ar8xxx_priv *priv,
if (!*status)
break;
i = 0;
t = AR8327_ATU_PORT0;
while (!(val1 & t) && ++i < AR8327_NUM_PORTS)
t <<= 1;
a->port = i;
a->portmap = (val1 & AR8327_ATU_PORTS) >> AR8327_ATU_PORTS_S;
a->mac[0] = (val0 & AR8327_ATU_ADDR0) >> AR8327_ATU_ADDR0_S;
a->mac[1] = (val0 & AR8327_ATU_ADDR1) >> AR8327_ATU_ADDR1_S;
a->mac[2] = (val0 & AR8327_ATU_ADDR2) >> AR8327_ATU_ADDR2_S;