Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183242
b: refs/heads/master
c: 9959a18
h: refs/heads/master
v: v3
  • Loading branch information
Scott Feldman authored and David S. Miller committed Dec 24, 2009
1 parent 2a0b8f1 commit 7220220
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2d6ddced5c99cf79c06b9b6ec1366ab63b970ea9
refs/heads/master: 9959a18556c73ebf2936b8df183ea7b41f38d933
1 change: 1 addition & 0 deletions trunk/drivers/net/enic/enic.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ struct enic {
spinlock_t devcmd_lock;
u8 mac_addr[ETH_ALEN];
u8 mc_addr[ENIC_MULTICAST_PERFECT_FILTERS][ETH_ALEN];
unsigned int flags;
unsigned int mc_count;
int csum_rx_enabled;
u32 port_mtu;
Expand Down
8 changes: 6 additions & 2 deletions trunk/drivers/net/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,7 @@ static void enic_set_multicast_list(struct net_device *netdev)
int promisc = (netdev->flags & IFF_PROMISC) ? 1 : 0;
int allmulti = (netdev->flags & IFF_ALLMULTI) ||
(netdev->mc_count > ENIC_MULTICAST_PERFECT_FILTERS);
unsigned int flags = netdev->flags | (allmulti ? IFF_ALLMULTI : 0);
u8 mc_addr[ENIC_MULTICAST_PERFECT_FILTERS][ETH_ALEN];
unsigned int mc_count = netdev->mc_count;
unsigned int i, j;
Expand All @@ -780,8 +781,11 @@ static void enic_set_multicast_list(struct net_device *netdev)

spin_lock(&enic->devcmd_lock);

vnic_dev_packet_filter(enic->vdev, directed,
multicast, broadcast, promisc, allmulti);
if (enic->flags != flags) {
enic->flags = flags;
vnic_dev_packet_filter(enic->vdev, directed,
multicast, broadcast, promisc, allmulti);
}

/* Is there an easier way? Trying to minimize to
* calls to add/del multicast addrs. We keep the
Expand Down

0 comments on commit 7220220

Please sign in to comment.