net: convert multicast list to list_head
Converts the list and the core manipulating with it to be the same as uc_list. +uses two functions for adding/removing mc address (normal and "global" variant) instead of a function parameter. +removes dev_mcast.c completely. +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for manipulation with lists on a sandbox (used in bonding and 80211 drivers) Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
a748ee2426
commit
22bedad3ce
@@ -2957,20 +2957,20 @@ static void cas_process_mc_list(struct cas *cp)
|
||||
{
|
||||
u16 hash_table[16];
|
||||
u32 crc;
|
||||
struct dev_mc_list *dmi;
|
||||
struct netdev_hw_addr *ha;
|
||||
int i = 1;
|
||||
|
||||
memset(hash_table, 0, sizeof(hash_table));
|
||||
netdev_for_each_mc_addr(dmi, cp->dev) {
|
||||
netdev_for_each_mc_addr(ha, cp->dev) {
|
||||
if (i <= CAS_MC_EXACT_MATCH_SIZE) {
|
||||
/* use the alternate mac address registers for the
|
||||
* first 15 multicast addresses
|
||||
*/
|
||||
writel((dmi->dmi_addr[4] << 8) | dmi->dmi_addr[5],
|
||||
writel((ha->addr[4] << 8) | ha->addr[5],
|
||||
cp->regs + REG_MAC_ADDRN(i*3 + 0));
|
||||
writel((dmi->dmi_addr[2] << 8) | dmi->dmi_addr[3],
|
||||
writel((ha->addr[2] << 8) | ha->addr[3],
|
||||
cp->regs + REG_MAC_ADDRN(i*3 + 1));
|
||||
writel((dmi->dmi_addr[0] << 8) | dmi->dmi_addr[1],
|
||||
writel((ha->addr[0] << 8) | ha->addr[1],
|
||||
cp->regs + REG_MAC_ADDRN(i*3 + 2));
|
||||
i++;
|
||||
}
|
||||
@@ -2978,7 +2978,7 @@ static void cas_process_mc_list(struct cas *cp)
|
||||
/* use hw hash table for the next series of
|
||||
* multicast addresses
|
||||
*/
|
||||
crc = ether_crc_le(ETH_ALEN, dmi->dmi_addr);
|
||||
crc = ether_crc_le(ETH_ALEN, ha->addr);
|
||||
crc >>= 24;
|
||||
hash_table[crc >> 4] |= 1 << (15 - (crc & 0xf));
|
||||
}
|
||||
|
Reference in New Issue
Block a user