diff options
Diffstat (limited to 'sys/netgraph/bluetooth/l2cap')
-rw-r--r-- | sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c | 4 | ||||
-rw-r--r-- | sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c | 12 | ||||
-rw-r--r-- | sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c | 2 | ||||
-rw-r--r-- | sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c | 26 | ||||
-rw-r--r-- | sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h | 2 |
5 files changed, 23 insertions, 23 deletions
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c index de5217c..ba74a16 100644 --- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c +++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c @@ -109,7 +109,7 @@ ng_l2cap_receive(ng_l2cap_con_p con) /* Check payload size */ if (hdr->length != con->rx_pkt->m_pkthdr.len - sizeof(*hdr)) { NG_L2CAP_ERR( -"%s: %s - invalid L2CAP packet. Payload length mismatch, length=%d, len=%d\n", +"%s: %s - invalid L2CAP packet. Payload length mismatch, length=%d, len=%zd\n", __func__, NG_NODE_NAME(l2cap->node), hdr->length, con->rx_pkt->m_pkthdr.len - sizeof(*hdr)); error = EMSGSIZE; @@ -973,7 +973,7 @@ ng_l2cap_process_echo_req(ng_l2cap_con_p con, u_int8_t ident) con->rx_pkt = ng_l2cap_prepend(con->rx_pkt, sizeof(*hdr)); if (con->rx_pkt == NULL) { NG_L2CAP_ALERT( -"%s: %s - ng_l2cap_prepend() failed, size=%d\n", +"%s: %s - ng_l2cap_prepend() failed, size=%zd\n", __func__, NG_NODE_NAME(l2cap->node), sizeof(*hdr)); return (ENOBUFS); diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c index b0b6fbe..db64202 100644 --- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c +++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c @@ -112,7 +112,7 @@ ng_l2cap_lp_con_req(ng_l2cap_p l2cap, bdaddr_p bdaddr) con->state = NG_L2CAP_W4_LP_CON_CFM; ng_l2cap_lp_timeout(con); - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->hci, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->hci, 0); if (error != 0) { if ((error = ng_l2cap_lp_untimeout(con)) != 0) return (error); @@ -262,7 +262,7 @@ ng_l2cap_lp_con_ind(ng_l2cap_p l2cap, struct ng_mesg *msg) con->state = NG_L2CAP_W4_LP_CON_CFM; ng_l2cap_lp_timeout(con); - NG_SEND_MSG_HOOK(error, l2cap->node, rsp, l2cap->hci, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, rsp, l2cap->hci, 0); if (error != 0) { if ((error = ng_l2cap_lp_untimeout(con)) != 0) goto out; @@ -393,7 +393,7 @@ ng_l2cap_lp_qos_req(ng_l2cap_p l2cap, u_int16_t con_handle, ep->latency = flow->latency; ep->delay_variation = flow->delay_variation; - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->hci, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->hci, 0); return (error); } /* ng_l2cap_lp_con_req */ @@ -497,7 +497,7 @@ ng_l2cap_lp_send(ng_l2cap_con_p con, u_int16_t dcid, struct mbuf *m0) m0 = ng_l2cap_prepend(m0, sizeof(*l2cap_hdr)); if (m0 == NULL) { NG_L2CAP_ALERT( -"%s: %s - ng_l2cap_prepend(%d) failed\n", +"%s: %s - ng_l2cap_prepend(%zd) failed\n", __func__, NG_NODE_NAME(l2cap->node), sizeof(*l2cap_hdr)); @@ -535,7 +535,7 @@ ng_l2cap_lp_send(ng_l2cap_con_p con, u_int16_t dcid, struct mbuf *m0) m0 = ng_l2cap_prepend(m0, sizeof(*acl_hdr)); if (m0 == NULL) { NG_L2CAP_ALERT( -"%s: %s - ng_l2cap_prepend(%d) failed\n", +"%s: %s - ng_l2cap_prepend(%zd) failed\n", __func__, NG_NODE_NAME(l2cap->node), sizeof(*acl_hdr)); goto fail; @@ -899,6 +899,6 @@ ng_l2cap_process_discon_timeout(node_p node, hook_p hook, void *arg1, int con_ha ep->con_handle = con->con_handle; ep->reason = 0x13; /* User Ended Connection */ - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->hci, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->hci, 0); } /* ng_l2cap_process_discon_timeout */ diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c index dd581c1..d292f84 100644 --- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c +++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c @@ -79,7 +79,7 @@ ng_l2cap_send_hook_info(node_p node, hook_p hook, void *arg1, int arg2) sizeof(bdaddr_t), M_NOWAIT); if (msg != NULL) { bcopy(&l2cap->bdaddr, msg->data, sizeof(bdaddr_t)); - NG_SEND_MSG_HOOK(error, node, msg, hook, NULL); + NG_SEND_MSG_HOOK(error, node, msg, hook, 0); } else error = ENOMEM; diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c index d928805..4dd1e6f 100644 --- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c +++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c @@ -185,7 +185,7 @@ ng_l2cap_l2ca_con_rsp(ng_l2cap_chan_p ch, u_int32_t token, u_int16_t result, op->result = result; op->status = status; - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0); } return (error); @@ -333,7 +333,7 @@ ng_l2cap_l2ca_con_rsp_rsp(ng_l2cap_chan_p ch, u_int32_t token, u_int16_t result) op = (ng_l2cap_l2ca_con_rsp_op *)(msg->data); op->result = result; - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0); } return (error); @@ -374,7 +374,7 @@ ng_l2cap_l2ca_con_ind(ng_l2cap_chan_p ch) ip->psm = ch->psm; ip->ident = ch->ident; - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0); } return (error); @@ -524,7 +524,7 @@ ng_l2cap_l2ca_cfg_rsp(ng_l2cap_chan_p ch, u_int32_t token, u_int16_t result) bcopy(&ch->oflow, &op->oflow, sizeof(op->oflow)); op->flush_timo = ch->flush_timo; - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0); if (error == 0 && result == NG_L2CAP_SUCCESS) { ch->cfg_state |= NG_L2CAP_CFG_IN; @@ -680,7 +680,7 @@ ng_l2cap_l2ca_cfg_rsp_rsp(ng_l2cap_chan_p ch, u_int32_t token, u_int16_t result) op = (ng_l2cap_l2ca_cfg_rsp_op *)(msg->data); op->result = result; - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0); } return (error); @@ -733,7 +733,7 @@ ng_l2cap_l2ca_cfg_ind(ng_l2cap_chan_p ch) bcopy(&ch->iflow, &ip->iflow, sizeof(ip->iflow)); ip->flush_timo = ch->flush_timo; - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0); } return (error); @@ -865,7 +865,7 @@ ng_l2cap_l2ca_write_rsp(ng_l2cap_chan_p ch, u_int32_t token, u_int16_t result, op->length = length; op->lcid = ch->scid; - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0); } return (error); @@ -1059,7 +1059,7 @@ ng_l2cap_l2ca_qos_ind(ng_l2cap_chan_p ch) else { ip = (ng_l2cap_l2ca_qos_ind_ip *)(msg->data); bcopy(&ch->con->remote, &ip->bdaddr, sizeof(ip->bdaddr)); - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0); } return (error); @@ -1179,7 +1179,7 @@ ng_l2cap_l2ca_discon_rsp(ng_l2cap_chan_p ch, u_int32_t token, u_int16_t result) op = (ng_l2cap_l2ca_discon_op *)(msg->data); op->result = result; - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0); } return (error); @@ -1215,7 +1215,7 @@ ng_l2cap_l2ca_discon_ind(ng_l2cap_chan_p ch) else { ip = (ng_l2cap_l2ca_discon_ind_ip *)(msg->data); ip->lcid = ch->scid; - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0); } return (error); @@ -1409,7 +1409,7 @@ ng_l2cap_l2ca_ping_rsp(ng_l2cap_con_p con, u_int32_t token, u_int16_t result, m_copydata(data, 0, size, (caddr_t) op + sizeof(*op)); } - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->ctl, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->ctl, 0); } out: NG_FREE_M(data); @@ -1529,7 +1529,7 @@ ng_l2cap_l2ca_get_info_rsp(ng_l2cap_con_p con, u_int32_t token, m_copydata(data, 0, size, (caddr_t) op + sizeof(*op)); } - NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->ctl, NULL); + NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->ctl, 0); } out: NG_FREE_M(data); @@ -1632,7 +1632,7 @@ ng_l2cap_l2ca_enable_clt(ng_l2cap_p l2cap, struct ng_mesg *msg) * * /* Send response to control hook */ * if (l2cap->ctl != NULL && NG_HOOK_IS_VALID(l2cap->ctl)) - * NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->ctl, NULL); + * NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->ctl, 0); #endif return (error); diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h b/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h index 05bd0ab..d3e2d6b 100644 --- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h +++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h @@ -51,7 +51,7 @@ MALLOC_DECLARE(M_NETGRAPH_L2CAP); if ((m)->m_len < (s)) \ (m) = m_pullup((m), (s)); \ if ((m) == NULL) \ - NG_L2CAP_ALERT("%s: %s - m_pullup(%d) failed\n", \ + NG_L2CAP_ALERT("%s: %s - m_pullup(%zd) failed\n", \ __func__, NG_NODE_NAME(l2cap->node), (s)); \ } while (0) |