From 8a1144706ae7d17c9bf702fb419c929f9c76f673 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 30 Sep 2016 11:40:33 +0200 Subject: [PATCH] hci: set substate when setting EIR data --- src/hci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hci.c b/src/hci.c index 4b0d9d1a7..abf0e3da9 100644 --- a/src/hci.c +++ b/src/hci.c @@ -1083,11 +1083,12 @@ static void hci_initializing_run(void){ } break; case HCI_INIT_WRITE_EIR_DATA: + hci_stack->substate = HCI_INIT_W4_WRITE_EIR_DATA; hci_send_cmd(&hci_write_extended_inquiry_response, 0, hci_stack->eir_data); break; case HCI_INIT_WRITE_INQUIRY_MODE: - hci_send_cmd(&hci_write_inquiry_mode, (int) hci_stack->inquiry_mode); hci_stack->substate = HCI_INIT_W4_WRITE_INQUIRY_MODE; + hci_send_cmd(&hci_write_inquiry_mode, (int) hci_stack->inquiry_mode); break; case HCI_INIT_WRITE_SCAN_ENABLE: hci_send_cmd(&hci_write_scan_enable, (hci_stack->connectable << 1) | hci_stack->discoverable); // page scan