fec: refactor set_multicast_list() to make it more readable

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Sascha Hauer 2009-04-15 01:32:19 +00:00 committed by David S. Miller
parent 22f6b860da
commit 4e8318368a

View File

@ -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. */