From 4fe793e6076f55fca604ce97e4e5141d16695f42 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 1 Sep 2011 21:30:11 +0200 Subject: [PATCH] use tcpip_callback(netif_set_link_up, netif) to set the flag NETIF_FLAG_LINK_UP --- drivers/net/rckemac.c | 4 +++- drivers/net/rtl8139.c | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/rckemac.c b/drivers/net/rckemac.c index 13a29bd7..5509105b 100644 --- a/drivers/net/rckemac.c +++ b/drivers/net/rckemac.c @@ -755,12 +755,14 @@ err_t rckemacif_init(struct netif* netif) /* maximum transfer unit */ netif->mtu = 1500; /* broadcast capability */ - netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP; + netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; /* hardware address length */ netif->hwaddr_len = 6; rckemacif->ethaddr = (struct eth_addr *)netif->hwaddr; + tcpip_callback(netif_set_link_up, netif); + return ERR_OK; } #endif diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c index c7978fdf..cc3ab28d 100644 --- a/drivers/net/rtl8139.c +++ b/drivers/net/rtl8139.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -440,12 +441,14 @@ err_t rtl8139if_init(struct netif* netif) /* maximum transfer unit */ netif->mtu = 1500; /* broadcast capability */ - netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP; + netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; /* hardware address length */ netif->hwaddr_len = 6; rtl8139if->ethaddr = (struct eth_addr *)netif->hwaddr; + tcpip_callback(netif_set_link_up, netif); + return ERR_OK; } #endif