diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2010-09-28 09:47:18 +0800 |
---|---|---|
committer | Saul Wold <Saul.Wold@intel.com> | 2010-09-28 15:51:27 -0700 |
commit | 8976fa69d0ddfdad24fe041f4b88c853dc7a33a2 (patch) | |
tree | 3160439ea26993eb3cc9654dc63ac607efb23e52 /meta/recipes-connectivity/connman | |
parent | 65ace927bd7983c8966c458f82f6d3ad62065c89 (diff) | |
download | poky-8976fa69d0ddfdad24fe041f4b88c853dc7a33a2.tar.gz |
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 <dongxiao.xu@intel.com>
Diffstat (limited to 'meta/recipes-connectivity/connman')
3 files changed, 45 insertions, 3 deletions
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 @@ | |||
1 | Schedule delayed scan when being disconnected from an AP | ||
2 | |||
3 | When being disconnected from an AP, a delayed scan is scheduled to make | ||
4 | sure the AP is still there. wpa_supplicant removes a BSS from its bss list | ||
5 | when it disappears from the scan results twice in a row. | ||
6 | |||
7 | Author: Samuel Ortiz <sameo@linux.intel.com> | ||
8 | Ported by Dongxiao Xu <dongxiao.xu@intel.com> | ||
9 | |||
10 | diff -ruN connman-0.56-orig/plugins/supplicant.c connman-0.56/plugins/supplicant.c | ||
11 | --- connman-0.56-orig/plugins/supplicant.c 2010-09-25 15:08:21.242927383 +0800 | ||
12 | +++ connman-0.56/plugins/supplicant.c 2010-09-25 15:12:46.346136858 +0800 | ||
13 | @@ -2184,6 +2184,15 @@ | ||
14 | scanning == TRUE ? "started" : "finished"); | ||
15 | } | ||
16 | |||
17 | +static gboolean delayed_scan(gpointer user_data) | ||
18 | +{ | ||
19 | + struct supplicant_task *task = user_data; | ||
20 | + | ||
21 | + supplicant_scan(task->device); | ||
22 | + | ||
23 | + return FALSE; | ||
24 | +} | ||
25 | + | ||
26 | static void state_change(struct supplicant_task *task, DBusMessage *msg) | ||
27 | { | ||
28 | DBusError error; | ||
29 | @@ -2277,7 +2286,13 @@ | ||
30 | task_connect(task); | ||
31 | } else | ||
32 | task->network = NULL; | ||
33 | + } else { | ||
34 | + if (task->state == WPA_DISCONNECTED) | ||
35 | + g_timeout_add_seconds(10, delayed_scan, task); | ||
36 | + | ||
37 | + remove_network(task); | ||
38 | } | ||
39 | + | ||
40 | break; | ||
41 | |||
42 | default: | ||
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc index c842d3cbf0..bc506faabe 100644 --- a/meta/recipes-connectivity/connman/connman.inc +++ b/meta/recipes-connectivity/connman/connman.inc | |||
@@ -10,7 +10,7 @@ DEPENDS = "libgdbus dbus glib-2.0 hal" | |||
10 | RDEPENDS_${PN} = "wpa-supplicant resolvconf" | 10 | RDEPENDS_${PN} = "wpa-supplicant resolvconf" |
11 | 11 | ||
12 | INITSCRIPT_NAME = "connman" | 12 | INITSCRIPT_NAME = "connman" |
13 | INITSCRIPT_PARAMS = "start 05 5 2 . stop 22 0 1 6 ." | 13 | INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ." |
14 | 14 | ||
15 | inherit autotools pkgconfig update-rc.d | 15 | inherit autotools pkgconfig update-rc.d |
16 | 16 | ||
diff --git a/meta/recipes-connectivity/connman/connman_0.56.bb b/meta/recipes-connectivity/connman/connman_0.56.bb index 24ae536a78..69dad66d58 100644 --- a/meta/recipes-connectivity/connman/connman_0.56.bb +++ b/meta/recipes-connectivity/connman/connman_0.56.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | require connman.inc | 1 | require connman.inc |
2 | PR = "r0" | 2 | PR = "r1" |
3 | 3 | ||
4 | EXTRA_OECONF += "\ | 4 | EXTRA_OECONF += "\ |
5 | ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \ | 5 | ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \ |
@@ -16,10 +16,10 @@ EXTRA_OECONF += "\ | |||
16 | --disable-udev \ | 16 | --disable-udev \ |
17 | --disable-polkit \ | 17 | --disable-polkit \ |
18 | --enable-client \ | 18 | --enable-client \ |
19 | --enable-fake \ | ||
20 | --prefix=/usr --sysconfdir=/etc --localstatedir=/var" | 19 | --prefix=/usr --sysconfdir=/etc --localstatedir=/var" |
21 | 20 | ||
22 | SRC_URI = "\ | 21 | SRC_URI = "\ |
23 | http://www.kernel.org/pub/linux/network/connman/connman-${PV}.tar.gz \ | 22 | http://www.kernel.org/pub/linux/network/connman/connman-${PV}.tar.gz \ |
23 | file://fix-shutdown-ap-disconnect.patch \ | ||
24 | file://connman \ | 24 | file://connman \ |
25 | " | 25 | " |