mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-24 23:25:58 +00:00
Add NETIF_LINK_CALLBACK into the netif_set_link_up/down functions
This commit is contained in:
parent
fdc4c25e67
commit
c555b532a2
@ -445,12 +445,14 @@ void netif_set_link_callback( struct netif *netif, void (* link_callback)(struct
|
|||||||
if ( netif )
|
if ( netif )
|
||||||
netif->link_callback = link_callback;
|
netif->link_callback = link_callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called by a driver when its link goes down
|
* Called by a driver when its link goes down
|
||||||
*/
|
*/
|
||||||
void netif_set_link_down( struct netif *netif )
|
void netif_set_link_down( struct netif *netif )
|
||||||
{
|
{
|
||||||
netif->flags &= ~NETIF_FLAG_LINK_UP;
|
netif->flags &= ~NETIF_FLAG_LINK_UP;
|
||||||
|
NETIF_LINK_CALLBACK(netif);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -470,5 +472,7 @@ void netif_set_link_up( struct netif *netif )
|
|||||||
etharp_query(netif, &(netif->ip_addr), NULL);
|
etharp_query(netif, &(netif->ip_addr), NULL);
|
||||||
}
|
}
|
||||||
#endif /* LWIP_ARP */
|
#endif /* LWIP_ARP */
|
||||||
|
|
||||||
|
NETIF_LINK_CALLBACK(netif);
|
||||||
}
|
}
|
||||||
#endif /* LWIP_NETIF_LINK_CALLBACK */
|
#endif /* LWIP_NETIF_LINK_CALLBACK */
|
||||||
|
Loading…
Reference in New Issue
Block a user