Diff between 473ea45a0d819ae489c448ba28d95cbcfdb5530d and dde42ce2517c6cc84f767202d4a780bd2715bd07

Changed Files

File Additions Deletions Status
src/adapter.c +8 -0 modified

Full Patch

diff --git a/src/adapter.c b/src/adapter.c
index fc7c638..2c11efb 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1786,6 +1786,14 @@ int btd_adapter_stop(struct btd_adapter *adapter)
 		g_dbus_emit_property_changed(conn, adapter->path,
 					ADAPTER_INTERFACE, "Discovering");
 
+	if (adapter->dev_class) {
+		/* the kernel should reset the class of device when powering
+		 * down, but it does not. So force it here ... */
+		adapter->dev_class = 0;
+		g_dbus_emit_property_changed(conn, adapter->path,
+						ADAPTER_INTERFACE, "Class");
+	}
+
 	g_dbus_emit_property_changed(conn, adapter->path, ADAPTER_INTERFACE,
 								"Powered");