Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183977
b: refs/heads/master
c: 7aeef97
h: refs/heads/master
i:
  183975: 3cc70d5
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Feb 5, 2010
1 parent 043bbb2 commit 8190e5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 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: 2cc04d27c497af9e8d11181fa8ddef9c99592c78
refs/heads/master: 7aeef972cce30b0ab04047e07918b04d867e7a29
17 changes: 6 additions & 11 deletions trunk/drivers/net/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2589,21 +2589,16 @@ static void e1000_set_multi(struct net_device *netdev)

ew32(RCTL, rctl);

if (netdev->mc_count) {
mta_list = kmalloc(netdev->mc_count * 6, GFP_ATOMIC);
if (!netdev_mc_empty(netdev)) {
mta_list = kmalloc(netdev_mc_count(netdev) * 6, GFP_ATOMIC);
if (!mta_list)
return;

/* prepare a packed array of only addresses. */
mc_ptr = netdev->mc_list;

for (i = 0; i < netdev->mc_count; i++) {
if (!mc_ptr)
break;
memcpy(mta_list + (i*ETH_ALEN), mc_ptr->dmi_addr,
ETH_ALEN);
mc_ptr = mc_ptr->next;
}
i = 0;
netdev_for_each_mc_addr(mc_ptr, netdev)
memcpy(mta_list + (i++ * ETH_ALEN),
mc_ptr->dmi_addr, ETH_ALEN);

e1000_update_mc_addr_list(hw, mta_list, i);
kfree(mta_list);
Expand Down

0 comments on commit 8190e5b

Please sign in to comment.