hci: request remote features before initiating our authentication

This commit is contained in:
Matthias Ringwald 2021-10-06 12:16:28 +02:00
parent 44b93b4e95
commit d54424c330

View File

@ -2120,6 +2120,11 @@ static void hci_handle_read_encryption_key_size_complete(hci_connection_t * conn
return;
}
// Request remote features if not already done
if ((conn->bonding_flags & BONDING_RECEIVED_REMOTE_FEATURES) == 0) {
conn->bonding_flags |= BONDING_REQUEST_REMOTE_FEATURES_PAGE_0;
}
// Request Authentication if not already done
if ((conn->bonding_flags & BONDING_SENT_AUTHENTICATE_REQUEST) != 0) return;
conn->bonding_flags |= BONDING_SEND_AUTHENTICATE_REQUEST;