mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 01:07:21 +00:00
components: net: lwip: port: add netdev callback on link status change setting
- set netdev callback on link status change in netdev_add() Signed-off-by: Jiading Xu <Jiading.Xu@hpmicro.com>
This commit is contained in:
@@ -421,6 +421,11 @@ static int netdev_add(struct netif *lwip_netif)
|
||||
netdev->gw = lwip_netif->gw;
|
||||
netdev->netmask = lwip_netif->netmask;
|
||||
|
||||
#ifdef NETDEV_USING_LINK_STATUS_CALLBACK
|
||||
extern void netdev_status_change(struct netdev *netdev, enum netdev_cb_type type);
|
||||
netdev_set_status_callback(netdev, netdev_status_change);
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user