device: on abort, don't call device_disassociated

All of the abortion logic is invoked when device_disconnect is called.
So there's no point calling device_disassociated in this case.  This
also prevents us from entering into autoconnect mode too early.
This commit is contained in:
Denis Kenzior 2016-08-04 11:33:13 -05:00
parent 8248c1c7d2
commit 694c62985a
1 changed files with 3 additions and 1 deletions

View File

@ -607,7 +607,9 @@ static void device_connect_cb(struct netdev *netdev, enum netdev_result result,
}
if (result != NETDEV_RESULT_OK) {
device_disassociated(device);
if (result != NETDEV_RESULT_ABORTED)
device_disassociated(device);
return;
}