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

Commit ab6bb8bd authored by Myles Watson's avatar Myles Watson
Browse files

Remove get_le_all_initiating_phys

Bug: 321273521
Test: mma -j32
Flag: EXEMPT, no logical change
Change-Id: Ic1033d9c24a00d55c98d96f12440c5b052486189
parent 8a4ca24e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -136,7 +136,8 @@ void BTA_GATTC_AppDeregister(tGATT_IF client_if) {
 ******************************************************************************/
void BTA_GATTC_Open(tGATT_IF client_if, const RawAddress& remote_bda,
                    tBTM_BLE_CONN_TYPE connection_type, bool opportunistic) {
  uint8_t phy = controller_get_interface()->get_le_all_initiating_phys();
  constexpr uint8_t kPhyLe1M = 0x01;  // From the old controller shim.
  uint8_t phy = kPhyLe1M;
  BTA_GATTC_Open(client_if, remote_bda, connection_type, BT_TRANSPORT_LE,
                 opportunistic, phy);
}
+0 −1
Original line number Diff line number Diff line
@@ -46,7 +46,6 @@ typedef struct controller_t {
  uint8_t (*get_ble_resolving_list_max_size)(void);
  void (*set_ble_resolving_list_max_size)(int resolving_list_max_size);
  uint8_t* (*get_local_supported_codecs)(uint8_t* number_of_codecs);
  uint8_t (*get_le_all_initiating_phys)(void);
  uint8_t (*clear_event_filter)(void);
  uint8_t (*clear_event_mask)(void);
  uint8_t (*set_event_filter_connection_setup_all_devices)(void);
+0 −8
Original line number Diff line number Diff line
@@ -33,8 +33,6 @@ using ::bluetooth::shim::GetController;

constexpr int kMaxSupportedCodecs = 8;  // MAX_LOCAL_SUPPORTED_CODECS_SIZE

constexpr uint8_t kPhyLe1M = 0x01;

// Module lifecycle functions
static future_t* start_up(void);
static future_t* shut_down(void);
@@ -54,7 +52,6 @@ struct {
  uint8_t local_supported_codecs[kMaxSupportedCodecs];
  uint8_t number_of_local_supported_codecs;
  uint64_t le_supported_states;
  uint8_t phy;
} data_;

static future_t* start_up(void) {
@@ -79,8 +76,6 @@ static future_t* start_up(void) {

  LOG_INFO("Mac address:%s", ADDRESS_TO_LOGGABLE_CSTR(data_.raw_address));

  data_.phy = kPhyLe1M;

  return future_new_immediate(FUTURE_SUCCESS);
}

@@ -147,8 +142,6 @@ static uint8_t get_le_resolving_list_size(void) {
  return bluetooth::shim::GetController()->GetLeResolvingListSize();
}

static uint8_t get_le_all_initiating_phys() { return data_.phy; }

static uint8_t controller_clear_event_filter() {
  LOG_VERBOSE("Called!");
  bluetooth::shim::GetController()->SetEventFilterClearAll();
@@ -218,7 +211,6 @@ static const controller_t interface = {
    .get_ble_resolving_list_max_size = get_le_resolving_list_size,
    .set_ble_resolving_list_max_size = set_ble_resolving_list_max_size,
    .get_local_supported_codecs = get_local_supported_codecs,
    .get_le_all_initiating_phys = get_le_all_initiating_phys,
    .clear_event_filter = controller_clear_event_filter,
    .clear_event_mask = controller_clear_event_mask,
    .set_event_filter_connection_setup_all_devices =
+2 −3
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@

#include <string>

#include "device/include/controller.h"
#include "internal_include/bt_target.h"
#include "internal_include/bt_trace.h"
#include "internal_include/stack_config.h"
@@ -46,7 +45,6 @@
#include "stack/gatt/connection_manager.h"
#include "stack/gatt/gatt_int.h"
#include "stack/include/bt_hdr.h"
#include "stack/include/bt_types.h"
#include "stack/include/bt_uuid16.h"
#include "stack/include/l2cap_acl_interface.h"
#include "stack/include/sdp_api.h"
@@ -1398,7 +1396,8 @@ void GATT_StartIf(tGATT_IF gatt_if) {
bool GATT_Connect(tGATT_IF gatt_if, const RawAddress& bd_addr,
                  tBTM_BLE_CONN_TYPE connection_type, tBT_TRANSPORT transport,
                  bool opportunistic) {
  uint8_t phy = controller_get_interface()->get_le_all_initiating_phys();
  constexpr uint8_t kPhyLe1M = 0x01;  // From the old controller shim.
  uint8_t phy = kPhyLe1M;
  return GATT_Connect(gatt_if, bd_addr, connection_type, transport,
                      opportunistic, phy);
}
+0 −7
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@
// Original included files, if any
#include "btcore/include/version.h"
#include "device/include/controller.h"
#include "stack/include/btm_api_types.h"
#include "stack/include/btm_status.h"
#include "types/raw_address.h"

@@ -124,11 +123,6 @@ void set_ble_resolving_list_max_size(int resolving_list_max_size) {
  ble_resolving_list_max_size = resolving_list_max_size;
}

uint8_t get_le_all_initiating_phys() {
  uint8_t phy = PHY_LE_1M;
  return phy;
}

tBTM_STATUS clear_event_filter() { return BTM_SUCCESS; }

tBTM_STATUS clear_event_mask() { return BTM_SUCCESS; }
@@ -168,7 +162,6 @@ const controller_t interface = {
    get_ble_resolving_list_max_size,
    set_ble_resolving_list_max_size,
    get_local_supported_codecs,
    get_le_all_initiating_phys,
    clear_event_filter,
    clear_event_mask,
    set_event_filter_connection_setup_all_devices,