Removed unused netif flag for DHCP

This commit is contained in:
Ivan Delamer 2015-02-19 16:22:19 -07:00
parent e312ebcb57
commit b938154f6b
3 changed files with 4 additions and 12 deletions

View File

@ -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

View File

@ -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? */

View File

@ -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