mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-02 16:20:31 +00:00
hci: delete unused authentication flags
This commit is contained in:
parent
8daf94bc5a
commit
b54464ca65
@ -2693,7 +2693,6 @@ static void event_handler(uint8_t *packet, uint16_t size){
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case HCI_EVENT_LINK_KEY_REQUEST:
|
case HCI_EVENT_LINK_KEY_REQUEST:
|
||||||
hci_add_connection_flags_for_flipped_bd_addr(&packet[2], AUTH_FLAG_RECV_LINK_KEY_REQUEST);
|
|
||||||
// request handled by hci_run()
|
// request handled by hci_run()
|
||||||
hci_add_connection_flags_for_flipped_bd_addr(&packet[2], AUTH_FLAG_HANDLE_LINK_KEY_REQUEST);
|
hci_add_connection_flags_for_flipped_bd_addr(&packet[2], AUTH_FLAG_HANDLE_LINK_KEY_REQUEST);
|
||||||
break;
|
break;
|
||||||
@ -2705,7 +2704,6 @@ static void event_handler(uint8_t *packet, uint16_t size){
|
|||||||
|
|
||||||
hci_pairing_complete(conn, ERROR_CODE_SUCCESS);
|
hci_pairing_complete(conn, ERROR_CODE_SUCCESS);
|
||||||
|
|
||||||
conn->authentication_flags |= AUTH_FLAG_RECV_LINK_KEY_NOTIFICATION;
|
|
||||||
link_key_type_t link_key_type = (link_key_type_t)packet[24];
|
link_key_type_t link_key_type = (link_key_type_t)packet[24];
|
||||||
// Change Connection Encryption keeps link key type
|
// Change Connection Encryption keeps link key type
|
||||||
if (link_key_type != CHANGED_COMBINATION_KEY){
|
if (link_key_type != CHANGED_COMBINATION_KEY){
|
||||||
@ -2761,7 +2759,6 @@ static void event_handler(uint8_t *packet, uint16_t size){
|
|||||||
conn = hci_connection_for_bd_addr_and_type(addr, BD_ADDR_TYPE_ACL);
|
conn = hci_connection_for_bd_addr_and_type(addr, BD_ADDR_TYPE_ACL);
|
||||||
if (!conn) break;
|
if (!conn) break;
|
||||||
|
|
||||||
hci_add_connection_flags_for_flipped_bd_addr(&packet[2], AUTH_FLAG_RECV_IO_CAPABILITIES_REQUEST);
|
|
||||||
hci_pairing_started(conn, true);
|
hci_pairing_started(conn, true);
|
||||||
#ifndef ENABLE_EXPLICIT_IO_CAPABILITIES_REPLY
|
#ifndef ENABLE_EXPLICIT_IO_CAPABILITIES_REPLY
|
||||||
if (hci_stack->ssp_io_capability != SSP_IO_CAPABILITY_UNKNOWN){
|
if (hci_stack->ssp_io_capability != SSP_IO_CAPABILITY_UNKNOWN){
|
||||||
@ -4969,12 +4966,6 @@ int hci_send_cmd_packet(uint8_t *packet, int size){
|
|||||||
hci_stack->outgoing_addr_type = BD_ADDR_TYPE_ACL;
|
hci_stack->outgoing_addr_type = BD_ADDR_TYPE_ACL;
|
||||||
(void) memcpy(hci_stack->outgoing_addr, addr, 6);
|
(void) memcpy(hci_stack->outgoing_addr, addr, 6);
|
||||||
break;
|
break;
|
||||||
case HCI_OPCODE_HCI_LINK_KEY_REQUEST_REPLY:
|
|
||||||
hci_add_connection_flags_for_flipped_bd_addr(&packet[3], AUTH_FLAG_SENT_LINK_KEY_REPLY);
|
|
||||||
break;
|
|
||||||
case HCI_OPCODE_HCI_LINK_KEY_REQUEST_NEGATIVE_REPLY:
|
|
||||||
hci_add_connection_flags_for_flipped_bd_addr(&packet[3], AUTH_FLAG_SENT_LINK_KEY_NEGATIVE_REQUEST);
|
|
||||||
break;
|
|
||||||
case HCI_OPCODE_HCI_DELETE_STORED_LINK_KEY:
|
case HCI_OPCODE_HCI_DELETE_STORED_LINK_KEY:
|
||||||
if (hci_stack->link_key_db) {
|
if (hci_stack->link_key_db) {
|
||||||
reverse_bd_addr(&packet[3], addr);
|
reverse_bd_addr(&packet[3], addr);
|
||||||
|
33
src/hci.h
33
src/hci.h
@ -199,34 +199,29 @@ typedef enum {
|
|||||||
// Authentication flags
|
// Authentication flags
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AUTH_FLAG_NONE = 0x0000,
|
AUTH_FLAG_NONE = 0x0000,
|
||||||
AUTH_FLAG_RECV_LINK_KEY_REQUEST = 0x0001,
|
AUTH_FLAG_HANDLE_LINK_KEY_REQUEST = 0x0001,
|
||||||
AUTH_FLAG_HANDLE_LINK_KEY_REQUEST = 0x0002,
|
AUTH_FLAG_DENY_PIN_CODE_REQUEST = 0x0002,
|
||||||
AUTH_FLAG_SENT_LINK_KEY_REPLY = 0x0004,
|
AUTH_FLAG_RECV_IO_CAPABILITIES_RESPONSE = 0x0004,
|
||||||
AUTH_FLAG_SENT_LINK_KEY_NEGATIVE_REQUEST = 0x0008,
|
AUTH_FLAG_SEND_IO_CAPABILITIES_REPLY = 0x0008,
|
||||||
AUTH_FLAG_RECV_LINK_KEY_NOTIFICATION = 0x0010,
|
AUTH_FLAG_SEND_IO_CAPABILITIES_NEGATIVE_REPLY = 0x0010,
|
||||||
AUTH_FLAG_DENY_PIN_CODE_REQUEST = 0x0040,
|
AUTH_FLAG_SEND_USER_CONFIRM_REPLY = 0x0020,
|
||||||
AUTH_FLAG_RECV_IO_CAPABILITIES_REQUEST = 0x0080,
|
AUTH_FLAG_SEND_USER_PASSKEY_REPLY = 0x0040,
|
||||||
AUTH_FLAG_RECV_IO_CAPABILITIES_RESPONSE = 0x0100,
|
|
||||||
AUTH_FLAG_SEND_IO_CAPABILITIES_REPLY = 0x0200,
|
|
||||||
AUTH_FLAG_SEND_IO_CAPABILITIES_NEGATIVE_REPLY = 0x0400,
|
|
||||||
AUTH_FLAG_SEND_USER_CONFIRM_REPLY = 0x0800,
|
|
||||||
AUTH_FLAG_SEND_USER_PASSKEY_REPLY = 0x1000,
|
|
||||||
|
|
||||||
// Classic OOB
|
// Classic OOB
|
||||||
AUTH_FLAG_SEND_REMOTE_OOB_DATA_REPLY = 0x2000,
|
AUTH_FLAG_SEND_REMOTE_OOB_DATA_REPLY = 0x0080,
|
||||||
|
|
||||||
// pairing status
|
// pairing status
|
||||||
AUTH_FLAG_LEGACY_PAIRING_ACTIVE = 0x4000,
|
AUTH_FLAG_LEGACY_PAIRING_ACTIVE = 0x0100,
|
||||||
AUTH_FLAG_SSP_PAIRING_ACTIVE = 0x8000,
|
AUTH_FLAG_SSP_PAIRING_ACTIVE = 0x0200,
|
||||||
AUTH_FLAG_PAIRING_ACTIVE_MASK = (AUTH_FLAG_LEGACY_PAIRING_ACTIVE | AUTH_FLAG_SSP_PAIRING_ACTIVE),
|
AUTH_FLAG_PAIRING_ACTIVE_MASK = (AUTH_FLAG_LEGACY_PAIRING_ACTIVE | AUTH_FLAG_SSP_PAIRING_ACTIVE),
|
||||||
|
|
||||||
// connection status
|
// connection status
|
||||||
AUTH_FLAG_CONNECTION_AUTHENTICATED = 0x10000,
|
AUTH_FLAG_CONNECTION_AUTHENTICATED = 0x0400,
|
||||||
AUTH_FLAG_CONNECTION_ENCRYPTED = 0x20000,
|
AUTH_FLAG_CONNECTION_ENCRYPTED = 0x0800,
|
||||||
|
|
||||||
// errands
|
// errands
|
||||||
AUTH_FLAG_READ_RSSI = 0x40000,
|
AUTH_FLAG_READ_RSSI = 0x1000,
|
||||||
AUTH_FLAG_WRITE_SUPERVISION_TIMEOUT = 0x80000,
|
AUTH_FLAG_WRITE_SUPERVISION_TIMEOUT = 0x2000,
|
||||||
|
|
||||||
} hci_authentication_flags_t;
|
} hci_authentication_flags_t;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user