diff options
author | Sowmini Varadhan <sowmini.varadhan@oracle.com> | 2016-01-12 22:32:30 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2016-04-04 16:48:00 -0400 |
commit | c7374b5a767cb6c7d9acbfc82656dc89afeae257 (patch) | |
tree | 3a00243335bca06e30e08fa9f48b5e6de34237f0 | |
parent | 37689010da28c6dfd9f59e60d7f42c47b775171c (diff) |
ixgbe: use eth_platform_get_mac_address()
This commit converts commit c762dff24c06 ("ixgbe: Look up MAC address in
Open Firmware or IDPROM") to use eth_platform_get_mac_address()
added by commit c7f5d105495a ("net: Add eth_platform_get_mac_address()
helper.")
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 5f4ecf50eedd..bce5737b1a96 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -54,15 +54,6 @@ | |||
54 | #include <net/pkt_cls.h> | 54 | #include <net/pkt_cls.h> |
55 | #include <net/tc_act/tc_gact.h> | 55 | #include <net/tc_act/tc_gact.h> |
56 | 56 | ||
57 | #ifdef CONFIG_OF | ||
58 | #include <linux/of_net.h> | ||
59 | #endif | ||
60 | |||
61 | #ifdef CONFIG_SPARC | ||
62 | #include <asm/idprom.h> | ||
63 | #include <asm/prom.h> | ||
64 | #endif | ||
65 | |||
66 | #include "ixgbe.h" | 57 | #include "ixgbe.h" |
67 | #include "ixgbe_common.h" | 58 | #include "ixgbe_common.h" |
68 | #include "ixgbe_dcb_82599.h" | 59 | #include "ixgbe_dcb_82599.h" |
@@ -9011,29 +9002,6 @@ int ixgbe_wol_supported(struct ixgbe_adapter *adapter, u16 device_id, | |||
9011 | } | 9002 | } |
9012 | 9003 | ||
9013 | /** | 9004 | /** |
9014 | * ixgbe_get_platform_mac_addr - Look up MAC address in Open Firmware / IDPROM | ||
9015 | * @adapter: Pointer to adapter struct | ||
9016 | */ | ||
9017 | static void ixgbe_get_platform_mac_addr(struct ixgbe_adapter *adapter) | ||
9018 | { | ||
9019 | #ifdef CONFIG_OF | ||
9020 | struct device_node *dp = pci_device_to_OF_node(adapter->pdev); | ||
9021 | struct ixgbe_hw *hw = &adapter->hw; | ||
9022 | const unsigned char *addr; | ||
9023 | |||
9024 | addr = of_get_mac_address(dp); | ||
9025 | if (addr) { | ||
9026 | ether_addr_copy(hw->mac.perm_addr, addr); | ||
9027 | return; | ||
9028 | } | ||
9029 | #endif /* CONFIG_OF */ | ||
9030 | |||
9031 | #ifdef CONFIG_SPARC | ||
9032 | ether_addr_copy(hw->mac.perm_addr, idprom->id_ethaddr); | ||
9033 | #endif /* CONFIG_SPARC */ | ||
9034 | } | ||
9035 | |||
9036 | /** | ||
9037 | * ixgbe_probe - Device Initialization Routine | 9005 | * ixgbe_probe - Device Initialization Routine |
9038 | * @pdev: PCI device information struct | 9006 | * @pdev: PCI device information struct |
9039 | * @ent: entry in ixgbe_pci_tbl | 9007 | * @ent: entry in ixgbe_pci_tbl |
@@ -9304,7 +9272,8 @@ skip_sriov: | |||
9304 | goto err_sw_init; | 9272 | goto err_sw_init; |
9305 | } | 9273 | } |
9306 | 9274 | ||
9307 | ixgbe_get_platform_mac_addr(adapter); | 9275 | eth_platform_get_mac_address(&adapter->pdev->dev, |
9276 | adapter->hw.mac.perm_addr); | ||
9308 | 9277 | ||
9309 | memcpy(netdev->dev_addr, hw->mac.perm_addr, netdev->addr_len); | 9278 | memcpy(netdev->dev_addr, hw->mac.perm_addr, netdev->addr_len); |
9310 | 9279 | ||