|
54 | 54 | #include <net/pkt_cls.h>
|
55 | 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 | 57 | #include "ixgbe.h"
|
67 | 58 | #include "ixgbe_common.h"
|
68 | 59 | #include "ixgbe_dcb_82599.h"
|
@@ -9010,29 +9001,6 @@ int ixgbe_wol_supported(struct ixgbe_adapter *adapter, u16 device_id,
|
9010 | 9001 | return is_wol_supported;
|
9011 | 9002 | }
|
9012 | 9003 |
|
9013 |
| -/** |
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 | 9004 | /**
|
9037 | 9005 | * ixgbe_probe - Device Initialization Routine
|
9038 | 9006 | * @pdev: PCI device information struct
|
@@ -9304,7 +9272,8 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
9304 | 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 | 9278 | memcpy(netdev->dev_addr, hw->mac.perm_addr, netdev->addr_len);
|
9310 | 9279 |
|
|
0 commit comments