mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
scan: use signal strength if bss ranks are equal
If two BSS's end up with the same rank sort them based on signal strength so IWD still prefers the higher strength BSS.
This commit is contained in:
parent
f85fc4202a
commit
ea23556a40
@ -1628,6 +1628,10 @@ int scan_bss_rank_compare(const void *a, const void *b, void *user_data)
|
|||||||
{
|
{
|
||||||
const struct scan_bss *new_bss = a, *bss = b;
|
const struct scan_bss *new_bss = a, *bss = b;
|
||||||
|
|
||||||
|
if (bss->rank == new_bss->rank)
|
||||||
|
return (bss->signal_strength >
|
||||||
|
new_bss->signal_strength) ? 1 : -1;
|
||||||
|
|
||||||
return (bss->rank > new_bss->rank) ? 1 : -1;
|
return (bss->rank > new_bss->rank) ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user