mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Load the bytes into the EMAC's MAC address register in the proper
order. The kernel used to shuffle them around to get things right, but that was recently fixed. This makes our boot loader match the behavior of most other boot loaders for the atmel parts. This bug was inherited from the Kwikbyte loader that we started from. This bug was discovered by Bj.ANvrn KNvnig back in June, but fell on the floor. He provided patches to the kernel, include backwards compatibility options that were similar to Olivier's if_ate.c commit.
This commit is contained in:
parent
cb3d8b2510
commit
3e6468f751
1 changed files with 2 additions and 2 deletions
|
|
@ -79,8 +79,8 @@ EMAC_SetMACAddress(unsigned char mac[6])
|
|||
pPMC->PMC_PCER = ((unsigned) 1 << AT91C_ID_EMAC);
|
||||
|
||||
memcpy(localMACAddr, mac, 6);
|
||||
localMAClow = (mac[2] << 24) | (mac[3] << 16) | (mac[4] << 8) | mac[5];
|
||||
localMAChigh = (mac[0] << 8) | mac[1];
|
||||
localMAClow = (mac[3] << 24) | (mac[2] << 16) | (mac[1] << 8) | mac[0];
|
||||
localMAChigh = (mac[5] << 8) | mac[4];
|
||||
localMACSet = 1;
|
||||
|
||||
AT91C_BASE_PMC->PMC_PCER = 1u << AT91C_ID_EMAC;
|
||||
|
|
|
|||
Loading…
Reference in a new issue