summaryrefslogtreecommitdiff
path: root/sys/netbt
diff options
context:
space:
mode:
authorUwe Stuehler <uwe@cvs.openbsd.org>2007-06-01 20:29:55 +0000
committerUwe Stuehler <uwe@cvs.openbsd.org>2007-06-01 20:29:55 +0000
commit23df0e0d4565437d6963dc1574b7d808cb1a8a24 (patch)
tree674ef81c72b802eced53a9437623535da53698e0 /sys/netbt
parent3d248691985be05b309a371e30236226e8d8e4b6 (diff)
Set BTF_UP before hci_enable() to make hci_unit_lookup() work; ok gwk
Diffstat (limited to 'sys/netbt')
-rw-r--r--sys/netbt/hci_unit.c7
1 files changed, 4 insertions, 3 deletions
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