summaryrefslogtreecommitdiff
path: root/gsupplicant
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2021-12-19 11:32:46 +0000
committerGerrit Code Review <gerrit@review>2021-12-19 11:32:46 +0000
commitd4fbe50ed65c256d0592cd61496eda3e0bac5389 (patch)
tree355651287cb32a1421e020565d3ed452cf3e3683 /gsupplicant
parentcbc442527ed68fe86c882fd66aa1815124ec27dc (diff)
parent4e445f017dd2c5aaa204002db74584fec457f9d8 (diff)
downloadconnman-d4fbe50ed65c256d0592cd61496eda3e0bac5389.tar.gz
connman-d4fbe50ed65c256d0592cd61496eda3e0bac5389.tar.bz2
connman-d4fbe50ed65c256d0592cd61496eda3e0bac5389.zip
Merge "Start scan for wifi roaming when SNR and signal are weakened" into tizen
Diffstat (limited to 'gsupplicant')
-rwxr-xr-xgsupplicant/gsupplicant.h2
-rwxr-xr-xgsupplicant/supplicant.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h
index 54283793..07786d90 100755
--- a/gsupplicant/gsupplicant.h
+++ b/gsupplicant/gsupplicant.h
@@ -305,7 +305,7 @@ typedef void (*GSupplicantInterfaceCallback) (int result,
#if defined TIZEN_EXT
typedef void (*GSupplicantMaxSpeedCallback) (int result, int maxspeed,
- int strength, void *user_data);
+ int strength, int snr, void *user_data);
#endif
void g_supplicant_interface_cancel(GSupplicantInterface *interface);
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index e439dbe0..9d14c3c7 100755
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -6439,6 +6439,7 @@ static void interface_signalpoll_result(const char *error,
int err = 0;
dbus_int32_t maxspeed = 0;
dbus_int32_t strength = 0;
+ dbus_int32_t snr = 0;
DBusMessageIter sub_iter, dict;
if (error) {
@@ -6475,6 +6476,10 @@ static void interface_signalpoll_result(const char *error,
dbus_message_iter_get_basic(&value, &strength);
SUPPLICANT_DBG("Strength = %d", strength);
break;
+ } else if (g_strcmp0(key, "SNR") == 0) {
+ dbus_message_iter_get_basic(&value, &snr);
+ SUPPLICANT_DBG("SNR = %d", snr);
+ break;
}
}
dbus_message_iter_next(&dict);
@@ -6482,7 +6487,7 @@ static void interface_signalpoll_result(const char *error,
out:
if(data->callback)
- data->callback(err, maxspeed, strength, data->user_data);
+ data->callback(err, maxspeed, strength, snr, data->user_data);
g_free(data->path);
dbus_free(data);