Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74452
b: refs/heads/master
c: 7b31f7f
h: refs/heads/master
v: v3
  • Loading branch information
Peter Korsgaard authored and Jeff Garzik committed Nov 24, 2007
1 parent 90e8e7e commit 8d7bc0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 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: 8b31cfbcd1b54362ef06c85beb40e65a349169a2
refs/heads/master: 7b31f7ffa9ed7ba5fbe1cab8fb17a8c545e6a0eb
17 changes: 4 additions & 13 deletions trunk/drivers/net/smc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1379,13 +1379,6 @@ static void smc911x_set_multicast_list(struct net_device *dev)
unsigned int multicast_table[2];
unsigned int mcr, update_multicast = 0;
unsigned long flags;
/* table for flipping the order of 5 bits */
static const unsigned char invert5[] =
{0x00, 0x10, 0x08, 0x18, 0x04, 0x14, 0x0C, 0x1C,
0x02, 0x12, 0x0A, 0x1A, 0x06, 0x16, 0x0E, 0x1E,
0x01, 0x11, 0x09, 0x19, 0x05, 0x15, 0x0D, 0x1D,
0x03, 0x13, 0x0B, 0x1B, 0x07, 0x17, 0x0F, 0x1F};


DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__);

Expand Down Expand Up @@ -1432,7 +1425,7 @@ static void smc911x_set_multicast_list(struct net_device *dev)

cur_addr = dev->mc_list;
for (i = 0; i < dev->mc_count; i++, cur_addr = cur_addr->next) {
int position;
u32 position;

/* do we have a pointer here? */
if (!cur_addr)
Expand All @@ -1442,12 +1435,10 @@ static void smc911x_set_multicast_list(struct net_device *dev)
if (!(*cur_addr->dmi_addr & 1))
continue;

/* only use the low order bits */
position = crc32_le(~0, cur_addr->dmi_addr, 6) & 0x3f;
/* upper 6 bits are used as hash index */
position = ether_crc(ETH_ALEN, cur_addr->dmi_addr)>>26;

/* do some messy swapping to put the bit in the right spot */
multicast_table[invert5[position&0x1F]&0x1] |=
(1<<invert5[(position>>1)&0x1F]);
multicast_table[position>>5] |= 1 << (position&0x1f);
}

/* be sure I get rid of flags I might have set */
Expand Down

0 comments on commit 8d7bc0a

Please sign in to comment.