Index: ng_l2cap_misc.c =================================================================== RCS file: /home/ncvs/src/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c,v retrieving revision 1.7 diff -u -r1.7 ng_l2cap_misc.c --- ng_l2cap_misc.c 27 Apr 2004 16:38:15 -0000 1.7 +++ ng_l2cap_misc.c 3 Nov 2004 10:56:53 -0000 @@ -129,7 +129,7 @@ fake_con_handle = 0x0f00; bcopy(bdaddr, &con->remote, sizeof(con->remote)); - callout_handle_init(&con->con_timo); + ng_callout_init(&con->con_timo); con->ident = NG_L2CAP_FIRST_IDENT - 1; TAILQ_INIT(&con->cmd_list); @@ -191,7 +191,6 @@ /* * Set auto disconnect timeout - * XXX FIXME: check con->con_timo.callout != NULL */ int @@ -204,7 +203,7 @@ con->state, con->flags); con->flags |= NG_L2CAP_CON_AUTO_DISCON_TIMO; - con->con_timo = ng_timeout(con->l2cap->node, NULL, + ng_timeout(&con->con_timo, con->l2cap->node, NULL, con->l2cap->discon_timo * hz, ng_l2cap_process_discon_timeout, NULL, con->con_handle); @@ -225,7 +224,7 @@ __func__, NG_NODE_NAME(con->l2cap->node), con->state, con->flags); - if (ng_untimeout(con->con_timo, con->l2cap->node) == 0) + if (ng_untimeout(&con->con_timo, con->l2cap->node) == 0) return (ETIMEDOUT); con->flags &= ~NG_L2CAP_CON_AUTO_DISCON_TIMO; @@ -424,7 +423,7 @@ cmd->ident = ident; cmd->code = code; cmd->token = token; - callout_handle_init(&cmd->timo); + ng_callout_init(&cmd->timo); return (cmd); } /* ng_l2cap_new_cmd */ @@ -453,7 +452,6 @@ /* * Set LP timeout - * XXX FIXME: check con->con_timo.callout != NULL */ int @@ -466,7 +464,7 @@ con->state, con->flags); con->flags |= NG_L2CAP_CON_LP_TIMO; - con->con_timo = ng_timeout(con->l2cap->node, NULL, + ng_timeout(&con->con_timo, con->l2cap->node, NULL, bluetooth_hci_connect_timeout(), ng_l2cap_process_lp_timeout, NULL, con->con_handle); @@ -487,7 +485,7 @@ __func__, NG_NODE_NAME(con->l2cap->node), con->state, con->flags); - if (ng_untimeout(con->con_timo, con->l2cap->node) == 0) + if (ng_untimeout(&con->con_timo, con->l2cap->node) == 0) return (ETIMEDOUT); con->flags &= ~NG_L2CAP_CON_LP_TIMO; @@ -497,7 +495,6 @@ /* * Set L2CAP command timeout - * XXX FIXME: check cmd->timo.callout != NULL */ int @@ -513,7 +510,7 @@ arg = ((cmd->ident << 16) | cmd->con->con_handle); cmd->flags |= NG_L2CAP_CMD_PENDING; - cmd->timo = ng_timeout(cmd->con->l2cap->node, NULL, timo, + ng_timeout(&cmd->timo, cmd->con->l2cap->node, NULL, timo, ng_l2cap_process_command_timeout, NULL, arg); return (0); @@ -532,7 +529,7 @@ __func__, NG_NODE_NAME(cmd->con->l2cap->node), cmd->code, cmd->flags); - if (ng_untimeout(cmd->timo, cmd->con->l2cap->node) == 0) + if (ng_untimeout(&cmd->timo, cmd->con->l2cap->node) == 0) return (ETIMEDOUT); cmd->flags &= ~NG_L2CAP_CMD_PENDING; Index: ng_l2cap_var.h =================================================================== RCS file: /home/ncvs/src/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h,v retrieving revision 1.4 diff -u -r1.4 ng_l2cap_var.h --- ng_l2cap_var.h 9 Apr 2004 23:01:40 -0000 1.4 +++ ng_l2cap_var.h 3 Nov 2004 10:47:43 -0000 @@ -111,7 +111,7 @@ bdaddr_t remote; /* remote unit address */ u_int16_t con_handle; /* ACL connection handle */ - struct callout_handle con_timo; /* connection timeout */ + struct callout con_timo; /* connection timeout */ u_int8_t ident; /* last allocated ident */ TAILQ_HEAD(, ng_l2cap_cmd) cmd_list; /* pending L2CAP cmds */ @@ -174,7 +174,7 @@ u_int8_t ident; /* L2CAP command ident */ u_int32_t token; /* L2CA message token */ - struct callout_handle timo; /* RTX/ERTX timeout */ + struct callout timo; /* RTX/ERTX timeout */ struct mbuf *aux; /* optional data */