@@ -2469,7 +2469,22 @@ int
wpa_supplicant_need_to_roam_within_ess(struct wpa_supplicant *wpa_s,
wpas_channel_width_rssi_bump(sel_ies, sel_ie_len,
selected->max_cw);
- if (sel_est > cur_est + 5000) {
+ cur_band_score = wpas_evaluate_band_score(current_bss->freq);
+ sel_band_score = wpas_evaluate_band_score(selected->freq);
+
+ /*
+ * RSSI is not directly comparable across bands (e.g., 2.4 GHz
+ * typically reports a stronger RSSI than 5/6 GHz at the same
+ * physical location due to differences in propagation, even when
+ * the higher band offers significantly better throughput). As
+ * such, allow a clear estimated throughput advantage to bypass the
+ * RSSI-based checks below only when the selected BSS is in a
+ * higher-tier band than the current one. For a same-band candidate
+ * or a move down to a lower-tier band, RSSI is directly comparable
+ * and should not be overridden by the throughput estimate alone;
+ * let those fall through to the RSSI-based checks instead.
+ */
+ if (sel_band_score > cur_band_score && sel_est > cur_est + 5000) {
wpa_dbg(wpa_s, MSG_DEBUG,
"Allow reassociation - selected BSS has better estimated throughput");
wpa_supplicant_need_to_roam_within_ess() allows an immediate reassociation whenever the selected BSS has at least 5 Mbps more estimated throughput than the current BSS, bypassing all of the RSSI-based checks further down in the function (signal level skip, GREAT_SNR skip, and the min_diff RSSI comparison). This is problematic when the current and selected BSSes are on the same band (e.g., two 5 GHz APs on different channels within the same ESS). In that case RSSI is directly comparable between them, but the SNR-to-throughput estimation table used by wpas_get_est_tpt() steps in fairly coarse increments per dB of SNR change. A normal +-1 dB RSSI fluctuation on either BSS can therefore push the throughput delta across the 5000 kbps bar purely due to measurement/estimation noise, even when one of the two candidates has an equal or lower RSSI than the other. Repeated over time, this can cause the station to oscillate (reassociate back and forth) between two same-band BSSes with no real, sustained signal or throughput improvement backing each move. The throughput-only bypass is genuinely useful for the case it was originally intended for: 2.4 GHz typically reports a stronger RSSI than 5 GHz/6 GHz at the same physical location due to differences in propagation, even though the higher band may offer significantly better real-world throughput (wider channels, less congestion, higher MCS). RSSI is not an apples-to-apples comparison across bands, so overriding the RSSI-based checks based on throughput alone makes sense there. Restrict the bypass to that case by only allowing it when the selected BSS is in a higher-tier band than the current BSS (using the existing wpas_evaluate_band_score() helper: 2.4 GHz < 5 GHz < 6 GHz). Same-band candidates and moves down to a lower-tier band now fall through to the existing RSSI-based checks (signal level skip, GREAT_SNR, and the min_diff comparison, which already applies its own band-score-based penalty for moving to a lower-tier band), where RSSI is directly comparable and a noisy throughput estimate alone should not be allowed to override it. Signed-off-by: Jayanth <jayanth.rajan96@gmail.com> --- wpa_supplicant/events.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) return 1; @@ -2530,8 +2545,6 @@ int wpa_supplicant_need_to_roam_within_ess(struct wpa_supplicant *wpa_s, else if (sel_est > cur_est) min_diff--; - cur_band_score = wpas_evaluate_band_score(current_bss->freq); - sel_band_score = wpas_evaluate_band_score(selected->freq); min_diff += (cur_band_score - sel_band_score) * 2; if (wpa_s->signal_threshold && cur_level <= wpa_s->signal_threshold && sel_level > wpa_s->signal_threshold)