diff options
Diffstat (limited to 'drivers/net/enic/enic_main.c')
-rw-r--r-- | drivers/net/enic/enic_main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 452a6b747e3..019b1480cc0 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c | |||
@@ -771,6 +771,7 @@ static void enic_set_multicast_list(struct net_device *netdev) | |||
771 | int promisc = (netdev->flags & IFF_PROMISC) ? 1 : 0; | 771 | int promisc = (netdev->flags & IFF_PROMISC) ? 1 : 0; |
772 | int allmulti = (netdev->flags & IFF_ALLMULTI) || | 772 | int allmulti = (netdev->flags & IFF_ALLMULTI) || |
773 | (netdev->mc_count > ENIC_MULTICAST_PERFECT_FILTERS); | 773 | (netdev->mc_count > ENIC_MULTICAST_PERFECT_FILTERS); |
774 | unsigned int flags = netdev->flags | (allmulti ? IFF_ALLMULTI : 0); | ||
774 | u8 mc_addr[ENIC_MULTICAST_PERFECT_FILTERS][ETH_ALEN]; | 775 | u8 mc_addr[ENIC_MULTICAST_PERFECT_FILTERS][ETH_ALEN]; |
775 | unsigned int mc_count = netdev->mc_count; | 776 | unsigned int mc_count = netdev->mc_count; |
776 | unsigned int i, j; | 777 | unsigned int i, j; |
@@ -780,8 +781,11 @@ static void enic_set_multicast_list(struct net_device *netdev) | |||
780 | 781 | ||
781 | spin_lock(&enic->devcmd_lock); | 782 | spin_lock(&enic->devcmd_lock); |
782 | 783 | ||
783 | vnic_dev_packet_filter(enic->vdev, directed, | 784 | if (enic->flags != flags) { |
784 | multicast, broadcast, promisc, allmulti); | 785 | enic->flags = flags; |
786 | vnic_dev_packet_filter(enic->vdev, directed, | ||
787 | multicast, broadcast, promisc, allmulti); | ||
788 | } | ||
785 | 789 | ||
786 | /* Is there an easier way? Trying to minimize to | 790 | /* Is there an easier way? Trying to minimize to |
787 | * calls to add/del multicast addrs. We keep the | 791 | * calls to add/del multicast addrs. We keep the |