Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183974
b: refs/heads/master
c: a56ed41
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Feb 5, 2010
1 parent 670c912 commit 1de4d70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 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: b405e8df26dfe4c56ab3f88f5cc1dfab0d220289
refs/heads/master: a56ed41d94f80e4342116318754878a045835f40
7 changes: 3 additions & 4 deletions trunk/drivers/net/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ static void __cp_set_rx_mode (struct net_device *dev)
{
struct cp_private *cp = netdev_priv(dev);
u32 mc_filter[2]; /* Multicast hash filter */
int i, rx_mode;
int rx_mode;
u32 tmp;

/* Note: do not reorder, GCC is clever about common statements. */
Expand All @@ -909,7 +909,7 @@ static void __cp_set_rx_mode (struct net_device *dev)
AcceptBroadcast | AcceptMulticast | AcceptMyPhys |
AcceptAllPhys;
mc_filter[1] = mc_filter[0] = 0xffffffff;
} else if ((dev->mc_count > multicast_filter_limit) ||
} else if ((netdev_mc_count(dev) > multicast_filter_limit) ||
(dev->flags & IFF_ALLMULTI)) {
/* Too many to filter perfectly -- accept all multicasts. */
rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
Expand All @@ -918,8 +918,7 @@ static void __cp_set_rx_mode (struct net_device *dev)
struct dev_mc_list *mclist;
rx_mode = AcceptBroadcast | AcceptMyPhys;
mc_filter[1] = mc_filter[0] = 0;
for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count;
i++, mclist = mclist->next) {
netdev_for_each_mc_addr(mclist, dev) {
int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;

mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
Expand Down

0 comments on commit 1de4d70

Please sign in to comment.