summaryrefslogtreecommitdiff
path: root/plugins/wifi.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/wifi.c')
-rwxr-xr-xplugins/wifi.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index b0f41169..a967d8bf 100755
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -107,7 +107,7 @@
#define RSSI_LEVEL_2_2_4G -75
#define RSSI_LEVEL_3_5G -68
#define RSSI_LEVEL_3_2_4G -64
-#define ROAM_SCAN_INTERVAL 60 /* 60 seconds */
+#define ROAM_SCAN_INTERVAL 30 /* 30 seconds */
static int min_snr = 0;
static int min_rssi_2_4GHz = 0;
@@ -2226,6 +2226,15 @@ static gboolean check_bss_condition(uint16_t freq, uint16_t strength,
freq, strength, est_throughput);
/*
+ * If any of est_throughput is 0,
+ * the est_throughput comparison is ignored.
+ */
+ if (est_throughput == 0 || cur_est_throughput == 0) {
+ est_throughput = 0;
+ cur_est_throughput = 0;
+ }
+
+ /*
* If the AP that matches the following conditions exists in the SCAN result,
* BSS transition is started.
*/
@@ -4771,6 +4780,8 @@ static void handle_wifi_roaming_complete(struct connman_network *network)
enum connman_ipconfig_type type;
enum connman_ipconfig_method method;
+ connman_network_set_roam_scan_time(network, 0);
+
if (!connman_setting_get_bool("WifiRoaming") ||
!connman_network_get_bool(network, "WiFi.Roaming"))
return;