Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Unified Diff: wpa_supplicant/bgscan_simple.c

Issue 3020075: CHROMIUMOS: wpa_supplicant: Honor initial bgscan timer (Closed) Base URL: ssh://gitrw.chromium.org/hostap.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: wpa_supplicant/bgscan_simple.c
diff --git a/wpa_supplicant/bgscan_simple.c b/wpa_supplicant/bgscan_simple.c
index a932553f49c8869048fbcc6406005d7cf6c9bb81..aeef7e87bab27d718779956ffdd776f712e692b8 100644
--- a/wpa_supplicant/bgscan_simple.c
+++ b/wpa_supplicant/bgscan_simple.c
@@ -31,6 +31,7 @@ struct bgscan_simple_data {
int short_interval; /* use if signal < threshold */
int long_interval; /* use if signal > threshold */
struct os_time last_bgscan;
+ int init_scan;
};
@@ -57,8 +58,10 @@ static void bgscan_simple_timeout(void *eloop_ctx, void *timeout_ctx)
wpa_printf(MSG_DEBUG, "bgscan simple: Failed to trigger scan");
eloop_register_timeout(data->scan_interval, 0,
bgscan_simple_timeout, data, NULL);
- } else
+ } else {
os_get_time(&data->last_bgscan);
+ data->init_scan = 0;
+ }
}
@@ -122,6 +125,7 @@ static void * bgscan_simple_init(struct wpa_supplicant *wpa_s,
}
data->scan_interval = data->short_interval;
+ data->init_scan = 1;
eloop_register_timeout(data->scan_interval, 0, bgscan_simple_timeout,
data, NULL);
return data;
@@ -171,7 +175,8 @@ static void bgscan_simple_notify_signal_change(void *priv, int above)
struct bgscan_simple_data *data = priv;
if (data->short_interval == data->long_interval ||
- data->signal_threshold == 0)
+ data->signal_threshold == 0 ||
+ data->init_scan != 0)
return;
wpa_printf(MSG_DEBUG, "bgscan simple: signal level changed "
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698