From 056be1b9c8d0c6942412dea4a4a104978a0a9311 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 30 Jul 2020 13:06:51 +0200 Subject: sys/linux: assorted improvements for vhci Regenerate const files on next-20200729. Change conn handle to 200 because it also seems to be matches against phy_handle fields which are int8 (current 256 does not fit into int8). Use 200 for all handle's and all phy_handle's. Remove hci_evt_le_cis_req, it does not seem to be used in the kernel. Restrict some event types and statuses. Add rssi field to hci_ev_le_advertising_info. Use bytesize for some of the data length fields. --- executor/common_linux.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'executor/common_linux.h') diff --git a/executor/common_linux.h b/executor/common_linux.h index b679d1ebb..c0573c6d1 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -1996,7 +1996,8 @@ static void* event_thread(void* arg) return NULL; } -#define ACL_HANDLE 256 +// Matches hci_conn_handle in sys/linux/dev_vhci.txt. +#define HCI_HANDLE 200 static void initialize_vhci() { @@ -2056,7 +2057,7 @@ static void initialize_vhci() struct hci_ev_conn_complete complete; memset(&complete, 0, sizeof(complete)); complete.status = 0; - complete.handle = ACL_HANDLE; + complete.handle = HCI_HANDLE; memset(&complete.bdaddr, 0xaa, 6); complete.link_type = ACL_LINK; complete.encr_mode = 0; @@ -2065,7 +2066,7 @@ static void initialize_vhci() struct hci_ev_remote_features features; memset(&features, 0, sizeof(features)); features.status = 0; - features.handle = ACL_HANDLE; + features.handle = HCI_HANDLE; hci_send_event_packet(vhci_fd, HCI_EV_REMOTE_FEATURES, &features, sizeof(features)); pthread_join(th, NULL); -- cgit mrf-deployment