/* This function will set network interface device DHCP status. @NOTE it can only be called in the network interface device driver. */
void netdev_low_level_set_dhcp_status(struct netdev *netdev, bool is_enable)
/* This function will set network interface device DHCP status. @NOTE it can only be called in the network interface device driver. */
void netdev_low_level_set_dhcp_status(struct netdev *netdev, bool is_enable)
{
    if (netdev && netdev_is_dhcp_enabled(netdev) != is_enable)
    {
        if (is_enable)
        {
            netdev->flags |= NETDEV_FLAG_DHCP;
        }
        else
        {
            netdev->flags &= ~NETDEV_FLAG_DHCP;
        }
        if (netdev->status_callback)
        {
            netdev->status_callback(netdev, is_enable ? NETDEV_CB_STATUS_DHCP_ENABLE : NETDEV_CB_STATUS_DHCP_DISABLE);
        }
    }
}