When connecting WiFi with a wrong passphrase,
connman is longer than it should to cancel the attempt.
The effect is this change, is to have a quicker feedback to the agent
in charge of passphrase input.
Since, Wpa_supplicant 2.0 and later
is already managing its own retry mechanism,
let's use it because it's overkill to have this also inside comman
and even more if it add an unnecessary delay.
Note, that for earlier versions of wpa_supplicant this change may be reverted,
while for later ones (2.0 to HEAD/2013-12-10),
it's resulting a 10 secs improvement
(observed the whole test is now 10s vs 20s between two user's attempts).
Let me credit Liu Guoqiang and Tomasz Bursztyka
for helping to solve this problem.
Fixes CM-655
Change-Id: I38877df1df4e074b86871628ae42376e95638539
---
plugins/wifi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/plugins/wifi.c b/plugins/wifi.c
index f7fbe86..09272eb 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -58,8 +58,7 @@
#define CLEANUP_TIMEOUT 8 /* in seconds */
#define INACTIVE_TIMEOUT 12 /* in seconds */
-#define MAXIMUM_RETRIES 2
-#define FAVORITE_MAXIMUM_RETRIES 4
+#define FAVORITE_MAXIMUM_RETRIES 2
#define BGSCAN_DEFAULT "simple:30:-45:300"
#define AUTOSCAN_DEFAULT "exponential:3:300"
@@ -1615,8 +1614,7 @@ static bool
handle_4way_handshake_failure(GSupplicantInterface *interface,
if (connman_service_get_favorite(service)) {
if (wifi->retries < FAVORITE_MAXIMUM_RETRIES)
return true;
- } else if (wifi->retries < MAXIMUM_RETRIES)
- return true;
+ }
wifi->retries = 0;
connman_network_set_error(network, CONNMAN_NETWORK_ERROR_INVALID_KEY);
--
1.8.1.2
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman