hci: clarify BONDING_REMOTE_SUPPORTS_SSP as BONDING_REMOTE_SUPPORTS_SSP_CONTROLLER

This commit is contained in:
Matthias Ringwald 2020-05-18 17:07:58 +02:00
parent 545c5248ed
commit ac1d102c1d
2 changed files with 15 additions and 12 deletions

View File

@ -2278,7 +2278,7 @@ static void event_handler(uint8_t *packet, int size){
if (!packet[2]){
uint8_t * features = &packet[5];
if (features[6] & (1 << 3)){
conn->bonding_flags |= BONDING_REMOTE_SUPPORTS_SSP;
conn->bonding_flags |= BONDING_REMOTE_SUPPORTS_SSP_CONTROLLER;
}
if (features[3] & (1<<7)){
conn->remote_supported_feature_eSCO = 1;
@ -4537,7 +4537,7 @@ int hci_remote_esco_supported(hci_con_handle_t con_handle){
int hci_remote_ssp_supported(hci_con_handle_t con_handle){
hci_connection_t * connection = hci_connection_for_handle(con_handle);
if (!connection) return 0;
return (connection->bonding_flags & BONDING_REMOTE_SUPPORTS_SSP) ? 1 : 0;
return (connection->bonding_flags & BONDING_REMOTE_SUPPORTS_SSP_CONTROLLER) ? 1 : 0;
}
int gap_ssp_supported_on_both_sides(hci_con_handle_t handle){

View File

@ -231,16 +231,19 @@ typedef enum {
// bonding flags
enum {
BONDING_REQUEST_REMOTE_FEATURES = 0x01,
BONDING_RECEIVED_REMOTE_FEATURES = 0x02,
BONDING_REMOTE_SUPPORTS_SSP = 0x04,
BONDING_DISCONNECT_SECURITY_BLOCK = 0x08,
BONDING_DISCONNECT_DEDICATED_DONE = 0x10,
BONDING_SEND_AUTHENTICATE_REQUEST = 0x20,
BONDING_SEND_ENCRYPTION_REQUEST = 0x40,
BONDING_SEND_READ_ENCRYPTION_KEY_SIZE = 0x80,
BONDING_DEDICATED = 0x100,
BONDING_EMIT_COMPLETE_ON_DISCONNECT = 0x200
BONDING_REQUEST_REMOTE_FEATURES = 0x0001,
BONDING_RECEIVED_REMOTE_FEATURES = 0x0002,
BONDING_REQUEST_REMOTE_EXTENDED_FEATURES = 0x0004,
BONDING_RECEIVED_REMOTE_EXTENDED_FEATURES = 0x0008,
BONDING_REMOTE_SUPPORTS_SSP_CONTROLLER = 0x0010,
BONDING_REMOTE_SUPPORTS_SSP_HOST = 0x0020,
BONDING_DISCONNECT_SECURITY_BLOCK = 0x0040,
BONDING_DISCONNECT_DEDICATED_DONE = 0x0080,
BONDING_SEND_AUTHENTICATE_REQUEST = 0x0100,
BONDING_SEND_ENCRYPTION_REQUEST = 0x0200,
BONDING_SEND_READ_ENCRYPTION_KEY_SIZE = 0x0400,
BONDING_DEDICATED = 0x0800,
BONDING_EMIT_COMPLETE_ON_DISCONNECT = 0x1000,
};
typedef enum {