mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/esp32: fixes NETOPT_LINK_CONNECTED in esp_wifi
esp_wifi was simply returning the connection state instead of filling the referenced value.
This commit is contained in:
parent
2c97377585
commit
d24d73dadf
@ -358,7 +358,10 @@ static int _esp_wifi_get(netdev_t *netdev, netopt_t opt, void *val, size_t max_l
|
||||
case NETOPT_IS_WIRED:
|
||||
return false;
|
||||
case NETOPT_LINK_CONNECTED:
|
||||
return dev->connected;
|
||||
assert(max_len == 1);
|
||||
*((netopt_enable_t *)val) = (dev->connected) ? NETOPT_ENABLE
|
||||
: NETOPT_DISABLE;
|
||||
return 1;
|
||||
default:
|
||||
return netdev_eth_get(netdev, opt, val, max_len);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user