From 23df0e0d4565437d6963dc1574b7d808cb1a8a24 Mon Sep 17 00:00:00 2001 From: Uwe Stuehler Date: Fri, 1 Jun 2007 20:29:55 +0000 Subject: Set BTF_UP before hci_enable() to make hci_unit_lookup() work; ok gwk --- sys/netbt/hci_unit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/netbt/hci_unit.c b/sys/netbt/hci_unit.c index a3799acd7a0..5aceed96348 100644 --- a/sys/netbt/hci_unit.c +++ b/sys/netbt/hci_unit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hci_unit.c,v 1.4 2007/06/01 20:03:31 uwe Exp $ */ +/* $OpenBSD: hci_unit.c,v 1.5 2007/06/01 20:29:54 uwe Exp $ */ /* $NetBSD: hci_unit.c,v 1.4 2007/03/30 20:47:03 plunky Exp $ */ /*- @@ -108,8 +108,9 @@ hci_enable_task(void *arg0, void *arg1) { struct hci_unit *unit = arg0; - if (!(unit->hci_flags & BTF_UP) && hci_enable(unit) == 0) - unit->hci_flags |= BTF_UP; + unit->hci_flags |= BTF_UP; + if (hci_enable(unit) != 0) + unit->hci_flags &= ~BTF_UP; } int -- cgit v1.2.3