Skip to content
Snippets Groups Projects
Commit 21181578 authored by Michal Simek's avatar Michal Simek
Browse files

api: Disable api_net when DM is used


When CONFIG_API is selected with DM_ETH this
error is present:
api/api_net.c: In function 'dev_enum_net':
api/api_net.c:61:35: warning: initialization from incompatible pointer
type
  struct eth_device *eth_current = eth_get_dev();
                                   ^
api/api_net.c:68:39: error: dereferencing pointer to incomplete type
  memcpy(di->di_net.hwaddr, eth_current->enetaddr, 6);
                                       ^
Disable api_net functions when ETH_DM is selected.

Signed-off-by: default avatarChris Johns <chrisj@rtems.org>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent 72d8d5d7
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR; ...@@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define errf(fmt, args...) do { printf("ERROR @ %s(): ", __func__); printf(fmt, ##args); } while (0) #define errf(fmt, args...) do { printf("ERROR @ %s(): ", __func__); printf(fmt, ##args); } while (0)
#ifdef CONFIG_CMD_NET #if defined(CONFIG_CMD_NET) && !defined(CONFIG_DM_ETH)
static int dev_valid_net(void *cookie) static int dev_valid_net(void *cookie)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment