netdev: Return -ENOTCONN in netdev_get_current_station

This commit is contained in:
Denis Kenzior 2021-04-26 10:17:22 -05:00
parent 654154e721
commit 337f5e062e
1 changed files with 3 additions and 0 deletions

View File

@ -4818,6 +4818,9 @@ int netdev_get_current_station(struct netdev *netdev,
netdev_get_station_cb_t cb, void *user_data,
netdev_destroy_func_t destroy)
{
if (!netdev->handshake)
return -ENOTCONN;
return netdev_get_station(netdev, netdev->handshake->aa, cb,
user_data, destroy);
}