From ef23607a673ccdc3d26648805816061d4a1cb39a Mon Sep 17 00:00:00 2001 From: Wu Jian Gang Date: Fri, 2 Sep 2016 18:18:22 +0800 Subject: [PATCH] lwip: remove netif_reg_addr_change_cb --- components/lwip/core/netif.c | 11 ----------- components/tcpip_adapter/tcpip_adapter_lwip.c | 3 +-- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/components/lwip/core/netif.c b/components/lwip/core/netif.c index 42309f1a3..33e030412 100755 --- a/components/lwip/core/netif.c +++ b/components/lwip/core/netif.c @@ -315,14 +315,6 @@ netif_add(struct netif *netif, return netif; } -typedef int (*netif_addr_change_cb_t)(struct netif *netif); -static netif_addr_change_cb_t g_netif_addr_change_cb = NULL; - -void netif_reg_addr_change_cb(void *cb) -{ - g_netif_addr_change_cb = (netif_addr_change_cb_t)cb; -} - #if LWIP_IPV4 /** * Change IP address configuration for a network interface (including netmask @@ -341,9 +333,6 @@ netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t * netif_set_gw(netif, gw); /* set ipaddr last to ensure netmask/gw have been set when status callback is called */ netif_set_ipaddr(netif, ipaddr); - if (g_netif_addr_change_cb){ - g_netif_addr_change_cb(netif); - } } #endif /* LWIP_IPV4*/ diff --git a/components/tcpip_adapter/tcpip_adapter_lwip.c b/components/tcpip_adapter/tcpip_adapter_lwip.c index 3cd6965bd..b59606bf6 100644 --- a/components/tcpip_adapter/tcpip_adapter_lwip.c +++ b/components/tcpip_adapter/tcpip_adapter_lwip.c @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + #include #include @@ -53,8 +54,6 @@ void tcpip_adapter_init(void) IP4_ADDR(&esp_ip[TCPIP_ADAPTER_IF_AP].gw, 192, 168 , 4, 1); IP4_ADDR(&esp_ip[TCPIP_ADAPTER_IF_AP].netmask, 255, 255 , 255, 0); } - - netif_reg_addr_change_cb(tcpip_adapter_addr_change_cb); } esp_err_t tcpip_adapter_start(tcpip_adapter_if_t tcpip_if, uint8_t *mac, struct ip_info *info)