summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_main.c2
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_misc.c14
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_var.h4
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c22
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h4
5 files changed, 23 insertions, 23 deletions
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_main.c b/sys/netgraph/bluetooth/hci/ng_hci_main.c
index ad44254..5ca61ae 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_main.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_main.c
@@ -132,7 +132,7 @@ ng_hci_constructor(node_p node)
NG_HCI_BUFF_SCO_SET(unit->buffer, 1, 10, 1);
/* Init command queue & command timeout handler */
- callout_handle_init(&unit->cmd_timo);
+ ng_callout_init(&unit->cmd_timo);
NG_BT_MBUFQ_INIT(&unit->cmdq, NG_HCI_CMD_QUEUE_LEN);
/* Init lists */
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_misc.c b/sys/netgraph/bluetooth/hci/ng_hci_misc.c
index 6d0977a..b6b7f72 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_misc.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_misc.c
@@ -289,7 +289,7 @@ ng_hci_new_con(ng_hci_unit_p unit, int link_type)
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,7 @@ ng_hci_con_by_bdaddr(ng_hci_unit_p unit, bdaddr_p bdaddr, int link_type)
/*
* Set HCI command timeout
- * XXX FIXME: check unit->cmd_timo.callout != NULL
+ * XXX FIXME: check return code from ng_timeout
*/
int
@@ -368,7 +368,7 @@ ng_hci_command_timeout(ng_hci_unit_p unit)
"%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,
+ ng_timeout(&unit->cmd_timo, unit->node, NULL,
bluetooth_hci_command_timeout(),
ng_hci_process_command_timeout, NULL, 0);
@@ -386,7 +386,7 @@ ng_hci_command_untimeout(ng_hci_unit_p unit)
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 +396,7 @@ ng_hci_command_untimeout(ng_hci_unit_p unit)
/*
* Set HCI connection timeout
- * XXX FIXME: check unit->cmd_timo.callout != NULL
+ * XXX FIXME: check return code from ng_timeout
*/
int
@@ -408,7 +408,7 @@ ng_hci_con_timeout(ng_hci_unit_con_p con)
__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 @@ ng_hci_con_untimeout(ng_hci_unit_con_p con)
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;
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_var.h b/sys/netgraph/bluetooth/hci/ng_hci_var.h
index 1a38990..4bf12bb 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_var.h
+++ b/sys/netgraph/bluetooth/hci/ng_hci_var.h
@@ -148,7 +148,7 @@ typedef struct ng_hci_unit {
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 @@ typedef struct ng_hci_unit_con {
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 */
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
index 075df7d..6fe0052 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
@@ -129,7 +129,7 @@ ng_l2cap_new_con(ng_l2cap_p l2cap, bdaddr_p bdaddr)
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,7 @@ ng_l2cap_con_unref(ng_l2cap_con_p con)
/*
* Set auto disconnect timeout
- * XXX FIXME: check con->con_timo.callout != NULL
+ * XXX FIXME: check return code from ng_timeout
*/
int
@@ -204,7 +204,7 @@ ng_l2cap_discon_timeout(ng_l2cap_con_p con)
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 +225,7 @@ ng_l2cap_discon_untimeout(ng_l2cap_con_p con)
__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 +424,7 @@ ng_l2cap_new_cmd(ng_l2cap_con_p con, ng_l2cap_chan_p ch, u_int8_t ident,
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 +453,7 @@ ng_l2cap_cmd_by_ident(ng_l2cap_con_p con, u_int8_t ident)
/*
* Set LP timeout
- * XXX FIXME: check con->con_timo.callout != NULL
+ * XXX FIXME: check return code from ng_timeout
*/
int
@@ -466,7 +466,7 @@ ng_l2cap_lp_timeout(ng_l2cap_con_p con)
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 +487,7 @@ ng_l2cap_lp_untimeout(ng_l2cap_con_p con)
__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 +497,7 @@ ng_l2cap_lp_untimeout(ng_l2cap_con_p con)
/*
* Set L2CAP command timeout
- * XXX FIXME: check cmd->timo.callout != NULL
+ * XXX FIXME: check return code from ng_timeout
*/
int
@@ -513,7 +513,7 @@ ng_l2cap_command_timeout(ng_l2cap_cmd_p cmd, int timo)
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 +532,7 @@ ng_l2cap_command_untimeout(ng_l2cap_cmd_p cmd)
__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;
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h b/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h
index d3e2d6b..3c4f28e 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h
@@ -111,7 +111,7 @@ typedef struct ng_l2cap_con {
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 @@ typedef struct ng_l2cap_cmd {
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 */
OpenPOWER on IntegriCloud