mirror of
https://github.com/apache/nuttx.git
synced 2026-08-06 21:19:03 +00:00
boards/esp32s3: Fix MAC address byte order in LAN9250 driver
Fix MAC address byte order by reversing 6 bytes after reading from eFuse. Adjust offset logic to apply after byte reversal, ensuring Ethernet MAC is base_mac +3. Comply with Espressif's MAC address generation specification for ESP32S3 Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
This commit is contained in:
parent
a8495b118c
commit
097cc8c8a6
1 changed files with 6 additions and 1 deletions
|
|
@ -188,8 +188,8 @@ static int lan9250_getmac(const struct lan9250_lower_s *lower, uint8_t *mac)
|
|||
{
|
||||
int fd;
|
||||
int ret;
|
||||
#ifndef CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_FOUR
|
||||
int i;
|
||||
#ifndef CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_FOUR
|
||||
uint8_t tmp;
|
||||
#endif
|
||||
|
||||
|
|
@ -227,6 +227,11 @@ static int lan9250_getmac(const struct lan9250_lower_s *lower, uint8_t *mac)
|
|||
|
||||
close(fd);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
mac[i] = mac[5 - i];
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_FOUR
|
||||
mac[5] += 3;
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue