Decrease cross-threshold roam difficulty with bgscan_simple
Decrease the roam difficulty when roaming across the short background scan threshold (i.e., when the current BSS RSSI is below the threshold and the selected BSS RSSI is above the threshold). This tends to happen in normal roaming scenarios when moving from the domain of one AP to the domain of another. Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
This commit is contained in:
parent
9aa82da229
commit
05474b34bf
3 changed files with 8 additions and 1 deletions
|
@ -189,6 +189,7 @@ static void * bgscan_simple_init(struct wpa_supplicant *wpa_s,
|
|||
data->scan_interval = data->short_interval;
|
||||
data->max_short_scans = data->long_interval / data->short_interval + 1;
|
||||
if (data->signal_threshold) {
|
||||
wpa_s->signal_threshold = data->signal_threshold;
|
||||
/* Poll for signal info to set initial scan interval */
|
||||
struct wpa_signal_info siginfo;
|
||||
if (wpa_drv_signal_poll(wpa_s, &siginfo) == 0 &&
|
||||
|
@ -216,8 +217,10 @@ static void bgscan_simple_deinit(void *priv)
|
|||
{
|
||||
struct bgscan_simple_data *data = priv;
|
||||
eloop_cancel_timeout(bgscan_simple_timeout, data, NULL);
|
||||
if (data->signal_threshold)
|
||||
if (data->signal_threshold) {
|
||||
data->wpa_s->signal_threshold = 0;
|
||||
wpa_drv_signal_monitor(data->wpa_s, 0, 0);
|
||||
}
|
||||
os_free(data);
|
||||
}
|
||||
|
||||
|
|
|
@ -2281,6 +2281,9 @@ int wpa_supplicant_need_to_roam_within_ess(struct wpa_supplicant *wpa_s,
|
|||
min_diff -= 2;
|
||||
if (to_6ghz)
|
||||
min_diff -= 2;
|
||||
if (wpa_s->signal_threshold && cur_level <= wpa_s->signal_threshold &&
|
||||
sel_level > wpa_s->signal_threshold)
|
||||
min_diff -= 2;
|
||||
diff = sel_level - cur_level;
|
||||
if (diff < min_diff) {
|
||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||
|
|
|
@ -1193,6 +1193,7 @@ struct wpa_supplicant {
|
|||
struct wpa_ssid *bgscan_ssid;
|
||||
const struct bgscan_ops *bgscan;
|
||||
void *bgscan_priv;
|
||||
int signal_threshold;
|
||||
|
||||
const struct autoscan_ops *autoscan;
|
||||
struct wpa_driver_scan_params *autoscan_params;
|
||||
|
|
Loading…
Reference in a new issue