Commit 295534c1 authored by Troy Kisky's avatar Troy Kisky Committed by Kevin Hilman

ARM: DaVinci: emac: fix mac order in emac_set_type0addr

Use the same mac order in emac_set_type0addr as in
emac_set_type1addr. The byte order was reversed.
Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent 9ee7ad9e
......@@ -1737,11 +1737,11 @@ static void emac_cleanup_rxch(struct emac_priv *priv, u32 ch)
static void emac_set_type0addr(struct emac_priv *priv, u32 ch, char *mac_addr)
{
u32 val;
val = ((mac_addr[0] << 8) | (mac_addr[1]));
val = ((mac_addr[5] << 8) | (mac_addr[4]));
emac_write(EMAC_MACSRCADDRLO, val);
val = ((mac_addr[2] << 24) | (mac_addr[3] << 16) | \
(mac_addr[4] << 8) | (mac_addr[5]));
val = ((mac_addr[3] << 24) | (mac_addr[2] << 16) | \
(mac_addr[1] << 8) | (mac_addr[0]));
emac_write(EMAC_MACSRCADDRHI, val);
val = emac_read(EMAC_RXUNICASTSET);
val |= (1 << ch);
......
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