mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-01 04:12:07 +00:00
Removed unused netif flag for DHCP
This commit is contained in:
parent
e312ebcb57
commit
b938154f6b
@ -6,6 +6,10 @@ HISTORY
|
|||||||
|
|
||||||
++ New features:
|
++ 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
|
2015-02-19: Ivan Delamer
|
||||||
* netif.h, slipif.c, ppp.c: Removed unused netif flag for point to point connections
|
* netif.h, slipif.c, ppp.c: Removed unused netif flag for point to point connections
|
||||||
|
|
||||||
|
@ -678,10 +678,6 @@ dhcp_start(struct netif *netif)
|
|||||||
return ERR_MEM;
|
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? */
|
/* no DHCP client attached yet? */
|
||||||
if (dhcp == NULL) {
|
if (dhcp == NULL) {
|
||||||
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting new DHCP client\n"));
|
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)) {
|
if (!netif_is_link_up(netif)) {
|
||||||
/* set state INIT and wait for dhcp_network_changed() to call dhcp_discover() */
|
/* set state INIT and wait for dhcp_network_changed() to call dhcp_discover() */
|
||||||
dhcp_set_state(dhcp, DHCP_INIT);
|
dhcp_set_state(dhcp, DHCP_INIT);
|
||||||
netif->flags |= NETIF_FLAG_DHCP;
|
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
#endif /* LWIP_DHCP_CHECK_LINK_UP */
|
#endif /* LWIP_DHCP_CHECK_LINK_UP */
|
||||||
@ -736,8 +731,6 @@ dhcp_start(struct netif *netif)
|
|||||||
dhcp_stop(netif);
|
dhcp_stop(netif);
|
||||||
return ERR_MEM;
|
return ERR_MEM;
|
||||||
}
|
}
|
||||||
/* Set the flag that says this netif is handled by DHCP. */
|
|
||||||
netif->flags |= NETIF_FLAG_DHCP;
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1268,8 +1261,6 @@ dhcp_stop(struct netif *netif)
|
|||||||
struct dhcp *dhcp;
|
struct dhcp *dhcp;
|
||||||
LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;);
|
LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;);
|
||||||
dhcp = netif->dhcp;
|
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"));
|
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_stop()\n"));
|
||||||
/* netif is DHCP configured? */
|
/* netif is DHCP configured? */
|
||||||
|
@ -77,9 +77,6 @@ extern "C" {
|
|||||||
/** If set, the netif has broadcast capability.
|
/** If set, the netif has broadcast capability.
|
||||||
* Set by the netif driver in its init function. */
|
* Set by the netif driver in its init function. */
|
||||||
#define NETIF_FLAG_BROADCAST 0x02U
|
#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
|
/** If set, the interface has an active link
|
||||||
* (set by the network interface driver).
|
* (set by the network interface driver).
|
||||||
* Either set by the netif driver in its init function (if the link
|
* Either set by the netif driver in its init function (if the link
|
||||||
|
Loading…
Reference in New Issue
Block a user