From 788373f5a74bd5cd5fb99261745a7f5ca046a5bf Mon Sep 17 00:00:00 2001 From: sayyadumar Date: Thu, 9 Mar 2023 16:25:36 +0100 Subject: [PATCH 1/2] Read mac address using FreeRTOS_GetMACAddress() rather than using the defines --- .../NetworkInterface/RX/NetworkInterface.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/source/portable/NetworkInterface/RX/NetworkInterface.c b/source/portable/NetworkInterface/RX/NetworkInterface.c index 204588abdb..6d931806a2 100644 --- a/source/portable/NetworkInterface/RX/NetworkInterface.c +++ b/source/portable/NetworkInterface/RX/NetworkInterface.c @@ -422,15 +422,12 @@ static int InitializeNetwork( void ) ether_return_t eth_ret; BaseType_t return_code = pdFALSE; ether_param_t param; - uint8_t myethaddr[ 6 ] = - { - configMAC_ADDR0, - configMAC_ADDR1, - configMAC_ADDR2, - configMAC_ADDR3, - configMAC_ADDR4, - configMAC_ADDR5 - }; /*XXX Fix me */ + + /* Read the mac address after it has been initilized by the FreeRTOS IP Stack, rather than from defines + * as the mac address is usually read from the EEPROM, and it might be different to the mac address in + * the defines, especially in production environments + */ + const uint8_t *myethaddr = FreeRTOS_GetMACAddress(); R_ETHER_PinSet_CHANNEL_0(); R_ETHER_Initial(); From 00ff9b627bed41b8cbde5d19ade9e55ffc83b483 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 10 Mar 2023 18:12:46 +0000 Subject: [PATCH 2/2] Uncrustify: triggered by comment. --- source/portable/NetworkInterface/RX/NetworkInterface.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/portable/NetworkInterface/RX/NetworkInterface.c b/source/portable/NetworkInterface/RX/NetworkInterface.c index 6d931806a2..6b131930e5 100644 --- a/source/portable/NetworkInterface/RX/NetworkInterface.c +++ b/source/portable/NetworkInterface/RX/NetworkInterface.c @@ -422,12 +422,12 @@ static int InitializeNetwork( void ) ether_return_t eth_ret; BaseType_t return_code = pdFALSE; ether_param_t param; - + /* Read the mac address after it has been initilized by the FreeRTOS IP Stack, rather than from defines - * as the mac address is usually read from the EEPROM, and it might be different to the mac address in - * the defines, especially in production environments + * as the mac address is usually read from the EEPROM, and it might be different to the mac address in + * the defines, especially in production environments */ - const uint8_t *myethaddr = FreeRTOS_GetMACAddress(); + const uint8_t * myethaddr = FreeRTOS_GetMACAddress(); R_ETHER_PinSet_CHANNEL_0(); R_ETHER_Initial();