@@ -2163,7 +2163,8 @@ static int wpas_evaluate_band_score(int frequency)
int wpa_supplicant_need_to_roam_within_ess(struct wpa_supplicant *wpa_s,
struct wpa_bss *current_bss,
- struct wpa_bss *selected)
+ struct wpa_bss *selected,
+ bool poll_current)
{
int min_diff, diff;
int cur_band_score, sel_band_score;
@@ -2218,7 +2219,7 @@ int wpa_supplicant_need_to_roam_within_ess(struct wpa_supplicant *wpa_s,
* scan results may be a bit old, since we can very quickly get fresh
* information about our currently associated AP.
*/
- if (wpa_drv_signal_poll(wpa_s, &si) == 0 &&
+ if (poll_current && wpa_drv_signal_poll(wpa_s, &si) == 0 &&
(si.data.avg_beacon_signal || si.data.avg_signal)) {
/*
* Normalize avg_signal to the RSSI over 20 MHz, as the
@@ -2391,7 +2392,7 @@ static int wpa_supplicant_need_to_roam(struct wpa_supplicant *wpa_s,
#ifndef CONFIG_NO_ROAMING
return wpa_supplicant_need_to_roam_within_ess(wpa_s, current_bss,
- selected);
+ selected, true);
#else /* CONFIG_NO_ROAMING */
return 0;
#endif /* CONFIG_NO_ROAMING */
@@ -1195,9 +1195,9 @@ int wnm_scan_process(struct wpa_supplicant *wpa_s, bool pre_scan_check)
#ifndef CONFIG_NO_ROAMING
if (wpa_s->current_bss && bss != wpa_s->current_bss &&
- wpa_supplicant_need_to_roam_within_ess(wpa_s,
+ wpa_supplicant_need_to_roam_within_ess(wpa_s, bss,
wpa_s->current_bss,
- bss))
+ false))
return 0;
#endif /* CONFIG_NO_ROAMING */
}
@@ -1868,7 +1868,8 @@ void wpa_supplicant_update_channel_list(struct wpa_supplicant *wpa_s,
struct channel_list_changed *info);
int wpa_supplicant_need_to_roam_within_ess(struct wpa_supplicant *wpa_s,
struct wpa_bss *current_bss,
- struct wpa_bss *seleceted);
+ struct wpa_bss *selected,
+ bool poll_current);
void wpas_reset_mlo_info(struct wpa_supplicant *wpa_s);
/* eap_register.c */