esp-iot-bridge
esp-iot-bridge copied to clipboard
(spi_and_sdio_host)Adapting to the Linux lower version kernel 3.18.x
Checklist
- [x] Checked the issue tracker for similar issues to ensure this is not a duplicate.
- [x] Provided a clear description of your suggestion.
- [x] Included any relevant context or examples.
Issue or Suggestion Description
dev_change_proto_down_generi() is undefined, how to replace it?
The primary purpose of the dev_change_proto_down_generic API is to control the down or up state of a network interface. You can check if there is a similar API in the 3.18.x kernel version that can handle the corresponding operations.
Update and modify, close the issue
#if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 0, 0))
dev_change_proto_down_generic(priv->ndev, dhcps->set_link);
#else
if (dhcps->set_link)
netif_carrier_on(priv->ndev);
else
netif_carrier_off(priv->ndev);
#endif