3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-30 06:02:39 +01:00

wiphy: Use scan_bss_rank_compare

This commit is contained in:
Denis Kenzior 2015-06-16 14:03:09 -05:00
parent 0cba8ea2e9
commit 0d977f62f6

View File

@ -1469,16 +1469,6 @@ static void mlme_cqm_event(struct l_genl_msg *msg, struct netdev *netdev)
}
}
static int add_bss(const void *a, const void *b, void *user_data)
{
const struct scan_bss *new_bss = a, *bss = b;
if (new_bss->signal_strength > bss->signal_strength)
return 1;
return 0;
}
static void network_reset_bss_list(const void *key, void *value,
void *user_data)
{
@ -1576,7 +1566,7 @@ static void process_bss(struct netdev *netdev, struct scan_bss *bss)
network_emit_added(network);
}
l_queue_insert(network->bss_list, bss, add_bss, NULL);
l_queue_insert(network->bss_list, bss, scan_bss_rank_compare, NULL);
}
static bool new_scan_results(uint32_t wiphy_id, uint32_t ifindex,