mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-16 16:54:38 +08:00
emulator: Add stub for ACL data handling to bthost
This commit is contained in:
parent
9b96ebec6f
commit
9906998168
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user