Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183457
b: refs/heads/master
c: 6096347
h: refs/heads/master
i:
  183455: 49e55b8
v: v3
  • Loading branch information
Giuseppe CAVALLARO authored and David S. Miller committed Jan 8, 2010
1 parent 6cdb486 commit 0f10b97
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 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: 109cdd66485b639b2fbfcbf59ae7ef1286520705
refs/heads/master: 609634799eba48bb9e80ce56dfd87930f17bf6fa
24 changes: 8 additions & 16 deletions trunk/drivers/net/stmmac/gmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ static void gmac_set_filter(struct net_device *dev)
unsigned int value = 0;

DBG(KERN_INFO "%s: # mcasts %d, # unicast %d\n",
__func__, dev->mc_count, dev->uc_count);
__func__, dev->mc_count, dev->uc.count);

if (dev->flags & IFF_PROMISC)
value = GMAC_FRAME_FILTER_PR;
Expand Down Expand Up @@ -469,25 +469,17 @@ static void gmac_set_filter(struct net_device *dev)
}

/* Handle multiple unicast addresses (perfect filtering)*/
if (dev->uc_count > GMAC_MAX_UNICAST_ADDRESSES)
if (dev->uc.count > GMAC_MAX_UNICAST_ADDRESSES)
/* Switch to promiscuous mode is more than 16 addrs
are required */
value |= GMAC_FRAME_FILTER_PR;
else {
int i;
struct dev_addr_list *uc_ptr = dev->uc_list;

for (i = 0; i < dev->uc_count; i++) {
gmac_set_umac_addr(ioaddr, uc_ptr->da_addr,
i + 1);

DBG(KERN_INFO "\t%d "
"- Unicast addr %02x:%02x:%02x:%02x:%02x:"
"%02x\n", i + 1,
uc_ptr->da_addr[0], uc_ptr->da_addr[1],
uc_ptr->da_addr[2], uc_ptr->da_addr[3],
uc_ptr->da_addr[4], uc_ptr->da_addr[5]);
uc_ptr = uc_ptr->next;
int reg = 1;
struct netdev_hw_addr *ha;

list_for_each_entry(ha, &dev->uc.list, list) {
gmac_set_umac_addr(ioaddr, ha->addr, reg);
reg++;
}
}

Expand Down

0 comments on commit 0f10b97

Please sign in to comment.