From 8976fa69d0ddfdad24fe041f4b88c853dc7a33a2 Mon Sep 17 00:00:00 2001 From: Dongxiao Xu Date: Tue, 28 Sep 2010 09:47:18 +0800 Subject: connman: fix the issue that connman could not disconnect from shutdown AP Upstream has a fix for MeeGo/Carrick which has the same phenomenon as our side, therefore port the patch into poky. This fixes [BUGID #266] and [BUGID #267]. Remove the option "--enable-fake" since it sometimes causes offline mode failure. Launch connmand in initlevel 3. Signed-off-by: Dongxiao Xu --- .../connman-0.56/fix-shutdown-ap-disconnect.patch | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 meta/recipes-connectivity/connman/connman-0.56/fix-shutdown-ap-disconnect.patch (limited to 'meta/recipes-connectivity/connman/connman-0.56') diff --git a/meta/recipes-connectivity/connman/connman-0.56/fix-shutdown-ap-disconnect.patch b/meta/recipes-connectivity/connman/connman-0.56/fix-shutdown-ap-disconnect.patch new file mode 100644 index 0000000000..a0ad0991df --- /dev/null +++ b/meta/recipes-connectivity/connman/connman-0.56/fix-shutdown-ap-disconnect.patch @@ -0,0 +1,42 @@ +Schedule delayed scan when being disconnected from an AP + +When being disconnected from an AP, a delayed scan is scheduled to make +sure the AP is still there. wpa_supplicant removes a BSS from its bss list +when it disappears from the scan results twice in a row. + +Author: Samuel Ortiz +Ported by Dongxiao Xu + +diff -ruN connman-0.56-orig/plugins/supplicant.c connman-0.56/plugins/supplicant.c +--- connman-0.56-orig/plugins/supplicant.c 2010-09-25 15:08:21.242927383 +0800 ++++ connman-0.56/plugins/supplicant.c 2010-09-25 15:12:46.346136858 +0800 +@@ -2184,6 +2184,15 @@ + scanning == TRUE ? "started" : "finished"); + } + ++static gboolean delayed_scan(gpointer user_data) ++{ ++ struct supplicant_task *task = user_data; ++ ++ supplicant_scan(task->device); ++ ++ return FALSE; ++} ++ + static void state_change(struct supplicant_task *task, DBusMessage *msg) + { + DBusError error; +@@ -2277,7 +2286,13 @@ + task_connect(task); + } else + task->network = NULL; ++ } else { ++ if (task->state == WPA_DISCONNECTED) ++ g_timeout_add_seconds(10, delayed_scan, task); ++ ++ remove_network(task); + } ++ + break; + + default: -- cgit v1.2.3-54-g00ecf