Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87827
b: refs/heads/master
c: 23d245b
h: refs/heads/master
i:
  87825: ee5a7fb
  87823: f9e177d
v: v3
  • Loading branch information
Peter Korsgaard authored and Jeff Garzik committed Mar 26, 2008
1 parent 81a06ef commit bb6013b
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 33eddedb9cae602e093348421205b1619cccdbb4
refs/heads/master: 23d245b66ec8bec21f41ea484e05f470bea764e8
10 changes: 8 additions & 2 deletions trunk/drivers/net/dm9000.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,6 @@ dm9000_init_dm9000(struct net_device *dev)
/* Set address filter table */
dm9000_hash_table(dev);

/* Activate DM9000 */
iow(db, DM9000_RCR, RCR_DIS_LONG | RCR_DIS_CRC | RCR_RXEN);
/* Enable TX/RX interrupt mask */
iow(db, DM9000_IMR, IMR_PAR | IMR_PTM | IMR_PRM);

Expand Down Expand Up @@ -1197,6 +1195,7 @@ dm9000_hash_table(struct net_device *dev)
int i, oft;
u32 hash_val;
u16 hash_table[4];
u8 rcr = RCR_DIS_LONG | RCR_DIS_CRC | RCR_RXEN;
unsigned long flags;

dm9000_dbg(db, 1, "entering %s\n", __func__);
Expand All @@ -1213,6 +1212,12 @@ dm9000_hash_table(struct net_device *dev)
/* broadcast address */
hash_table[3] = 0x8000;

if (dev->flags & IFF_PROMISC)
rcr |= RCR_PRMSC;

if (dev->flags & IFF_ALLMULTI)
rcr |= RCR_ALL;

/* the multicast address in Hash Table : 64 bits */
for (i = 0; i < mc_cnt; i++, mcptr = mcptr->next) {
hash_val = ether_crc_le(6, mcptr->dmi_addr) & 0x3f;
Expand All @@ -1225,6 +1230,7 @@ dm9000_hash_table(struct net_device *dev)
iow(db, oft++, hash_table[i] >> 8);
}

iow(db, DM9000_RCR, rcr);
spin_unlock_irqrestore(&db->lock, flags);
}

Expand Down

0 comments on commit bb6013b

Please sign in to comment.