mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
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>
This commit is contained in:
@@ -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 <sameo@linux.intel.com>
|
||||||
|
Ported by Dongxiao Xu <dongxiao.xu@intel.com>
|
||||||
|
|
||||||
|
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:
|
||||||
@@ -10,7 +10,7 @@ DEPENDS = "libgdbus dbus glib-2.0 hal"
|
|||||||
RDEPENDS_${PN} = "wpa-supplicant resolvconf"
|
RDEPENDS_${PN} = "wpa-supplicant resolvconf"
|
||||||
|
|
||||||
INITSCRIPT_NAME = "connman"
|
INITSCRIPT_NAME = "connman"
|
||||||
INITSCRIPT_PARAMS = "start 05 5 2 . stop 22 0 1 6 ."
|
INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
|
||||||
|
|
||||||
inherit autotools pkgconfig update-rc.d
|
inherit autotools pkgconfig update-rc.d
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
require connman.inc
|
require connman.inc
|
||||||
PR = "r0"
|
PR = "r1"
|
||||||
|
|
||||||
EXTRA_OECONF += "\
|
EXTRA_OECONF += "\
|
||||||
ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \
|
ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \
|
||||||
@@ -16,10 +16,10 @@ EXTRA_OECONF += "\
|
|||||||
--disable-udev \
|
--disable-udev \
|
||||||
--disable-polkit \
|
--disable-polkit \
|
||||||
--enable-client \
|
--enable-client \
|
||||||
--enable-fake \
|
|
||||||
--prefix=/usr --sysconfdir=/etc --localstatedir=/var"
|
--prefix=/usr --sysconfdir=/etc --localstatedir=/var"
|
||||||
|
|
||||||
SRC_URI = "\
|
SRC_URI = "\
|
||||||
http://www.kernel.org/pub/linux/network/connman/connman-${PV}.tar.gz \
|
http://www.kernel.org/pub/linux/network/connman/connman-${PV}.tar.gz \
|
||||||
|
file://fix-shutdown-ap-disconnect.patch \
|
||||||
file://connman \
|
file://connman \
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user