OSDN Git Service

gd: Add hci error code CONNECTION_FAILED_ESTABLISHMENT
authorChris Manton <cmanton@google.com>
Wed, 18 Nov 2020 20:51:18 +0000 (12:51 -0800)
committerChris Manton <cmanton@google.com>
Thu, 19 Nov 2020 07:15:51 +0000 (07:15 +0000)
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

gd/hci/hci_packets.pdl
main/shim/helpers.h

index bdf482a..2297ffb 100644 (file)
@@ -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
index 3975597..ae6b270 100644 (file)
@@ -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<tHCI_STATUS>(hci::ErrorCode::CONTROLLER_BUSY);
+    case hci::ErrorCode::CONNECTION_FAILED_ESTABLISHMENT:
+      return static_cast<tHCI_STATUS>(
+          hci::ErrorCode::CONNECTION_FAILED_ESTABLISHMENT);
   }
 }