diff options
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/ar8327.c')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8327.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c index 74f0a08d76..803fb3d49f 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8327.c +++ b/target/linux/generic/files/drivers/net/phy/ar8327.c @@ -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; |