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

Commit fde5286b authored by Martin Brabham's avatar Martin Brabham
Browse files

Floss: Tell the controller to allow all devices Controller shim API

Bug: 232814383
Test: ./build.py
Test: mma -j $(nproc)
Tag: #floss
Change-Id: Id8749415daacda2c6d51bb3dcea2606e49f19618
parent a48faab2
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -120,6 +120,7 @@ typedef struct controller_t {
  uint8_t (*clear_event_filter)(void);
  uint8_t (*clear_event_filter)(void);
  uint8_t (*clear_event_mask)(void);
  uint8_t (*clear_event_mask)(void);
  uint8_t (*le_rand)(LeRandCallback);
  uint8_t (*le_rand)(LeRandCallback);
  uint8_t (*set_event_filter_connection_setup_all_devices)(void);
  uint8_t (*allow_wake_by_hid)(void);
  uint8_t (*allow_wake_by_hid)(void);
  uint8_t (*set_default_event_mask)(void);
  uint8_t (*set_default_event_mask)(void);
  uint8_t (*set_event_filter_inquiry_result_all_devices)(void);
  uint8_t (*set_event_filter_inquiry_result_all_devices)(void);
+8 −0
Original line number Original line Diff line number Diff line
@@ -329,6 +329,12 @@ static uint8_t controller_le_rand(LeRandCallback cb) {
  return BTM_SUCCESS;
  return BTM_SUCCESS;
}
}


static uint8_t controller_set_event_filter_connection_setup_all_devices() {
  bluetooth::shim::GetController()->SetEventFilterConnectionSetupAllDevices(
      bluetooth::hci::AutoAcceptFlag::AUTO_ACCEPT_ON_ROLE_SWITCH_ENABLED);
  return BTM_SUCCESS;
}

static uint8_t controller_allow_wake_by_hid() {
static uint8_t controller_allow_wake_by_hid() {
  bluetooth::shim::GetController()->AllowWakeByHid();
  bluetooth::shim::GetController()->AllowWakeByHid();
  return BTM_SUCCESS;
  return BTM_SUCCESS;
@@ -448,6 +454,8 @@ static const controller_t interface = {
    .clear_event_filter = controller_clear_event_filter,
    .clear_event_filter = controller_clear_event_filter,
    .clear_event_mask = controller_clear_event_mask,
    .clear_event_mask = controller_clear_event_mask,
    .le_rand = controller_le_rand,
    .le_rand = controller_le_rand,
    .set_event_filter_connection_setup_all_devices =
        controller_set_event_filter_connection_setup_all_devices,
    .allow_wake_by_hid = controller_allow_wake_by_hid,
    .allow_wake_by_hid = controller_allow_wake_by_hid,
    .set_default_event_mask = controller_set_default_event_mask,
    .set_default_event_mask = controller_set_default_event_mask,
    .set_event_filter_inquiry_result_all_devices =
    .set_event_filter_inquiry_result_all_devices =
+4 −0
Original line number Original line Diff line number Diff line
@@ -372,6 +372,9 @@ tBTM_STATUS clear_event_filter() { return BTM_SUCCESS; }
tBTM_STATUS clear_event_mask() { return BTM_SUCCESS; }
tBTM_STATUS clear_event_mask() { return BTM_SUCCESS; }


tBTM_STATUS le_rand(LeRandCallback cb) { return BTM_SUCCESS; }
tBTM_STATUS le_rand(LeRandCallback cb) { return BTM_SUCCESS; }
tBTM_STATUS set_event_filter_connection_setup_all_devices() {
  return BTM_SUCCESS;
}
tBTM_STATUS allow_wake_by_hid() { return BTM_SUCCESS; }
tBTM_STATUS allow_wake_by_hid() { return BTM_SUCCESS; }
tBTM_STATUS set_default_event_mask() { return BTM_SUCCESS; }
tBTM_STATUS set_default_event_mask() { return BTM_SUCCESS; }
tBTM_STATUS set_event_filter_inquiry_result_all_devices() {
tBTM_STATUS set_event_filter_inquiry_result_all_devices() {
@@ -466,6 +469,7 @@ const controller_t interface = {
    clear_event_filter,
    clear_event_filter,
    clear_event_mask,
    clear_event_mask,
    le_rand,
    le_rand,
    set_event_filter_connection_setup_all_devices,
    allow_wake_by_hid,
    allow_wake_by_hid,
    set_default_event_mask,
    set_default_event_mask,
    set_event_filter_inquiry_result_all_devices};
    set_event_filter_inquiry_result_all_devices};