mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-11 00:40:00 +00:00
Revert "hci: write secure connections host enable if command supported"
This reverts commit 47bc3ebbd9c7203e97682307a2d63374390b5ae3.
This commit is contained in:
parent
47bc3ebbd9
commit
3b65523c39
19
src/hci.c
19
src/hci.c
@ -1477,10 +1477,6 @@ static void hci_initializing_run(void){
|
||||
hci_send_cmd(&hci_write_scan_enable, (hci_stack->connectable << 1) | hci_stack->discoverable); // page scan
|
||||
hci_stack->substate = HCI_INIT_W4_WRITE_SCAN_ENABLE;
|
||||
break;
|
||||
case HCI_INIT_WRITE_SECURE_CONNECTIONS_HOST_ENABLE:
|
||||
hci_send_cmd(&hci_write_secure_connections_host_support, 1);
|
||||
hci_stack->substate = HCI_INIT_W4_WRITE_SECURE_CONNECTIONS_HOST_ENABLE;
|
||||
break;
|
||||
// only sent if ENABLE_SCO_OVER_HCI is defined
|
||||
case HCI_INIT_WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE:
|
||||
hci_stack->substate = HCI_INIT_W4_WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE;
|
||||
@ -1810,17 +1806,9 @@ static void hci_initializing_event_handler(const uint8_t * packet, uint16_t size
|
||||
#endif /* ENABLE_LE_DATA_LENGTH_EXTENSION */
|
||||
|
||||
#endif /* ENABLE_BLE */
|
||||
|
||||
case HCI_INIT_W4_WRITE_SCAN_ENABLE:
|
||||
|
||||
// skip write secure connections host support if not supported
|
||||
if (hci_stack->local_supported_commands[1] & 0x02) break;
|
||||
hci_stack->substate = HCI_INIT_W4_WRITE_SECURE_CONNECTIONS_HOST_ENABLE;
|
||||
|
||||
/* fall through */
|
||||
|
||||
|
||||
#ifdef ENABLE_SCO_OVER_HCI
|
||||
case HCI_INIT_W4_WRITE_SECURE_CONNECTIONS_HOST_ENABLE:
|
||||
case HCI_INIT_W4_WRITE_SCAN_ENABLE:
|
||||
// skip write synchronous flow control if not supported
|
||||
if (hci_stack->local_supported_commands[0] & 0x04) break;
|
||||
hci_stack->substate = HCI_INIT_W4_WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE;
|
||||
@ -2069,8 +2057,7 @@ static void event_handler(uint8_t *packet, int size){
|
||||
((packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+35] & 0x20) << 1) | // bit 6 = Octet 35, bit 5 / LE Set Default PHY
|
||||
((packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+20] & 0x10) << 3); // bit 7 = Octet 20, bit 4 / Read Encryption Key Size
|
||||
hci_stack->local_supported_commands[1] =
|
||||
((packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+ 2] & 0x40) >> 6) | // bit 8 = Octet 2, bit 6 / Read Remote Extended Features
|
||||
((packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+32] & 0x08) >> 2); // bit 9 = Octet 32, bit 3 / Write Secure Connections Host
|
||||
((packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+ 2] & 0x40) >> 6); // bit 8 = Octet 2, bit 6 / Read Remote Extended Features
|
||||
log_info("Local supported commands summary %02x - %02x", hci_stack->local_supported_commands[0], hci_stack->local_supported_commands[1]);
|
||||
}
|
||||
#ifdef ENABLE_CLASSIC
|
||||
|
@ -647,9 +647,7 @@ typedef enum hci_init_state{
|
||||
HCI_INIT_W4_WRITE_INQUIRY_MODE,
|
||||
HCI_INIT_WRITE_SCAN_ENABLE,
|
||||
HCI_INIT_W4_WRITE_SCAN_ENABLE,
|
||||
HCI_INIT_WRITE_SECURE_CONNECTIONS_HOST_ENABLE,
|
||||
HCI_INIT_W4_WRITE_SECURE_CONNECTIONS_HOST_ENABLE,
|
||||
|
||||
|
||||
// SCO over HCI
|
||||
HCI_INIT_WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE,
|
||||
HCI_INIT_W4_WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE,
|
||||
@ -809,7 +807,6 @@ typedef struct {
|
||||
/* 6 - LE Set Default PHY (Octet 35/bit 5) */
|
||||
/* 7 - Read Encryption Key Size (Octet 20/bit 4) */
|
||||
/* 8 - Read Remote Extended Features (Octet 2/bit 5) */
|
||||
/* 9 - Write Secure Connections Host (Octet 32/bit 3) */
|
||||
uint8_t local_supported_commands[2];
|
||||
|
||||
/* bluetooth device information from hci read local version information */
|
||||
|
Loading…
x
Reference in New Issue
Block a user