From: Chris Manton Date: Wed, 18 Nov 2020 20:51:18 +0000 (-0800) Subject: gd: Add hci error code CONNECTION_FAILED_ESTABLISHMENT X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=787e582564c38c198b2c5a030f28c943b48fc4cb;p=android-x86%2Fsystem-bt.git gd: Add hci error code CONNECTION_FAILED_ESTABLISHMENT Occurs when a connection ACL is requested to a given device but there is already an existing ACL connection. Bug: 145832107 Test: gd/cert/run --host Tag: #refactor Change-Id: I609374ba9376f2a1056971fc514d97615931c62a --- diff --git a/gd/hci/hci_packets.pdl b/gd/hci/hci_packets.pdl index bdf482a26..2297ffbef 100644 --- a/gd/hci/hci_packets.pdl +++ b/gd/hci/hci_packets.pdl @@ -787,6 +787,7 @@ enum ErrorCode: 8 { LINK_LAYER_COLLISION = 0x23, ENCRYPTION_MODE_NOT_ACCEPTABLE = 0x25, CONTROLLER_BUSY = 0x3A, + CONNECTION_FAILED_ESTABLISHMENT = 0x3E, } // Events that are defined with their respective commands diff --git a/main/shim/helpers.h b/main/shim/helpers.h index 397559761..ae6b2705e 100644 --- a/main/shim/helpers.h +++ b/main/shim/helpers.h @@ -208,6 +208,9 @@ inline tHCI_STATUS ToLegacyHciErrorCode(hci::ErrorCode reason) { return HCI_ERR_ENCRY_MODE_NOT_ACCEPTABLE; case hci::ErrorCode::CONTROLLER_BUSY: return static_cast(hci::ErrorCode::CONTROLLER_BUSY); + case hci::ErrorCode::CONNECTION_FAILED_ESTABLISHMENT: + return static_cast( + hci::ErrorCode::CONNECTION_FAILED_ESTABLISHMENT); } }