diff options
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index b896f9386110..ee1b397417f3 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -1668,7 +1668,7 @@ static u8 * | |||
1668 | vmxnet3_copy_mc(struct net_device *netdev) | 1668 | vmxnet3_copy_mc(struct net_device *netdev) |
1669 | { | 1669 | { |
1670 | u8 *buf = NULL; | 1670 | u8 *buf = NULL; |
1671 | u32 sz = netdev->mc_count * ETH_ALEN; | 1671 | u32 sz = netdev_mc_count(netdev) * ETH_ALEN; |
1672 | 1672 | ||
1673 | /* struct Vmxnet3_RxFilterConf.mfTableLen is u16. */ | 1673 | /* struct Vmxnet3_RxFilterConf.mfTableLen is u16. */ |
1674 | if (sz <= 0xffff) { | 1674 | if (sz <= 0xffff) { |
@@ -1678,7 +1678,7 @@ vmxnet3_copy_mc(struct net_device *netdev) | |||
1678 | int i; | 1678 | int i; |
1679 | struct dev_mc_list *mc = netdev->mc_list; | 1679 | struct dev_mc_list *mc = netdev->mc_list; |
1680 | 1680 | ||
1681 | for (i = 0; i < netdev->mc_count; i++) { | 1681 | for (i = 0; i < netdev_mc_count(netdev); i++) { |
1682 | BUG_ON(!mc); | 1682 | BUG_ON(!mc); |
1683 | memcpy(buf + i * ETH_ALEN, mc->dmi_addr, | 1683 | memcpy(buf + i * ETH_ALEN, mc->dmi_addr, |
1684 | ETH_ALEN); | 1684 | ETH_ALEN); |
@@ -1708,12 +1708,12 @@ vmxnet3_set_mc(struct net_device *netdev) | |||
1708 | if (netdev->flags & IFF_ALLMULTI) | 1708 | if (netdev->flags & IFF_ALLMULTI) |
1709 | new_mode |= VMXNET3_RXM_ALL_MULTI; | 1709 | new_mode |= VMXNET3_RXM_ALL_MULTI; |
1710 | else | 1710 | else |
1711 | if (netdev->mc_count > 0) { | 1711 | if (!netdev_mc_empty(netdev)) { |
1712 | new_table = vmxnet3_copy_mc(netdev); | 1712 | new_table = vmxnet3_copy_mc(netdev); |
1713 | if (new_table) { | 1713 | if (new_table) { |
1714 | new_mode |= VMXNET3_RXM_MCAST; | 1714 | new_mode |= VMXNET3_RXM_MCAST; |
1715 | rxConf->mfTableLen = cpu_to_le16( | 1715 | rxConf->mfTableLen = cpu_to_le16( |
1716 | netdev->mc_count * ETH_ALEN); | 1716 | netdev_mc_count(netdev) * ETH_ALEN); |
1717 | rxConf->mfTablePA = cpu_to_le64(virt_to_phys( | 1717 | rxConf->mfTablePA = cpu_to_le64(virt_to_phys( |
1718 | new_table)); | 1718 | new_table)); |
1719 | } else { | 1719 | } else { |