Index: ng_hci_misc.c =================================================================== RCS file: /home/ncvs/src/sys/netgraph/bluetooth/hci/ng_hci_misc.c,v retrieving revision 1.7 diff -u -r1.7 ng_hci_misc.c --- ng_hci_misc.c 27 Apr 2004 16:38:14 -0000 1.7 +++ ng_hci_misc.c 3 Nov 2004 15:44:49 -0000 @@ -289,7 +289,7 @@ NG_BT_ITEMQ_INIT(&con->conq, num_pkts); - callout_handle_init(&con->con_timo); + ng_callout_init(&con->con_timo); LIST_INSERT_HEAD(&unit->con_list, con, next); } @@ -357,7 +357,6 @@ /* * Set HCI command timeout - * XXX FIXME: check unit->cmd_timo.callout != NULL */ int @@ -368,7 +367,9 @@ "%s: %s - Duplicated command timeout!\n", __func__, NG_NODE_NAME(unit->node)); unit->state |= NG_HCI_UNIT_COMMAND_PENDING; - unit->cmd_timo = ng_timeout(unit->node, NULL, + /* XXX: is this correct place for init? */ + ng_callout_init(&unit->cmd_timo); + ng_timeout(&unit->cmd_timo, unit->node, NULL, bluetooth_hci_command_timeout(), ng_hci_process_command_timeout, NULL, 0); @@ -386,7 +387,7 @@ panic( "%s: %s - No command timeout!\n", __func__, NG_NODE_NAME(unit->node)); - if (ng_untimeout(unit->cmd_timo, unit->node) == 0) + if (ng_untimeout(&unit->cmd_timo, unit->node) == 0) return (ETIMEDOUT); unit->state &= ~NG_HCI_UNIT_COMMAND_PENDING; @@ -396,7 +397,6 @@ /* * Set HCI connection timeout - * XXX FIXME: check unit->cmd_timo.callout != NULL */ int @@ -408,7 +408,7 @@ __func__, NG_NODE_NAME(con->unit->node)); con->flags |= NG_HCI_CON_TIMEOUT_PENDING; - con->con_timo = ng_timeout(con->unit->node, NULL, + ng_timeout(&con->con_timo, con->unit->node, NULL, bluetooth_hci_connect_timeout(), ng_hci_process_con_timeout, NULL, con->con_handle); @@ -427,7 +427,7 @@ panic( "%s: %s - No connection timeout!\n", __func__, NG_NODE_NAME(con->unit->node)); - if (ng_untimeout(con->con_timo, con->unit->node) == 0) + if (ng_untimeout(&con->con_timo, con->unit->node) == 0) return (ETIMEDOUT); con->flags &= ~NG_HCI_CON_TIMEOUT_PENDING; Index: ng_hci_var.h =================================================================== RCS file: /home/ncvs/src/sys/netgraph/bluetooth/hci/ng_hci_var.h,v retrieving revision 1.4 diff -u -r1.4 ng_hci_var.h --- ng_hci_var.h 9 Apr 2004 23:01:39 -0000 1.4 +++ ng_hci_var.h 3 Nov 2004 15:43:52 -0000 @@ -148,7 +148,7 @@ ng_hci_unit_buff_t buffer; /* buffer info */ - struct callout_handle cmd_timo; /* command timeout */ + struct callout cmd_timo; /* command timeout */ ng_bt_mbufq_t cmdq; /* command queue */ #define NG_HCI_CMD_QUEUE_LEN 12 /* max. size of cmd q */ @@ -183,7 +183,7 @@ u_int8_t mode; /* ACTIVE, HOLD ... */ u_int8_t role; /* MASTER/SLAVE */ - struct callout_handle con_timo; /* con. timeout */ + struct callout con_timo; /* con. timeout */ int pending; /* # of data pkts */ ng_bt_itemq_t conq; /* con. queue */