OSDN Git Service

HCI: Remove Create New Unit Key
authorMyles Watson <mylesgw@google.com>
Thu, 28 Jan 2021 19:44:08 +0000 (11:44 -0800)
committerMyles Watson <mylesgw@google.com>
Fri, 29 Jan 2021 23:12:03 +0000 (15:12 -0800)
Bug: 175422340
Test: cert/run
Tag: #gd-refactor
Change-Id: Idec5b4933a8e851bd194d9f93c6fdef8840e9c28

gd/hci/controller.cc
gd/hci/hci_packets.pdl
gd/rust/hci/src/controller.rs
stack/include/hcidefs.h

index e4420ed..6b6cc22 100644 (file)
@@ -788,7 +788,6 @@ struct Controller::impl {
       case OpCode::CONTROLLER_BQR:
         return vendor_capabilities_.bluetooth_quality_report_support_ == 0x01;
       // undefined in local_supported_commands_
-      case OpCode::CREATE_NEW_UNIT_KEY:
       case OpCode::READ_LOCAL_SUPPORTED_COMMANDS:
         return true;
       case OpCode::NONE:
index 60a0489..185e8f1 100644 (file)
@@ -140,7 +140,6 @@ enum OpCode : 16 {
   FLUSH = 0x0C08,
   READ_PIN_TYPE = 0x0C09,
   WRITE_PIN_TYPE = 0x0C0A,
-  CREATE_NEW_UNIT_KEY = 0x0C0B,
   READ_STORED_LINK_KEY = 0x0C0D,
   WRITE_STORED_LINK_KEY = 0x0C11,
   DELETE_STORED_LINK_KEY = 0x0C12,
@@ -1654,10 +1653,6 @@ packet WritePinTypeComplete : CommandComplete (command_op_code = WRITE_PIN_TYPE)
   status : ErrorCode,
 }
 
-packet CreateNewUnitKey : Command (op_code = CREATE_NEW_UNIT_KEY) {
-  _payload_,  // placeholder (unimplemented)
-}
-
 enum ReadStoredLinkKeyReadAllFlag : 8 {
   SPECIFIED_BD_ADDR = 0x00,
   ALL = 0x01,
index 5ab9f1d..54da90d 100644 (file)
@@ -219,7 +219,7 @@ impl SupportedCommands {
     /// Check whether a given opcode is supported by the controller
     pub fn is_supported(&self, opcode: OpCode) -> bool {
         match opcode {
-            OpCode::ReadLocalSupportedCommands | OpCode::CreateNewUnitKey => true,
+            OpCode::ReadLocalSupportedCommands => true,
             _ => {
                 let converted = OpCodeIndex::try_from(opcode);
                 if converted.is_err() {
index c50dfb1..e4fc469 100644 (file)
 #define HCI_FLUSH (0x0008 | HCI_GRP_HOST_CONT_BASEBAND_CMDS)
 #define HCI_READ_PIN_TYPE (0x0009 | HCI_GRP_HOST_CONT_BASEBAND_CMDS)
 #define HCI_WRITE_PIN_TYPE (0x000A | HCI_GRP_HOST_CONT_BASEBAND_CMDS)
-#define HCI_CREATE_NEW_UNIT_KEY (0x000B | HCI_GRP_HOST_CONT_BASEBAND_CMDS)
 #define HCI_GET_MWS_TRANS_LAYER_CFG (0x000C | HCI_GRP_HOST_CONT_BASEBAND_CMDS)
 #define HCI_READ_STORED_LINK_KEY (0x000D | HCI_GRP_HOST_CONT_BASEBAND_CMDS)
 #define HCI_WRITE_STORED_LINK_KEY (0x0011 | HCI_GRP_HOST_CONT_BASEBAND_CMDS)
@@ -1089,7 +1088,6 @@ typedef struct {
 #define HCI_FLUSH_SUPPORTED(x) ((x)[6] & 0x02)
 #define HCI_READ_PIN_TYPE_SUPPORTED(x) ((x)[6] & 0x04)
 #define HCI_WRITE_PIN_TYPE_SUPPORTED(x) ((x)[6] & 0x08)
-#define HCI_CREATE_NEW_UNIT_KEY_SUPPORTED(x) ((x)[6] & 0x10)
 #define HCI_READ_STORED_LINK_KEY_SUPPORTED(x) ((x)[6] & 0x20)
 #define HCI_WRITE_STORED_LINK_KEY_SUPPORTED(x) ((x)[6] & 0x40)
 #define HCI_DELETE_STORED_LINK_KEY_SUPPORTED(x) ((x)[6] & 0x80)