summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2023-09-13 09:27:13 +0000
committerGerrit Code Review <gerrit@review>2023-09-13 09:27:13 +0000
commiteca8f9f7cdf7bc437c6f7794259712feb975bdd6 (patch)
treede20d02c51fa60a70ac0f6f49d81b0d3a7f411d4
parent5357f03efad7e696862cf8692cf305a4cdee8b7f (diff)
parentebd4bbe31aa8319759b8b39992a627329db4e30e (diff)
downloadconnman-eca8f9f7cdf7bc437c6f7794259712feb975bdd6.tar.gz
connman-eca8f9f7cdf7bc437c6f7794259712feb975bdd6.tar.bz2
connman-eca8f9f7cdf7bc437c6f7794259712feb975bdd6.zip
Merge "Update ssid frequency only from best bss signal" into tizen
-rwxr-xr-xgsupplicant/supplicant.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index fce4f7b3..c144a4f1 100755
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -2657,6 +2657,7 @@ static void update_network_with_best_bss(GSupplicantNetwork *network,
network->signal = best_bss->signal;
network->frequency = best_bss->frequency;
+ network->phy_mode = best_bss->phy_mode;
network->best_bss = best_bss;
}
@@ -3530,6 +3531,8 @@ static void update_signal(gpointer key, gpointer value,
if (!network->best_bss || (network->best_bss == bss)) {
if (bss->signal > network->signal) {
network->signal = bss->signal;
+ network->frequency = bss->frequency;
+ network->phy_mode = bss->phy_mode;
network->best_bss = bss;
}
return;
@@ -3615,10 +3618,10 @@ static void interface_current_bss(GSupplicantInterface *interface,
struct g_supplicant_bss *bss;
const char *path;
#if defined TIZEN_EXT
- char bssid_buff1[WIFI_BSSID_STR_LEN] = {0,};
- char bssid_buff2[WIFI_BSSID_STR_LEN] = {0,};
- char *bssid_str1 = bssid_buff1;
- char *bssid_str2 = bssid_buff2;
+ char curr_bssid_buff[WIFI_BSSID_STR_LEN] = {0,};
+ char best_bssid_buff[WIFI_BSSID_STR_LEN] = {0,};
+ char *curr_bssid_str = curr_bssid_buff;
+ char *best_bssid_str = best_bssid_buff;
gboolean update = FALSE;
#endif
@@ -3640,14 +3643,15 @@ static void interface_current_bss(GSupplicantInterface *interface,
interface->current_network = network;
#if defined TIZEN_EXT
- snprintf(bssid_str1, WIFI_BSSID_STR_LEN, MACSTR, MAC2STR(bss->bssid));
- snprintf(bssid_str2, WIFI_BSSID_STR_LEN, MACSTR, MAC2STR(network->best_bss->bssid));
+ snprintf(curr_bssid_str, WIFI_BSSID_STR_LEN, MACSTR, MAC2STR(bss->bssid));
+ snprintf(best_bssid_str, WIFI_BSSID_STR_LEN, MACSTR, MAC2STR(network->best_bss->bssid));
SUPPLICANT_DBG("current network [%p], Passed bss %s, best bss %s",
- interface->current_network, bssid_str1, bssid_str2);
+ interface->current_network, curr_bssid_str, best_bssid_str);
if (network->frequency != bss->frequency) {
network->frequency = bss->frequency;
+ network->phy_mode = bss->phy_mode;
update = TRUE;
}
#endif
@@ -4445,7 +4449,8 @@ static void signal_bss_changed(const char *path, DBusMessageIter *iter)
supplicant_dbus_property_foreach(iter, bss_property, bss);
#if defined TIZEN_EXT
- if (network->interface->state != G_SUPPLICANT_STATE_COMPLETED) {
+ if (network->interface->state != G_SUPPLICANT_STATE_COMPLETED &&
+ bss == network->best_bss) {
network->frequency = bss->frequency;
network->phy_mode = bss->phy_mode;
}