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

Commit 8e1f210e authored by Myles Watson's avatar Myles Watson
Browse files

HCI: Remove transmit_command_futured

Bug: 283254594
Test: presubmit
Change-Id: I4f0a1884adf1156a26b6e78128d0273258bc26aa
parent 9068f477
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -64,8 +64,6 @@ typedef struct hci_t {
                           command_complete_cb complete_callback,
                           command_status_cb status_cb, void* context);

  future_t* (*transmit_command_futured)(const BT_HDR* command);

  // Send some data downward through the HCI layer
  void (*transmit_downward)(uint16_t type, void* data);
} hci_t;
+0 −19
Original line number Diff line number Diff line
@@ -551,24 +551,6 @@ static void transmit_command(const BT_HDR* command,
  cpp::transmit_command(command, complete_callback, status_callback, context);
}

static void command_complete_callback(BT_HDR* response, void* context) {
  auto future = static_cast<future_t*>(context);
  future_ready(future, response);
}

static void command_status_callback(uint8_t status, BT_HDR* command,
                                    void* context) {
  LOG_ALWAYS_FATAL(
      "transmit_command_futured should only send command complete opcode");
}

static future_t* transmit_command_futured(const BT_HDR* command) {
  future_t* future = future_new();
  transmit_command(command, command_complete_callback, command_status_callback,
                   future);
  return future;
}

static void transmit_fragment(BT_HDR* packet, bool send_transmit_finished) {
  uint16_t event = packet->event & MSG_EVT_MASK;

@@ -610,7 +592,6 @@ static void transmit_downward(uint16_t type, void* raw_data) {

static hci_t interface = {.set_data_cb = set_data_cb,
                          .transmit_command = transmit_command,
                          .transmit_command_futured = transmit_command_futured,
                          .transmit_downward = transmit_downward};

const hci_t* bluetooth::shim::hci_layer_get_interface() {