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

Commit ae51aad8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "RootCanal: Remove redundant SendLinkLayerPacket"

parents 0e1fa4b2 dd5fd6f7
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -79,28 +79,6 @@ void DualModeController::TimerTick() {
  link_layer_controller_.TimerTick();
}

void DualModeController::SendLinkLayerPacket(std::shared_ptr<packets::LinkLayerPacketBuilder> to_send,
                                             Phy::Type phy_type) {
  for (auto phy_pair : phy_layers_) {
    auto phy_list = std::get<1>(phy_pair);
    if (phy_type != std::get<0>(phy_pair)) {
      continue;
    }
    for (auto phy : phy_list) {
      phy->Send(to_send);
    }
  }
}

/*
void DualModeController::AddConnectionAction(const TaskCallback& task,
                                             uint16_t handle) {
  for (size_t i = 0; i < connections_.size(); i++)
    if (connections_[i]->GetHandle() == handle)
connections_[i]->AddAction(task);
}
*/

void DualModeController::SendCommandCompleteSuccess(OpCode command_opcode) const {
  send_event_(packets::EventPacketBuilder::CreateCommandCompleteOnlyStatusEvent(command_opcode, hci::Status::SUCCESS)
                  ->ToVector());
+0 −3
Original line number Diff line number Diff line
@@ -64,9 +64,6 @@ class DualModeController : public Device {

  virtual void TimerTick() override;

  // Send packets to remote devices
  void SendLinkLayerPacket(std::shared_ptr<packets::LinkLayerPacketBuilder> to_send, Phy::Type phy_type);

  // Route commands and data from the stack.
  void HandleAcl(std::shared_ptr<std::vector<uint8_t>> acl_packet);
  void HandleCommand(std::shared_ptr<std::vector<uint8_t>> command_packet);
+1 −2
Original line number Diff line number Diff line
@@ -59,8 +59,7 @@ bool Device::IsAdvertisementAvailable(std::chrono::milliseconds scan_time) const
}

void Device::SendLinkLayerPacket(std::shared_ptr<packets::LinkLayerPacketBuilder> to_send, Phy::Type phy_type) {
  auto phy_list = phy_layers_[phy_type];
  for (auto phy : phy_list) {
  for (auto phy : phy_layers_[phy_type]) {
    phy->Send(to_send);
  }
}