From 990699816862b77271d6eb8bc7a0fcb9e4e662bd Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sun, 26 May 2013 04:32:10 +0100 Subject: [PATCH] emulator: Add stub for ACL data handling to bthost --- emulator/bthost.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/emulator/bthost.c b/emulator/bthost.c index 312eb2988..071794df7 100644 --- a/emulator/bthost.c +++ b/emulator/bthost.c @@ -303,6 +303,17 @@ static void process_evt(struct bthost *bthost, const void *data, uint16_t len) } } +static void process_acl(struct bthost *bthost, const void *data, uint16_t len) +{ + const struct bt_l2cap_hdr *hdr = data; + + if (len < sizeof(*hdr)) + return; + + if (len != sizeof(*hdr) + hdr->len) + return; +} + void bthost_receive_h4(struct bthost *bthost, const void *data, uint16_t len) { uint8_t pkt_type; @@ -319,6 +330,9 @@ void bthost_receive_h4(struct bthost *bthost, const void *data, uint16_t len) case BT_H4_EVT_PKT: process_evt(bthost, data + 1, len - 1); break; + case BT_H4_ACL_PKT: + process_acl(bthost, data + 1, len - 1); + break; default: printf("Unsupported packet 0x%2.2x\n", pkt_type); break; -- 2.47.3