l2cap.c (6b296a27124c6286dd3386b510d67e34f4d7d1bb) l2cap.c (11c41d51aec0f6b1c42fee9f5d4ea359c4e7a562)
1/*
2 * Copyright (C) 2009 by Matthias Ringwald
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 58 unchanged lines hidden (view full) ---

67static linked_list_t l2cap_services = NULL;
68static uint8_t * acl_buffer = NULL;
69static void (*packet_handler) (void * connection, uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size) = null_packet_handler;
70
71static uint8_t config_options[] = { 1, 2, 150, 0}; // mtu = 48
72
73void l2cap_init(){
74 sig_buffer = malloc( L2CAP_MINIMAL_MTU );
1/*
2 * Copyright (C) 2009 by Matthias Ringwald
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 58 unchanged lines hidden (view full) ---

67static linked_list_t l2cap_services = NULL;
68static uint8_t * acl_buffer = NULL;
69static void (*packet_handler) (void * connection, uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size) = null_packet_handler;
70
71static uint8_t config_options[] = { 1, 2, 150, 0}; // mtu = 48
72
73void l2cap_init(){
74 sig_buffer = malloc( L2CAP_MINIMAL_MTU );
75 // acl_buffer = malloc( 255 + 8 );
76 acl_buffer = malloc( 400 + 8 );
75 acl_buffer = malloc( HCI_ACL_3DH5_SIZE);
77
78 //
79 // register callback with HCI
80 //
81 hci_register_packet_handler(&l2cap_packet_handler);
82}
83
84

--- 659 unchanged lines hidden ---
76
77 //
78 // register callback with HCI
79 //
80 hci_register_packet_handler(&l2cap_packet_handler);
81}
82
83

--- 659 unchanged lines hidden ---