From b938154f6b3972f89d7b229605816a690b704979 Mon Sep 17 00:00:00 2001 From: Ivan Delamer Date: Thu, 19 Feb 2015 16:22:19 -0700 Subject: [PATCH] Removed unused netif flag for DHCP --- CHANGELOG | 4 ++++ src/core/dhcp.c | 9 --------- src/include/lwip/netif.h | 3 --- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 9cef025a..151d49fc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,10 @@ HISTORY ++ New features: + 2015-02-19: Ivan Delamer + * netif.h, dhcp.c: Removed unused netif flag for DHCP. The preferred way to evaluate + if DHCP is active is through netif->dhcp field. + 2015-02-19: Ivan Delamer * netif.h, slipif.c, ppp.c: Removed unused netif flag for point to point connections diff --git a/src/core/dhcp.c b/src/core/dhcp.c index aafe6fe3..8e676db0 100644 --- a/src/core/dhcp.c +++ b/src/core/dhcp.c @@ -678,10 +678,6 @@ dhcp_start(struct netif *netif) return ERR_MEM; } - /* Remove the flag that says this netif is handled by DHCP, - it is set when we succeeded starting. */ - netif->flags &= ~NETIF_FLAG_DHCP; - /* no DHCP client attached yet? */ if (dhcp == NULL) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting new DHCP client\n")); @@ -724,7 +720,6 @@ dhcp_start(struct netif *netif) if (!netif_is_link_up(netif)) { /* set state INIT and wait for dhcp_network_changed() to call dhcp_discover() */ dhcp_set_state(dhcp, DHCP_INIT); - netif->flags |= NETIF_FLAG_DHCP; return ERR_OK; } #endif /* LWIP_DHCP_CHECK_LINK_UP */ @@ -736,8 +731,6 @@ dhcp_start(struct netif *netif) dhcp_stop(netif); return ERR_MEM; } - /* Set the flag that says this netif is handled by DHCP. */ - netif->flags |= NETIF_FLAG_DHCP; return result; } @@ -1268,8 +1261,6 @@ dhcp_stop(struct netif *netif) struct dhcp *dhcp; LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;); dhcp = netif->dhcp; - /* Remove the flag that says this netif is handled by DHCP. */ - netif->flags &= ~NETIF_FLAG_DHCP; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_stop()\n")); /* netif is DHCP configured? */ diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index abd8af9e..6a9ffeb7 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -77,9 +77,6 @@ extern "C" { /** If set, the netif has broadcast capability. * Set by the netif driver in its init function. */ #define NETIF_FLAG_BROADCAST 0x02U -/** If set, the interface is configured using DHCP. - * Set by the DHCP code when starting or stopping DHCP. */ -#define NETIF_FLAG_DHCP 0x08U /** If set, the interface has an active link * (set by the network interface driver). * Either set by the netif driver in its init function (if the link