1
0
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:
Gunar Schorcht 2019-01-13 17:06:04 +01:00 committed by Schorcht
parent 2c97377585
commit d24d73dadf

View File

@ -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);
}