esp-iot-bridge icon indicating copy to clipboard operation
esp-iot-bridge copied to clipboard

(spi_and_sdio_host)Adapting to the Linux lower version kernel 3.18.x

Open alexsvn opened this issue 1 year ago • 1 comments

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?

alexsvn avatar Mar 07 '25 09:03 alexsvn

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.

tswen avatar Mar 07 '25 11:03 tswen

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

alexsvn avatar May 19 '25 09:05 alexsvn