Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f924a01 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5931403 from cb15795c to rvc-release

Change-Id: Ife2d68df1645f94f9aafc5d1b1eaa206e2487a92
parents 3d554f2e cb15795c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -79,8 +79,10 @@ class HciHalFacadeService
                            ::google::protobuf::Empty* response) override {
    std::unique_lock<std::mutex> lock(mutex_);
    can_send_hci_command_ = false;
    hal_->sendHciCommand(
        SerializePacket(hci::InquiryBuilder::Create(0x33 /* LAP=0x9e8b33 */, static_cast<uint8_t>(request->length()),
    hci::Lap lap;
    lap.lap_ = 0x33;

    hal_->sendHciCommand(SerializePacket(hci::InquiryBuilder::Create(lap, static_cast<uint8_t>(request->length()),
                                                                     static_cast<uint8_t>(request->num_responses()))));
    while (!can_send_hci_command_) {
      cv_.wait(lock);
+18 −9
Original line number Diff line number Diff line
@@ -704,10 +704,15 @@ packet CommandStatus : EventPacket (event_code = COMMAND_STATUS){
packet NoCommandComplete : CommandComplete (command_op_code = NONE){
}

struct Lap { // Lower Address Part
  lap : 6,
  _reserved_ : 2,
  _fixed_ = 0x9e8b : 16,
}

  // LINK_CONTROL
packet Inquiry : DiscoveryCommand (op_code = INQUIRY) {
  lap0 : 8, // 0x00 - 0x3F
  _fixed_ = 0x9E8B : 16, // LAP upper bits are _fixed_
  lap : Lap,
  inquiry_length : 8, // 0x1 - 0x30 (times 1.28s)
  num_responses : 8, // 0x00 unlimited
}
@@ -1485,7 +1490,12 @@ packet WritePageScanActivityComplete : CommandComplete (command_op_code = WRITE_
}

packet ReadInquiryScanActivity : DiscoveryCommand (op_code = READ_INQUIRY_SCAN_ACTIVITY) {
  _payload_,  // placeholder (unimplemented)
}

packet ReadInquiryScanActivityComplete : CommandComplete (command_op_code = READ_INQUIRY_SCAN_ACTIVITY) {
  status : ErrorCode,
  inquiry_scan_interval : 16, // Range: 0x0012 to 0x1000; only even values are valid * 0x625 ms
  inquiry_scan_window : 16, // Range: 0x0011 to 0x1000
}

packet WriteInquiryScanActivity : DiscoveryCommand (op_code = WRITE_INQUIRY_SCAN_ACTIVITY) {
@@ -1672,14 +1682,13 @@ packet ReadNumberOfSupportedIacComplete : CommandComplete (command_op_code = REA
  num_support_iac : 8,
}

struct Lap { // Lower Address Part
  lap : 6,
  _reserved_ : 2,
  _fixed_ = 0x9e8b : 16,
packet ReadCurrentIacLap : DiscoveryCommand (op_code = READ_CURRENT_IAC_LAP) {
}

packet ReadCurrentIacLap : DiscoveryCommand (op_code = READ_CURRENT_IAC_LAP) {
  _payload_,  // placeholder (unimplemented)
packet ReadCurrentIacLapComplete : CommandComplete (command_op_code = READ_CURRENT_IAC_LAP) {
  status : ErrorCode,
  _count_(laps_to_read) : 8,
  laps_to_read : Lap[],
}

packet WriteCurrentIacLap : DiscoveryCommand (op_code = WRITE_CURRENT_IAC_LAP) {
+3 −1
Original line number Diff line number Diff line
@@ -26,7 +26,9 @@ namespace classic {
bool FixedChannelManager::ConnectServices(hci::Address device, OnConnectionFailureCallback on_fail_callback,
                                          os::Handler* handler) {
  internal::LinkManager::PendingFixedChannelConnection pending_fixed_channel_connection{
      .on_fail_callback_ = std::move(on_fail_callback), .handler_ = handler};
      .handler_ = handler,
      .on_fail_callback_ = std::move(on_fail_callback),
  };
  l2cap_layer_handler_->Post(common::BindOnce(&internal::LinkManager::ConnectFixedChannelServices,
                                              common::Unretained(link_manager_), device,
                                              std::move(pending_fixed_channel_connection)));
+3 −1
Original line number Diff line number Diff line
@@ -26,7 +26,9 @@ namespace le {
bool FixedChannelManager::ConnectServices(hci::Address device, hci::AddressType address_type,
                                          OnConnectionFailureCallback on_fail_callback, os::Handler* handler) {
  internal::LinkManager::PendingFixedChannelConnection pending_fixed_channel_connection{
      .on_fail_callback_ = std::move(on_fail_callback), .handler_ = handler};
      .handler_ = handler,
      .on_fail_callback_ = std::move(on_fail_callback),
  };
  l2cap_layer_handler_->Post(common::BindOnce(&internal::LinkManager::ConnectFixedChannelServices,
                                              common::Unretained(link_manager_), device, address_type,
                                              std::move(pending_fixed_channel_connection)));
+3 −3
Original line number Diff line number Diff line
@@ -54,10 +54,10 @@ struct elliptic_curve_t {

// P-256 elliptic curve, as per BT Spec 5.1 Vol 2, Part H 7.6
static constexpr elliptic_curve_t curve_p256{
    .p = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0, 0x0, 0x0, 0x00000001, 0xFFFFFFFF},
    .omega = {0},
    .a = {0},
    .b = {0x27d2604b, 0x3bce3c3e, 0xcc53b0f6, 0x651d06b0, 0x769886bc, 0xb3ebbd55, 0xaa3a93e7, 0x5ac635d8},
    .p = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0, 0x0, 0x0, 0x00000001, 0xFFFFFFFF},
    .omega = {0},

    .G = {.x = {0xd898c296, 0xf4a13945, 0x2deb33a0, 0x77037d81, 0x63a440f2, 0xf8bce6e5, 0xe12c4247, 0x6b17d1f2},
          .y = {0x37bf51f5, 0xcbb64068, 0x6b315ece, 0x2bce3357, 0x7c0f9e16, 0x8ee7eb4a, 0xfe1a7f9b, 0x4fe342e2}},
Loading