From c8e098cef00d252ea54ebd5dff2c4ae5e2423efd Mon Sep 17 00:00:00 2001 From: Danny Jeongseok Seo Date: Thu, 19 Jul 2012 13:24:25 +0900 Subject: [PATCH] Modify background scan policy --- debian/changelog | 9 +++++++++ packaging/net-config.spec | 2 +- src/wifi-background-scan.c | 14 ++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index ac6187b..a19f990 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +net-config (0.1.75) unstable; urgency=low + + * Modify background scan policy + * disallow to request bg scan in case the state is connected and rssi is below level 2 + * Git: slp/pkgs/n/net-config + * Tag: net-config_0.1.75 + + -- Sanghoon Cho Fri, 13 Apr 2012 16:37:55 +0900 + net-config (0.1.74) unstable; urgency=low * Fix Wi-Fi power bug when Wi-Fi direct is on diff --git a/packaging/net-config.spec b/packaging/net-config.spec index dfad74a..5a565ce 100644 --- a/packaging/net-config.spec +++ b/packaging/net-config.spec @@ -2,7 +2,7 @@ Name: net-config Summary: TIZEN Network Configuration Module -Version: 0.1.74 +Version: 0.1.75 Release: 1 Group: System/Network License: Apache License Version 2.0 diff --git a/src/wifi-background-scan.c b/src/wifi-background-scan.c index 3cc6026..3abe65f 100644 --- a/src/wifi-background-scan.c +++ b/src/wifi-background-scan.c @@ -20,11 +20,14 @@ */ #include +#include +#include #include "log.h" #include "dbus.h" #include "util.h" #include "wifi.h" +#include "wifi-state.h" #include "wifi-background-scan.h" #define SCAN_INITIAL_DELAY 10 @@ -91,6 +94,17 @@ static gboolean __netconfig_wifi_bgscan_request_connman_scan(void) NULL }; + int snr_level = 0; + + vconf_get_int(VCONFKEY_WIFI_STRENGTH, &snr_level); + if (netconfig_wifi_state_get_service_state() == NETCONFIG_WIFI_CONNECTED) + if (__netconfig_wifi_bgscan_get_mode() == WIFI_BGSCAN_MODE_EXPONENTIAL) + if (snr_level > 2) + return FALSE; + + if (netconfig_wifi_state_get_service_state() == NETCONFIG_WIFI_CONNECTING) + return FALSE; + param_array[0] = path; param_array[1] = request; param_array[2] = param1; -- 2.34.1