device: On lost beacon always set roam_no_orig_ap

Even if we're already roaming or preparing to roam, setting this flag
may still affect some step of the roam sequence so set it anyway.
This commit is contained in:
Andrew Zaborowski 2018-06-13 19:05:39 +02:00 committed by Denis Kenzior
parent 660f321c3d
commit 17ad048c8c
1 changed files with 5 additions and 1 deletions

View File

@ -1488,7 +1488,8 @@ static void device_lost_beacon(struct device *device)
{
l_debug("%d", device->index);
if (device->preparing_roam || device->state == DEVICE_STATE_ROAMING)
if (device->state != DEVICE_STATE_ROAMING &&
device->state != DEVICE_STATE_CONNECTED)
return;
/*
@ -1500,6 +1501,9 @@ static void device_lost_beacon(struct device *device)
*/
device->roam_no_orig_ap = true;
if (device->preparing_roam || device->state == DEVICE_STATE_ROAMING)
return;
device_roam_trigger_cb(NULL, device);
}