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:
parent
22f6b860da
commit
4e8318368a
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user