mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
pkg/lwip: Fall back to netdev when getting options
Adds support for mac address, link state and more
This commit is contained in:
parent
8796293c5a
commit
4679d3d06e
@ -39,6 +39,7 @@ int netif_get_opt(netif_t *iface, netopt_t opt, uint16_t context,
|
||||
(void)context;
|
||||
lwip_netif_t *lwip_netif = (lwip_netif_t*) iface;
|
||||
struct netif *netif = &lwip_netif->lwip_netif;
|
||||
struct netdev *dev = netif->state;
|
||||
int res = -ENOTSUP;
|
||||
switch (opt) {
|
||||
#ifdef MODULE_LWIP_IPV6
|
||||
@ -63,6 +64,10 @@ int netif_get_opt(netif_t *iface, netopt_t opt, uint16_t context,
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (res == -ENOTSUP) {
|
||||
// Ask underlying netdev
|
||||
res = dev->driver->get(dev, opt, value, max_len);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user