diff options
author | Jiri Pirko <jpirko@redhat.com> | 2009-06-16 21:12:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-18 03:29:08 -0400 |
commit | 31278e71471399beaff9280737e52b47db4dc345 (patch) | |
tree | 25fe2ff8e48a75b7f569dccc463f3bd2561c6c66 /drivers/net/e1000/e1000_main.c | |
parent | 7b85576d15bf2574b0a451108f59f9ad4170dd3f (diff) |
net: group address list and its count
This patch is inspired by patch recently posted by Johannes Berg. Basically what
my patch does is to group list and a count of addresses into newly introduced
structure netdev_hw_addr_list. This brings us two benefits:
1) struct net_device becames a bit nicer.
2) in the future there will be a possibility to operate with lists independently
on netdevices (with exporting right functions).
I wanted to introduce this patch before I'll post a multicast lists conversion.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
drivers/net/bnx2.c | 4 +-
drivers/net/e1000/e1000_main.c | 4 +-
drivers/net/ixgbe/ixgbe_main.c | 6 +-
drivers/net/mv643xx_eth.c | 2 +-
drivers/net/niu.c | 4 +-
drivers/net/virtio_net.c | 10 ++--
drivers/s390/net/qeth_l2_main.c | 2 +-
include/linux/netdevice.h | 17 +++--
net/core/dev.c | 130 ++++++++++++++++++--------------------
9 files changed, 89 insertions(+), 90 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 8d36743c8140..5e3356f8eb5a 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -2370,7 +2370,7 @@ static void e1000_set_rx_mode(struct net_device *netdev) | |||
2370 | rctl |= E1000_RCTL_VFE; | 2370 | rctl |= E1000_RCTL_VFE; |
2371 | } | 2371 | } |
2372 | 2372 | ||
2373 | if (netdev->uc_count > rar_entries - 1) { | 2373 | if (netdev->uc.count > rar_entries - 1) { |
2374 | rctl |= E1000_RCTL_UPE; | 2374 | rctl |= E1000_RCTL_UPE; |
2375 | } else if (!(netdev->flags & IFF_PROMISC)) { | 2375 | } else if (!(netdev->flags & IFF_PROMISC)) { |
2376 | rctl &= ~E1000_RCTL_UPE; | 2376 | rctl &= ~E1000_RCTL_UPE; |
@@ -2394,7 +2394,7 @@ static void e1000_set_rx_mode(struct net_device *netdev) | |||
2394 | */ | 2394 | */ |
2395 | i = 1; | 2395 | i = 1; |
2396 | if (use_uc) | 2396 | if (use_uc) |
2397 | list_for_each_entry(ha, &netdev->uc_list, list) { | 2397 | list_for_each_entry(ha, &netdev->uc.list, list) { |
2398 | if (i == rar_entries) | 2398 | if (i == rar_entries) |
2399 | break; | 2399 | break; |
2400 | e1000_rar_set(hw, ha->addr, i++); | 2400 | e1000_rar_set(hw, ha->addr, i++); |