net: sunxi: Correct MAC address register order

Put the enetaddr data in the same order as it was before the change in
commit ace1520cb5 ("net: sunxi-emac: Write HW address via function")

Reported-by: Udo Maslo <u.maslo@web.de>
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
Joe Hershberger 2018-05-01 16:33:55 -05:00
parent 6f0dc0ca31
commit 6e35686d89

View File

@ -334,8 +334,8 @@ static int _sunxi_write_hwaddr(struct emac_eth_dev *priv, u8 *enetaddr)
enetaddr_lo = enetaddr[2] | (enetaddr[1] << 8) | (enetaddr[0] << 16); enetaddr_lo = enetaddr[2] | (enetaddr[1] << 8) | (enetaddr[0] << 16);
enetaddr_hi = enetaddr[5] | (enetaddr[4] << 8) | (enetaddr[3] << 16); enetaddr_hi = enetaddr[5] | (enetaddr[4] << 8) | (enetaddr[3] << 16);
writel(enetaddr_hi, &regs->mac_a1); writel(enetaddr_hi, &regs->mac_a0);
writel(enetaddr_lo, &regs->mac_a0); writel(enetaddr_lo, &regs->mac_a1);
return 0; return 0;
} }