1/*
2 * ng_l2cap_llpi.c
3 *
4 * Copyright (c) Maksim Yevmenkin <m_evmenkin@yahoo.com>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
--- 12 unchanged lines hidden (view full) ---
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $Id: ng_l2cap_llpi.c,v 1.16 2002/09/04 21:38:38 max Exp $
29 * $FreeBSD: head/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c 107120 2002-11-20 23:01:59Z julian $
30 */
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/endian.h>
36#include <sys/malloc.h>
37#include <sys/mbuf.h>
--- 459 unchanged lines hidden (view full) ---
497 *
498 * XXX BC (Broadcast flag) will always be 0 (zero).
499 */
500
501 while (m0 != NULL) {
502 /* Check length of the packet against HCI MTU */
503 len = m0->m_pkthdr.len;
504 if (len > l2cap->pkt_size) {
505 m = m_split(m0, l2cap->pkt_size, M_DONTWAIT);
506 if (m == NULL) {
507 NG_L2CAP_ALERT(
508"%s: %s - m_split(%d) failed\n", __func__, NG_NODE_NAME(l2cap->node),
509 l2cap->pkt_size);
510 goto fail;
511 }
512
513 len = l2cap->pkt_size;
--- 293 unchanged lines hidden ---
2 * ng_l2cap_llpi.c
3 *
4 * Copyright (c) Maksim Yevmenkin <m_evmenkin@yahoo.com>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
--- 12 unchanged lines hidden (view full) ---
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $Id: ng_l2cap_llpi.c,v 1.16 2002/09/04 21:38:38 max Exp $
29 * $FreeBSD: head/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c 107120 2002-11-20 23:01:59Z julian $
30 */
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/endian.h>
36#include <sys/malloc.h>
37#include <sys/mbuf.h>
--- 459 unchanged lines hidden (view full) ---
497 *
498 * XXX BC (Broadcast flag) will always be 0 (zero).
499 */
500
501 while (m0 != NULL) {
502 /* Check length of the packet against HCI MTU */
503 len = m0->m_pkthdr.len;
504 if (len > l2cap->pkt_size) {
505 m = m_split(m0, l2cap->pkt_size, M_DONTWAIT);
506 if (m == NULL) {
507 NG_L2CAP_ALERT(
508"%s: %s - m_split(%d) failed\n", __func__, NG_NODE_NAME(l2cap->node),
509 l2cap->pkt_size);
510 goto fail;
511 }
512
513 len = l2cap->pkt_size;
--- 293 unchanged lines hidden ---