hci.c (c70df5f87ebb5a7224ae3a1d64cd1a4889054406) | hci.c (72a2585a4ccb6ef66aa6c622604f11e88c7b0a00) |
---|---|
1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 2408 unchanged lines hidden (view full) --- 2417 // handle BT initialization 2418 if (hci_stack->state == HCI_STATE_INITIALIZING) { 2419 hci_initializing_event_handler(packet, size); 2420 } 2421 2422 // help with BT sleep 2423 if ((hci_stack->state == HCI_STATE_FALLING_ASLEEP) 2424 && (hci_stack->substate == HCI_FALLING_ASLEEP_W4_WRITE_SCAN_ENABLE) | 1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 2408 unchanged lines hidden (view full) --- 2417 // handle BT initialization 2418 if (hci_stack->state == HCI_STATE_INITIALIZING) { 2419 hci_initializing_event_handler(packet, size); 2420 } 2421 2422 // help with BT sleep 2423 if ((hci_stack->state == HCI_STATE_FALLING_ASLEEP) 2424 && (hci_stack->substate == HCI_FALLING_ASLEEP_W4_WRITE_SCAN_ENABLE) |
2425 && (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_write_scan_enable))) { | 2425 && (hci_event_packet_get_type(packet) == HCI_EVENT_COMMAND_COMPLETE) 2426 && (hci_event_command_complete_get_command_opcode(packet) == HCI_OPCODE_HCI_WRITE_SCAN_ENABLE)){ |
2426 hci_initializing_next_state(); 2427 } 2428} 2429 2430#ifdef ENABLE_CLASSIC 2431static void hci_handle_read_encryption_key_size_complete(hci_connection_t * conn, uint8_t encryption_key_size) { 2432 conn->authentication_flags |= AUTH_FLAG_CONNECTION_ENCRYPTED; 2433 conn->encryption_key_size = encryption_key_size; --- 6248 unchanged lines hidden --- | 2427 hci_initializing_next_state(); 2428 } 2429} 2430 2431#ifdef ENABLE_CLASSIC 2432static void hci_handle_read_encryption_key_size_complete(hci_connection_t * conn, uint8_t encryption_key_size) { 2433 conn->authentication_flags |= AUTH_FLAG_CONNECTION_ENCRYPTED; 2434 conn->encryption_key_size = encryption_key_size; --- 6248 unchanged lines hidden --- |