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

Commit 44c79fb6 authored by Myles Watson's avatar Myles Watson
Browse files

Update registration for events for the Controller

Bug: 322230000
Test: mma -j32
Flag: EXEMPT, no logical change
Change-Id: Ifc2fb983788ce3c766c861d886174537409ef4da
parent 611b2cc3
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@

#include "common/bidi_queue.h"
#include "common/init_flags.h"
#include "hci/controller_interface.h"
#include "hci/hci_layer.h"
#include "hci/hci_packets.h"
#include "hci/include/packet_fragmenter.h"
@@ -68,7 +67,6 @@ bool is_valid_event_code(bluetooth::hci::EventCode event_code) {
    case bluetooth::hci::EventCode::CHANGE_CONNECTION_LINK_KEY_COMPLETE:
    case bluetooth::hci::EventCode::CENTRAL_LINK_KEY_COMPLETE:
    case bluetooth::hci::EventCode::HARDWARE_ERROR:
    case bluetooth::hci::EventCode::NUMBER_OF_COMPLETED_PACKETS:
    case bluetooth::hci::EventCode::RETURN_LINK_KEYS:
    case bluetooth::hci::EventCode::PIN_CODE_REQUEST:
    case bluetooth::hci::EventCode::LINK_KEY_REQUEST:
@@ -139,16 +137,6 @@ bool is_valid_subevent_code(bluetooth::hci::SubeventCode subevent_code) {
  }
}

static bool event_already_registered_in_controller_layer(
    bluetooth::hci::EventCode event_code) {
  switch (event_code) {
    case bluetooth::hci::EventCode::NUMBER_OF_COMPLETED_PACKETS:
      return true;
    default:
      return false;
  }
}

static bool subevent_already_registered_in_le_hci_layer(
    bluetooth::hci::SubeventCode subevent_code) {
  switch (subevent_code) {
@@ -464,10 +452,6 @@ void bluetooth::shim::hci_on_reset_complete() {
    if (!is_valid_event_code(event_code)) {
      continue;
    }
    if (event_already_registered_in_controller_layer(event_code)) {
      continue;
    }

    cpp::register_event(event_code);
  }