summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2023-10-25 12:16:28 +0900
committerJaehyun Kim <jeik01.kim@samsung.com>2023-10-25 16:11:53 +0900
commit176cb03d6b7cc9265a6d3d11e92a7335c57ff245 (patch)
tree6c53ddeea5cb88f367526eb0c40f41d05e20fdb5 /src/main.c
parent287b39a54e17a3b4bcd400fd89e57d4bc4449b92 (diff)
downloadconnman-176cb03d6b7cc9265a6d3d11e92a7335c57ff245.tar.gz
connman-176cb03d6b7cc9265a6d3d11e92a7335c57ff245.tar.bz2
connman-176cb03d6b7cc9265a6d3d11e92a7335c57ff245.zip
Add ApSelectionMethod config option
Global config option, which allow to select the AP selection method to use when connecting to an AP. Existing AP selection methods have also been modified to use this option. Change-Id: I2e3be557ac0567507f5a098205d788c5f47b2700 Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
Diffstat (limited to 'src/main.c')
-rwxr-xr-xsrc/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 54f06654..8b0a995c 100755
--- a/src/main.c
+++ b/src/main.c
@@ -130,6 +130,7 @@ static struct {
int wifi_roam_min_rssi_2_4GHz;
int wifi_roam_min_rssi_5GHz;
int wifi_roam_min_rssi_6GHz;
+ int wifi_ap_selection_method;
#endif
} connman_settings = {
.bg_scan = true,
@@ -174,6 +175,7 @@ static struct {
.wifi_roam_min_rssi_2_4GHz = 0,
.wifi_roam_min_rssi_5GHz = 0,
.wifi_roam_min_rssi_6GHz = 0,
+ .wifi_ap_selection_method = AP_SELECTION_METHOD_NORMAL,
#endif
};
@@ -275,6 +277,7 @@ static struct {
#define CONF_WIFI_ROAM_MIN_RSSI_2_4 "WifiRoamingMinRSSI_2_4GHz"
#define CONF_WIFI_ROAM_MIN_RSSI_5 "WifiRoamingMinRSSI_5GHz"
#define CONF_WIFI_ROAM_MIN_RSSI_6 "WifiRoamingMinRSSI_6GHz"
+#define CONF_WIFI_AP_SELECTION_METHOD "ApSelectionMethod"
#endif
#if defined TIZEN_EXT
@@ -348,6 +351,7 @@ static const char *supported_options[] = {
CONF_WIFI_ROAM_MIN_RSSI_2_4,
CONF_WIFI_ROAM_MIN_RSSI_5,
CONF_WIFI_ROAM_MIN_RSSI_6,
+ CONF_WIFI_AP_SELECTION_METHOD,
#endif
NULL
};
@@ -799,6 +803,13 @@ static void check_tizen_configuration(GKeyFile *config)
g_clear_error(&error);
+ integer = g_key_file_get_integer(config, "General",
+ CONF_WIFI_AP_SELECTION_METHOD, &error);
+ if (!error)
+ connman_settings.wifi_ap_selection_method = integer;
+
+ g_clear_error(&error);
+
check_tizen_ins_configuration(config);
}
@@ -1424,6 +1435,9 @@ unsigned int connman_setting_get_uint(const char *key)
#if defined TIZEN_EXT
int connman_setting_get_int(const char *key)
{
+ if (g_str_equal(key, CONF_WIFI_AP_SELECTION_METHOD))
+ return connman_settings.wifi_ap_selection_method;
+
if (g_str_equal(key, CONF_INS_SIGNAL_LEVEL3_5GHZ))
return connman_ins_settings.ins_signal_level3_5ghz;