Commit 589efdc7 authored by Lothar Waßmann's avatar Lothar Waßmann Committed by David S. Miller

net/fec: don't munge MAC address from platform data

When the MAC address is supplied via platform_data it should be OK as
it is and should not be modified in case of a dual FEC setup.
Also copying the MAC from platform_data to the single 'macaddr'
variable will overwrite the MAC for the first interface in case of a
dual FEC setup.
Signed-off-by: default avatarLothar Waßmann <LW@KARO-electronics.de>
Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 86f9f2c8
...@@ -818,7 +818,7 @@ static void __inline__ fec_get_mac(struct net_device *ndev) ...@@ -818,7 +818,7 @@ static void __inline__ fec_get_mac(struct net_device *ndev)
iap = (unsigned char *)FEC_FLASHMAC; iap = (unsigned char *)FEC_FLASHMAC;
#else #else
if (pdata) if (pdata)
memcpy(iap, pdata->mac, ETH_ALEN); iap = (unsigned char *)&pdata->mac;
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment