Commit 4e831836 authored by Sascha Hauer's avatar Sascha Hauer Committed by David S. Miller

fec: refactor set_multicast_list() to make it more readable

Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 22f6b860
......@@ -1517,7 +1517,9 @@ static void set_multicast_list(struct net_device *dev)
tmp = readl(fep->hwp + FEC_R_CNTRL);
tmp |= 0x8;
writel(tmp, fep->hwp + FEC_R_CNTRL);
} else {
return;
}
tmp = readl(fep->hwp + FEC_R_CNTRL);
tmp &= ~0x8;
writel(tmp, fep->hwp + FEC_R_CNTRL);
......@@ -1528,7 +1530,10 @@ static void set_multicast_list(struct net_device *dev)
*/
writel(0xffffffff, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
writel(0xffffffff, fep->hwp + FEC_GRP_HASH_TABLE_LOW);
} else {
return;
}
/* Clear filter and add the addresses in hash register
*/
writel(0, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
......@@ -1567,8 +1572,6 @@ static void set_multicast_list(struct net_device *dev)
writel(tmp, fep->hwp + FEC_GRP_HASH_TABLE_LOW);
}
}
}
}
}
/* Set a MAC change in hardware. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment