usteer: Fix better candidate not being set in policy
The candidate is never set in this loop. Fix it by setting it to the first valid entry. Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@westermo.com>
This commit is contained in:

committed by
David Bauer

parent
d9b3877198
commit
7afab9604b
2
policy.c
2
policy.c
@@ -143,7 +143,7 @@ find_better_candidate(struct sta_info *si_ref, struct uevent *ev, uint32_t requi
|
|||||||
ev->select_reasons = reasons;
|
ev->select_reasons = reasons;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (candidate && si->signal > candidate->signal)
|
if (!candidate || si->signal > candidate->signal)
|
||||||
candidate = si;
|
candidate = si;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user