mirror of
https://github.com/FreeRTOS/FreeRTOS-Plus-TCP
synced 2025-10-25 04:56:15 +08:00
Fix build issue with network interface of STM32F4 (#778)
* fix build errors with STM32F4 netwrok interface * moves the default config for ipconfigUSE_DHCPv6 outside of ipconfigUSE_TCP check * Uncrustify: triggered by comment. --------- Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
@@ -189,12 +189,12 @@
|
||||
#define ipconfigMULTI_INTERFACE ( 1 )
|
||||
#endif
|
||||
|
||||
#if ( ipconfigUSE_TCP != 0 )
|
||||
|
||||
/* Disable IPv6 by default. */
|
||||
#ifndef ipconfigUSE_DHCPv6
|
||||
#ifndef ipconfigUSE_DHCPv6
|
||||
#define ipconfigUSE_DHCPv6 ( 0 )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ( ipconfigUSE_TCP != 0 )
|
||||
|
||||
/* 'ipconfigUSE_TCP_WIN' enables support for TCP sliding windows. When
|
||||
* defined as zero, each TCP packet must be acknowledged individually.
|
||||
|
||||
@@ -182,16 +182,14 @@ static void prvEthernetUpdateConfig( BaseType_t xForce );
|
||||
*/
|
||||
static BaseType_t prvNetworkInterfaceInput( void );
|
||||
|
||||
#if ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_MDNS != 0 ) || ( ipconfigUSE_IPv6 != 0 )
|
||||
|
||||
/*
|
||||
* For LLMNR, an extra MAC-address must be configured to
|
||||
* be able to receive the multicast messages.
|
||||
*/
|
||||
static void prvMACAddressConfig( ETH_HandleTypeDef * heth,
|
||||
static void prvMACAddressConfig( ETH_HandleTypeDef * heth,
|
||||
uint32_t ulIndex,
|
||||
uint8_t * Addr );
|
||||
#endif
|
||||
|
||||
/* FreeRTOS+TCP/multi :
|
||||
* Each network device has 3 access functions:
|
||||
@@ -452,9 +450,7 @@ BaseType_t xSTM32F_NetworkInterfaceInitialise( NetworkInterface_t * pxInterface
|
||||
BaseType_t xResult;
|
||||
NetworkEndPoint_t * pxEndPoint;
|
||||
|
||||
#if ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_MDNS != 0 )
|
||||
BaseType_t xMACEntry = ETH_MAC_ADDRESS1; /* ETH_MAC_ADDRESS0 reserved for the primary MAC-address. */
|
||||
#endif
|
||||
|
||||
if( xMacInitStatus == eMACInit )
|
||||
{
|
||||
@@ -757,11 +753,11 @@ static void prvDMARxDescListInit()
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_MDNS != 0 )
|
||||
static void prvMACAddressConfig( ETH_HandleTypeDef * heth,
|
||||
|
||||
static void prvMACAddressConfig( ETH_HandleTypeDef * heth,
|
||||
uint32_t ulIndex,
|
||||
uint8_t * Addr )
|
||||
{
|
||||
{
|
||||
uint32_t ulTempReg;
|
||||
|
||||
( void ) heth;
|
||||
@@ -777,8 +773,8 @@ static void prvDMARxDescListInit()
|
||||
|
||||
/* Load the selected MAC address low register */
|
||||
( *( __IO uint32_t * ) ( ( uint32_t ) ( ETH_MAC_ADDR_LBASE + ulIndex ) ) ) = ulTempReg;
|
||||
}
|
||||
#endif /* if ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_MDNS != 0 ) */
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static BaseType_t xSTM32F_NetworkInterfaceOutput( NetworkInterface_t * pxInterface,
|
||||
|
||||
Reference in New Issue
Block a user