summaryrefslogtreecommitdiff
path: root/target/linux/lantiq
diff options
context:
space:
mode:
authorDaniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>2016-05-27 15:30:47 -0700
committerJohn Crispin <john@phrozen.org>2016-05-27 16:08:47 +0200
commit8b321d45be868fd36c8f00166e5d077e497609e6 (patch)
tree14ebdbf488b21a14cd68a5cb499cb4438c74a3a9 /target/linux/lantiq
parent96ad827e17dca3351ecac40a2bc15f0fcaf39edd (diff)
downloadmtk-20170518-8b321d45be868fd36c8f00166e5d077e497609e6.zip
mtk-20170518-8b321d45be868fd36c8f00166e5d077e497609e6.tar.gz
mtk-20170518-8b321d45be868fd36c8f00166e5d077e497609e6.tar.bz2
lantiq: Fix macaddr-setting code on DGN3500 and possibly other devices
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Diffstat (limited to 'target/linux/lantiq')
-rw-r--r--target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
index 25852e2..91a884d 100644
--- a/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
+++ b/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
@@ -379,7 +379,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ eth_mac_set = mac_pton(str, eth_mac);
+ return !eth_mac_set;
+}
-+__setup("ethaddr=", setup_ethaddr);
++early_param("ethaddr", setup_ethaddr);
+
+int __init of_eth_mac_probe(struct platform_device *pdev)
+{
@@ -620,10 +620,10 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
goto err_hw;
- memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr));
-+ if (priv->mac)
++ memcpy(&mac.sa_data, ltq_get_eth_mac(), ETH_ALEN);
++
++ if (priv->mac && !is_valid_ether_addr(mac.sa_data))
+ memcpy(&mac.sa_data, priv->mac, ETH_ALEN);
-+ else
-+ memcpy(&mac.sa_data, ltq_get_eth_mac(), ETH_ALEN);
+
if (!is_valid_ether_addr(mac.sa_data)) {
pr_warn("etop: invalid MAC, using random\n");