@@ -184,11 +184,7 @@ static int roam_bss_rank_compare(const void *a, const void *b, void *user_data)
{
const struct roam_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 __scan_bss_rank_compare(new_bss, bss);
}
struct wiphy *station_get_wiphy(struct station *station)
@@ -3268,6 +3264,10 @@ static void station_ap_directed_roam(struct station *station,
l_timeout_remove(station->roam_trigger_timeout);
station->roam_trigger_timeout = NULL;
+ blacklist_add_bss(station->connected_bss->addr,
+ BLACKLIST_REASON_ROAM_REQUESTED);
+ station_debug_event(station, "ap-roam-blacklist-added");
+
if (req_mode & WNM_REQUEST_MODE_PREFERRED_CANDIDATE_LIST) {
l_debug("roam: AP sent a preferred candidate list");
station_neighbor_report_cb(station->netdev, 0, body + pos,