diff options
Diffstat (limited to 'drivers/net/ksz884x.c')
-rw-r--r-- | drivers/net/ksz884x.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/ksz884x.c b/drivers/net/ksz884x.c index b843bf7d8c17..348769521615 100644 --- a/drivers/net/ksz884x.c +++ b/drivers/net/ksz884x.c | |||
@@ -5763,7 +5763,7 @@ static void netdev_set_rx_mode(struct net_device *dev) | |||
5763 | struct dev_priv *priv = netdev_priv(dev); | 5763 | struct dev_priv *priv = netdev_priv(dev); |
5764 | struct dev_info *hw_priv = priv->adapter; | 5764 | struct dev_info *hw_priv = priv->adapter; |
5765 | struct ksz_hw *hw = &hw_priv->hw; | 5765 | struct ksz_hw *hw = &hw_priv->hw; |
5766 | struct dev_mc_list *mc_ptr; | 5766 | struct netdev_hw_addr *ha; |
5767 | int multicast = (dev->flags & IFF_ALLMULTI); | 5767 | int multicast = (dev->flags & IFF_ALLMULTI); |
5768 | 5768 | ||
5769 | dev_set_promiscuous(dev, priv, hw, (dev->flags & IFF_PROMISC)); | 5769 | dev_set_promiscuous(dev, priv, hw, (dev->flags & IFF_PROMISC)); |
@@ -5780,7 +5780,7 @@ static void netdev_set_rx_mode(struct net_device *dev) | |||
5780 | int i = 0; | 5780 | int i = 0; |
5781 | 5781 | ||
5782 | /* List too big to support so turn on all multicast mode. */ | 5782 | /* List too big to support so turn on all multicast mode. */ |
5783 | if (dev->mc_count > MAX_MULTICAST_LIST) { | 5783 | if (netdev_mc_count(dev) > MAX_MULTICAST_LIST) { |
5784 | if (MAX_MULTICAST_LIST != hw->multi_list_size) { | 5784 | if (MAX_MULTICAST_LIST != hw->multi_list_size) { |
5785 | hw->multi_list_size = MAX_MULTICAST_LIST; | 5785 | hw->multi_list_size = MAX_MULTICAST_LIST; |
5786 | ++hw->all_multi; | 5786 | ++hw->all_multi; |
@@ -5789,13 +5789,12 @@ static void netdev_set_rx_mode(struct net_device *dev) | |||
5789 | return; | 5789 | return; |
5790 | } | 5790 | } |
5791 | 5791 | ||
5792 | netdev_for_each_mc_addr(mc_ptr, dev) { | 5792 | netdev_for_each_mc_addr(ha, dev) { |
5793 | if (!(*mc_ptr->dmi_addr & 1)) | 5793 | if (!(*ha->addr & 1)) |
5794 | continue; | 5794 | continue; |
5795 | if (i >= MAX_MULTICAST_LIST) | 5795 | if (i >= MAX_MULTICAST_LIST) |
5796 | break; | 5796 | break; |
5797 | memcpy(hw->multi_list[i++], mc_ptr->dmi_addr, | 5797 | memcpy(hw->multi_list[i++], ha->addr, MAC_ADDR_LEN); |
5798 | MAC_ADDR_LEN); | ||
5799 | } | 5798 | } |
5800 | hw->multi_list_size = (u8) i; | 5799 | hw->multi_list_size = (u8) i; |
5801 | hw_set_grp_addr(hw); | 5800 | hw_set_grp_addr(hw); |