diff options
author | Niraj Kumar Goit <niraj.g@samsung.com> | 2019-03-29 10:54:53 +0530 |
---|---|---|
committer | Niraj Kumar Goit <niraj.g@samsung.com> | 2019-03-29 10:54:53 +0530 |
commit | 85074ce75ce1749e270dc9951d003d4a3c1f9cab (patch) | |
tree | 55b044abc96323eb7f267c4095a195a106e3b983 /gsupplicant/supplicant.c | |
parent | d470728ee0a1ffe8a9fd6192c92bb20cc5025ca9 (diff) | |
download | connman-85074ce75ce1749e270dc9951d003d4a3c1f9cab.tar.gz connman-85074ce75ce1749e270dc9951d003d4a3c1f9cab.tar.bz2 connman-85074ce75ce1749e270dc9951d003d4a3c1f9cab.zip |
[Upstream]gsupplicant: Switch to different BSSID of same SSID in case of signal bss removed
Teach ConnMan to select the next BSSID when two APs (e.g. 2.4 GHz and
5 GHz) with the same SSID and security configuration are available.
Currently when one AP disappears ConnMan will retry to connect to the
old AP point even though there is another matching BSSID available.
So when wpa_supplicant sends a remove signal we find a matching BSSID
and use it even when it's not from the same AP.
https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=c1debcac758ef1f76a788225679003e2e67d9fdf
Change-Id: Ic5ce438addc823ebd0c6bedd2a974f559b33ae25
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Diffstat (limited to 'gsupplicant/supplicant.c')
-rw-r--r-- | gsupplicant/supplicant.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 62857e03..67d4d608 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -2788,6 +2788,7 @@ static void interface_bss_removed(DBusMessageIter *iter, void *user_data) GSupplicantNetwork *network; struct g_supplicant_bss *bss = NULL; const char *path = NULL; + bool is_current_network_bss = false; dbus_message_iter_get_basic(iter, &path); if (!path) @@ -2801,6 +2802,7 @@ static void interface_bss_removed(DBusMessageIter *iter, void *user_data) if (network->best_bss == bss) { network->best_bss = NULL; network->signal = BSS_UNKNOWN_STRENGTH; + is_current_network_bss = true; } g_hash_table_remove(bss_mapping, path); @@ -2810,8 +2812,12 @@ static void interface_bss_removed(DBusMessageIter *iter, void *user_data) update_network_signal(network); - if (g_hash_table_size(network->bss_table) == 0) + if (g_hash_table_size(network->bss_table) == 0) { g_hash_table_remove(interface->network_table, network->group); + } else { + if (is_current_network_bss && network->best_bss) + callback_network_changed(network, ""); + } } static void set_config_methods(DBusMessageIter *iter, void *user_data) |