[PATCH 2/4] Revert "lan78xx: Read MAC address from DT if present"
Paolo Pisati
paolo.pisati at canonical.com
Fri Nov 9 15:44:20 UTC 2018
BugLink: http://bugs.launchpad.net/bugs/1802320
This reverts commit a23d928781936b51a61a67a0799b77b2a6becfa2.
Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
---
drivers/net/usb/lan78xx.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 4a836a4..61dd527 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -31,7 +31,6 @@
#include <linux/mdio.h>
#include <net/ip6_checksum.h>
#include <linux/microchipphy.h>
-#include <linux/of_net.h>
#include "lan78xx.h"
#define DRIVER_AUTHOR "WOOJUNG HUH <woojung.huh at microchip.com>"
@@ -1323,14 +1322,6 @@ static void lan78xx_init_mac_address(struct lan78xx_net *dev)
u32 addr_lo, addr_hi;
int ret;
u8 addr[6];
- const u8 *mac_addr;
-
- /* maybe the boot loader passed the MAC address in devicetree */
- mac_addr = of_get_mac_address(dev->udev->dev.of_node);
- if (mac_addr) {
- ether_addr_copy(addr, mac_addr);
- goto set_mac_addr;
- }
ret = lan78xx_read_reg(dev, RX_ADDRL, &addr_lo);
ret = lan78xx_read_reg(dev, RX_ADDRH, &addr_hi);
@@ -1359,7 +1350,6 @@ static void lan78xx_init_mac_address(struct lan78xx_net *dev)
"MAC address set to random addr");
}
-set_mac_addr:
addr_lo = addr[0] | (addr[1] << 8) |
(addr[2] << 16) | (addr[3] << 24);
addr_hi = addr[4] | (addr[5] << 8);
--
2.7.4
More information about the kernel-team
mailing list