aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-01-25 16:36:10 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-25 16:36:10 -0500
commit32e7bfc41110bc8f29ec0f293c3bcee6645fef34 (patch)
treeb770a040aee7a6a196514cbf5328debb33321d4d /drivers/net/ixgbe
parent9010bc3364db56dd88a1851e0797e597e322ce08 (diff)
net: use helpers to access uc list V2
This patch introduces three macros to work with uc list from net drivers. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r--drivers/net/ixgbe/ixgbe_common.c7
-rw-r--r--drivers/net/ixgbe/ixgbe_common.h2
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c2
-rw-r--r--drivers/net/ixgbe/ixgbe_type.h4
4 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c
index 276c2aaa800b..eb49020903c1 100644
--- a/drivers/net/ixgbe/ixgbe_common.c
+++ b/drivers/net/ixgbe/ixgbe_common.c
@@ -28,7 +28,6 @@
28#include <linux/pci.h> 28#include <linux/pci.h>
29#include <linux/delay.h> 29#include <linux/delay.h>
30#include <linux/sched.h> 30#include <linux/sched.h>
31#include <linux/list.h>
32#include <linux/netdevice.h> 31#include <linux/netdevice.h>
33 32
34#include "ixgbe.h" 33#include "ixgbe.h"
@@ -1347,7 +1346,7 @@ static void ixgbe_add_uc_addr(struct ixgbe_hw *hw, u8 *addr, u32 vmdq)
1347/** 1346/**
1348 * ixgbe_update_uc_addr_list_generic - Updates MAC list of secondary addresses 1347 * ixgbe_update_uc_addr_list_generic - Updates MAC list of secondary addresses
1349 * @hw: pointer to hardware structure 1348 * @hw: pointer to hardware structure
1350 * @uc_list: the list of new addresses 1349 * @netdev: pointer to net device structure
1351 * 1350 *
1352 * The given list replaces any existing list. Clears the secondary addrs from 1351 * The given list replaces any existing list. Clears the secondary addrs from
1353 * receive address registers. Uses unused receive address registers for the 1352 * receive address registers. Uses unused receive address registers for the
@@ -1357,7 +1356,7 @@ static void ixgbe_add_uc_addr(struct ixgbe_hw *hw, u8 *addr, u32 vmdq)
1357 * manually putting the device into promiscuous mode. 1356 * manually putting the device into promiscuous mode.
1358 **/ 1357 **/
1359s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, 1358s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw,
1360 struct list_head *uc_list) 1359 struct net_device *netdev)
1361{ 1360{
1362 u32 i; 1361 u32 i;
1363 u32 old_promisc_setting = hw->addr_ctrl.overflow_promisc; 1362 u32 old_promisc_setting = hw->addr_ctrl.overflow_promisc;
@@ -1381,7 +1380,7 @@ s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw,
1381 } 1380 }
1382 1381
1383 /* Add the new addresses */ 1382 /* Add the new addresses */
1384 list_for_each_entry(ha, uc_list, list) { 1383 netdev_for_each_uc_addr(ha, netdev) {
1385 hw_dbg(hw, " Adding the secondary addresses:\n"); 1384 hw_dbg(hw, " Adding the secondary addresses:\n");
1386 ixgbe_add_uc_addr(hw, ha->addr, 0); 1385 ixgbe_add_uc_addr(hw, ha->addr, 0);
1387 } 1386 }
diff --git a/drivers/net/ixgbe/ixgbe_common.h b/drivers/net/ixgbe/ixgbe_common.h
index dfff0ffaa502..13606d4809c9 100644
--- a/drivers/net/ixgbe/ixgbe_common.h
+++ b/drivers/net/ixgbe/ixgbe_common.h
@@ -60,7 +60,7 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list,
60 u32 mc_addr_count, 60 u32 mc_addr_count,
61 ixgbe_mc_addr_itr func); 61 ixgbe_mc_addr_itr func);
62s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, 62s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw,
63 struct list_head *uc_list); 63 struct net_device *netdev);
64s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw); 64s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw);
65s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw); 65s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw);
66s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval); 66s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval);
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index ee41d331a35f..439645d2aeef 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2568,7 +2568,7 @@ void ixgbe_set_rx_mode(struct net_device *netdev)
2568 IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl); 2568 IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
2569 2569
2570 /* reprogram secondary unicast list */ 2570 /* reprogram secondary unicast list */
2571 hw->mac.ops.update_uc_addr_list(hw, &netdev->uc.list); 2571 hw->mac.ops.update_uc_addr_list(hw, netdev);
2572 2572
2573 /* reprogram multicast list */ 2573 /* reprogram multicast list */
2574 addr_count = netdev->mc_count; 2574 addr_count = netdev->mc_count;
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h
index b4caa7011a2b..0db67c19b2c4 100644
--- a/drivers/net/ixgbe/ixgbe_type.h
+++ b/drivers/net/ixgbe/ixgbe_type.h
@@ -30,7 +30,7 @@
30 30
31#include <linux/types.h> 31#include <linux/types.h>
32#include <linux/mdio.h> 32#include <linux/mdio.h>
33#include <linux/list.h> 33#include <linux/netdevice.h>
34 34
35/* Vendor ID */ 35/* Vendor ID */
36#define IXGBE_INTEL_VENDOR_ID 0x8086 36#define IXGBE_INTEL_VENDOR_ID 0x8086
@@ -2405,7 +2405,7 @@ struct ixgbe_mac_operations {
2405 s32 (*set_vmdq)(struct ixgbe_hw *, u32, u32); 2405 s32 (*set_vmdq)(struct ixgbe_hw *, u32, u32);
2406 s32 (*clear_vmdq)(struct ixgbe_hw *, u32, u32); 2406 s32 (*clear_vmdq)(struct ixgbe_hw *, u32, u32);
2407 s32 (*init_rx_addrs)(struct ixgbe_hw *); 2407 s32 (*init_rx_addrs)(struct ixgbe_hw *);
2408 s32 (*update_uc_addr_list)(struct ixgbe_hw *, struct list_head *); 2408 s32 (*update_uc_addr_list)(struct ixgbe_hw *, struct net_device *);
2409 s32 (*update_mc_addr_list)(struct ixgbe_hw *, u8 *, u32, 2409 s32 (*update_mc_addr_list)(struct ixgbe_hw *, u8 *, u32,
2410 ixgbe_mc_addr_itr); 2410 ixgbe_mc_addr_itr);
2411 s32 (*enable_mc)(struct ixgbe_hw *); 2411 s32 (*enable_mc)(struct ixgbe_hw *);