1/*
2 * ng_hci_evnt.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_hci_evnt.c,v 1.18 2002/11/12 22:35:39 max Exp $
29 * $FreeBSD: head/sys/netgraph/bluetooth/hci/ng_hci_evnt.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>
--- 461 unchanged lines hidden (view full) ---
499
500 if (ep->link_type == NG_HCI_LINK_ACL) {
501 struct __link_policy {
502 ng_hci_cmd_pkt_t hdr;
503 ng_hci_write_link_policy_settings_cp cp;
504 } __attribute__ ((packed)) *lp;
505 struct mbuf *m;
506
507 MGETHDR(m, M_DONTWAIT, MT_DATA);
508 if (m != NULL) {
509 m->m_pkthdr.len = m->m_len = sizeof(*lp);
510 lp = mtod(m, struct __link_policy *);
511
512 lp->hdr.type = NG_HCI_CMD_PKT;
513 lp->hdr.opcode = htole16(NG_HCI_OPCODE(
514 NG_HCI_OGF_LINK_POLICY,
515 NG_HCI_OCF_WRITE_LINK_POLICY_SETTINGS));
--- 570 unchanged lines hidden ---
2 * ng_hci_evnt.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_hci_evnt.c,v 1.18 2002/11/12 22:35:39 max Exp $
29 * $FreeBSD: head/sys/netgraph/bluetooth/hci/ng_hci_evnt.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>
--- 461 unchanged lines hidden (view full) ---
499
500 if (ep->link_type == NG_HCI_LINK_ACL) {
501 struct __link_policy {
502 ng_hci_cmd_pkt_t hdr;
503 ng_hci_write_link_policy_settings_cp cp;
504 } __attribute__ ((packed)) *lp;
505 struct mbuf *m;
506
507 MGETHDR(m, M_DONTWAIT, MT_DATA);
508 if (m != NULL) {
509 m->m_pkthdr.len = m->m_len = sizeof(*lp);
510 lp = mtod(m, struct __link_policy *);
511
512 lp->hdr.type = NG_HCI_CMD_PKT;
513 lp->hdr.opcode = htole16(NG_HCI_OPCODE(
514 NG_HCI_OGF_LINK_POLICY,
515 NG_HCI_OCF_WRITE_LINK_POLICY_SETTINGS));
--- 570 unchanged lines hidden ---