aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-5.4/701-net-0009-dpa-SDK-DPAA-1.x-Ethernet-driver.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/layerscape/patches-5.4/701-net-0009-dpa-SDK-DPAA-1.x-Ethernet-driver.patch')
-rw-r--r--target/linux/layerscape/patches-5.4/701-net-0009-dpa-SDK-DPAA-1.x-Ethernet-driver.patch8
1 files changed, 3 insertions, 5 deletions
diff --git a/target/linux/layerscape/patches-5.4/701-net-0009-dpa-SDK-DPAA-1.x-Ethernet-driver.patch b/target/linux/layerscape/patches-5.4/701-net-0009-dpa-SDK-DPAA-1.x-Ethernet-driver.patch
index 29b52d2238..215569e406 100644
--- a/target/linux/layerscape/patches-5.4/701-net-0009-dpa-SDK-DPAA-1.x-Ethernet-driver.patch
+++ b/target/linux/layerscape/patches-5.4/701-net-0009-dpa-SDK-DPAA-1.x-Ethernet-driver.patch
@@ -10514,7 +10514,7 @@ Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
+module_exit(dpa_ptp_unload);
--- /dev/null
+++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c
-@@ -0,0 +1,909 @@
+@@ -0,0 +1,907 @@
+/* Copyright 2008-2012 Freescale Semiconductor, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
@@ -11582,7 +11582,6 @@ Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
+ struct mac_device *mac_dev;
+ struct platform_device *of_dev;
+ struct resource res;
-+ const uint8_t *mac_addr;
+ const char *char_prop;
+ int nph;
+ u32 cell_index;
@@ -11701,14 +11700,13 @@ Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
+ mac_dev->cell_index -= 8;
+
+ /* Get the MAC address */
-+ mac_addr = of_get_mac_address(mac_node);
-+ if (unlikely(mac_addr == NULL)) {
++ of_get_mac_address(mac_node, mac_dev->addr);
++ if (unlikely(!is_valid_ether_addr(mac_dev->addr))) {
+ dev_err(dev, "of_get_mac_address(%s) failed\n",
+ mac_node->full_name);
+ _errno = -EINVAL;
+ goto _return_dev_set_drvdata;
+ }
-+ memcpy(mac_dev->addr, mac_addr, sizeof(mac_dev->addr));
+
+ /* Verify the number of port handles */
+ nph = of_count_phandle_with_args(mac_node, "fsl,fman-ports", NULL);