File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
source/portable/NetworkInterface/STM32 Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -395,7 +395,11 @@ static BaseType_t xSTM32_NetworkInterfaceInitialise( NetworkInterface_t * pxInte
395395
396396 case eMACInitComplete :
397397 configASSERT ( xEthHandle .gState != HAL_ETH_STATE_ERROR );
398- xInitResult = pdPASS ;
398+
399+ if ( xSTM32_GetPhyLinkStatus ( pxInterface ) == pdPASS )
400+ {
401+ xInitResult = pdPASS ;
402+ }
399403 }
400404
401405 return xInitResult ;
@@ -696,16 +700,6 @@ static void prvEMACHandlerTask( void * pvParameters )
696700 if ( xPhyCheckLinkStatus ( & xPhyObject , xResult ) != pdFALSE )
697701 {
698702 prvEthernetUpdateConfig ();
699-
700- /*
701- #if ( ipconfigSUPPORT_NETWORK_DOWN_EVENT != 0 )
702- {
703- if( xGetPhyLinkStatus() == pdFALSE )
704- {
705- FreeRTOS_NetworkDown();
706- }
707- }
708- */
709703 }
710704 }
711705}
@@ -792,6 +786,10 @@ static void prvEthernetUpdateConfig( void )
792786 /* iptraceNETWORK_INTERFACE_STATUS_CHANGE(); */
793787 xHalResult = HAL_ETH_Stop_IT ( & xEthHandle );
794788 configASSERT ( xHalResult == HAL_OK );
789+
790+ #if ( ipconfigSUPPORT_NETWORK_DOWN_EVENT != 0 )
791+ FreeRTOS_NetworkDown ( pxMyInterface );
792+ #endif
795793 }
796794}
797795
You can’t perform that action at this time.
0 commit comments