浏览代码

Merge pull request #785 from armink/fix_lwip_linkup

[LWIP] Fix lwip 2.0.2 link status problem.
Bernard Xiong 7 年之前
父节点
当前提交
370be08376
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      components/net/lwip-2.0.2/src/arch/sys_arch.c
  2. 1 1
      components/net/lwip-2.0.2/src/netif/ethernetif.c

+ 1 - 1
components/net/lwip-2.0.2/src/arch/sys_arch.c

@@ -114,7 +114,7 @@ static void tcpip_init_done_callback(void *arg)
             netif_set_up(ethif->netif);
 #endif
 
-            if (!(ethif->flags & ETHIF_LINK_PHYUP))
+            if (ethif->flags & ETHIF_LINK_PHYUP)
             {
                 netif_set_link_up(ethif->netif);
             }

+ 1 - 1
components/net/lwip-2.0.2/src/netif/ethernetif.c

@@ -180,7 +180,7 @@ static err_t eth_netif_device_init(struct netif *netif)
         netif_set_up(ethif->netif);
 #endif
 
-        if (!(ethif->flags & ETHIF_LINK_PHYUP))
+        if (ethif->flags & ETHIF_LINK_PHYUP)
         {
             /* set link_up for this netif */
             netif_set_link_up(ethif->netif);