diff options
author | Jaehyun Kim <jeik01.kim@samsung.com> | 2019-09-10 08:08:14 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.ap-northeast-2.compute.internal> | 2019-09-10 08:08:14 +0000 |
commit | 447d2492cd8e11a077f9c5bbb3e8cdc981c88090 (patch) | |
tree | acfdf4f469118f87ab0d993d341cf71f74a48a7b /plugins | |
parent | 077b269454092b10a74574be422a4431fa148490 (diff) | |
parent | 99b2c81f38ae73c1f31b8f310f4445dcab534fe8 (diff) | |
download | connman-447d2492cd8e11a077f9c5bbb3e8cdc981c88090.tar.gz connman-447d2492cd8e11a077f9c5bbb3e8cdc981c88090.tar.bz2 connman-447d2492cd8e11a077f9c5bbb3e8cdc981c88090.zip |
Merge "Update RSSI/Strength of connected service using SignalPoll event" into tizen
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/wifi.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c index f842b341..8da1da56 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -3676,7 +3676,8 @@ static void set_connection_mode(struct connman_network *network, connman_network_set_connection_mode(network, conn_mode); } -static void signalpoll_callback(int result, int maxspeed, void *user_data) +static void signalpoll_callback(int result, int maxspeed, uint8_t strength, + void *user_data) { struct connman_network *network = user_data; @@ -3685,8 +3686,13 @@ static void signalpoll_callback(int result, int maxspeed, void *user_data) return; } - DBG("maxspeed = %d", maxspeed); + strength += 120; + if (strength > 100) + strength = 100; + + DBG("maxspeed = %d, strength = %d", maxspeed, strength); if (network) { + connman_network_set_strength(network, strength); connman_network_set_maxspeed(network, maxspeed); set_connection_mode(network, maxspeed); } @@ -4091,7 +4097,7 @@ static void interface_state(GSupplicantInterface *interface) if (ret < 0) DBG("Fail to get max speed !!"); else - wifi->automaxspeed_timeout = g_timeout_add_seconds(30, autosignalpoll_timeout, wifi); + wifi->automaxspeed_timeout = g_timeout_add_seconds(10, autosignalpoll_timeout, wifi); } g_hash_table_remove_all(failed_bssids); @@ -4112,6 +4118,7 @@ static void interface_state(GSupplicantInterface *interface) case G_SUPPLICANT_STATE_DISCONNECTED: #if defined TIZEN_EXT + connman_network_set_strength(network, 0); connman_network_set_maxspeed(network, 0); if (wifi->automaxspeed_timeout != 0) { |