aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-07-30 13:06:51 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-07-30 13:31:33 +0200
commit056be1b9c8d0c6942412dea4a4a104978a0a9311 (patch)
tree199b731ebbb5113a1ed0d5377926f2b6e68753b0 /executor
parentb0947553167615d7bb1b67b22d2d080e5a5ab2cd (diff)
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.
Diffstat (limited to 'executor')
-rw-r--r--executor/common_linux.h7
1 files changed, 4 insertions, 3 deletions
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);