mirror of https://github.com/armbian/build.git
43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
From c89579702f2848b9870ae78481a2a89bb06d7837 Mon Sep 17 00:00:00 2001
|
|
From: Igor Pecovnik <igor.pecovnik@gmail.com>
|
|
Date: Wed, 21 Jul 2021 20:35:07 +0000
|
|
Subject: [PATCH] Workaround - need proper adjustement for reading MAC from DT
|
|
|
|
Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com>
|
|
---
|
|
drivers/net/usb/r8152.c | 18 +++++++++---------
|
|
1 file changed, 9 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
|
|
index 02ac27bd3..d6f05d590 100644
|
|
--- a/drivers/net/usb/r8152.c
|
|
+++ b/drivers/net/usb/r8152.c
|
|
@@ -1691,15 +1691,15 @@ static int determine_ethernet_addr(struct r8152 *tp, struct sockaddr *sa)
|
|
netif_err(tp, probe, dev, "Get ether addr fail\n");
|
|
} else if (!is_valid_ether_addr(sa->sa_data)) {
|
|
/* try to get MAC address from DT */
|
|
- if (tp->udev->dev.of_node) {
|
|
- const u8 *mac = of_get_mac_address(tp->udev->dev.of_node);
|
|
- if (!IS_ERR(mac) && is_valid_ether_addr(mac)) {
|
|
- ether_addr_copy(sa->sa_data, mac);
|
|
- netif_info(tp, probe, dev, "DT mac addr %pM\n",
|
|
- sa->sa_data);
|
|
- return 0;
|
|
- }
|
|
- }
|
|
+// if (tp->udev->dev.of_node) {
|
|
+// const u8 *mac = of_get_mac_address(tp->udev->dev.of_node);
|
|
+// if (!IS_ERR(mac) && is_valid_ether_addr(mac)) {
|
|
+// ether_addr_copy(sa->sa_data, mac);
|
|
+// netif_info(tp, probe, dev, "DT mac addr %pM\n",
|
|
+// sa->sa_data);
|
|
+// return 0;
|
|
+// }
|
|
+// }
|
|
|
|
netif_err(tp, probe, dev, "Invalid ether addr %pM\n",
|
|
sa->sa_data);
|
|
--
|
|
Created with Armbian build tools https://github.com/armbian/build
|
|
|