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

Commit 32dc59ae authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Remove unused flag is_gd_shim_enabled am: 664d9e89

parents 7a88c9a5 664d9e89
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -65,10 +65,6 @@ bool bluetooth::shim::is_gd_l2cap_enabled() {
  return bluetooth::common::init_flags::gd_l2cap_is_enabled();
}

bool bluetooth::shim::is_gd_shim_enabled() {
  return bluetooth::common::init_flags::gd_core_is_enabled();
}

bool bluetooth::shim::is_gd_stack_started_up() {
  return bluetooth::shim::Stack::GetInstance()->IsRunning();
}
+0 −1
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@ namespace shim {
 * @return true if using gd shim core, false if using legacy.
 */
bool is_gd_l2cap_enabled();
bool is_gd_shim_enabled();
bool is_gd_btaa_enabled();

/**
+0 −4
Original line number Diff line number Diff line
@@ -2415,10 +2415,6 @@ void BTM_ReadConnectionAddr(const RawAddress& remote_bda,
 *
 ******************************************************************************/
bool BTM_IsBleConnection(uint16_t hci_handle) {
  if (bluetooth::shim::is_gd_shim_enabled()) {
    ASSERT_LOG(false, "This should not be invoked from code path");
  }

  if (bluetooth::shim::is_gd_l2cap_enabled()) {
    return bluetooth::shim::L2CA_IsLeLink(hci_handle);
  }
+0 −3
Original line number Diff line number Diff line
@@ -2023,9 +2023,6 @@ bool BTM_BleVerifySignature(const RawAddress& bd_addr, uint8_t* p_orig,
 *
 ******************************************************************************/
void BTM_BleSirkConfirmDeviceReply(const RawAddress& bd_addr, uint8_t res) {
  if (bluetooth::shim::is_gd_shim_enabled()) {
    ASSERT_LOG(false, "This should not be invoked from code path");
  }
  tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
  tSMP_STATUS res_smp = (res == BTM_SUCCESS) ? SMP_SUCCESS : SMP_FAIL;

+0 −31
Original line number Diff line number Diff line
@@ -50,11 +50,6 @@
 *
 ******************************************************************************/
void SMP_Init(uint8_t init_security_mode) {
  if (bluetooth::shim::is_gd_shim_enabled()) {
    LOG(INFO) << "Skipping legacy SMP_Init because GD is enabled";
    return;
  }

  smp_cb.init_security_mode = init_security_mode;

  memset(&smp_cb, 0, sizeof(tSMP_CB));
@@ -116,9 +111,6 @@ uint8_t SMP_SetTraceLevel(uint8_t new_level) {
 *
 ******************************************************************************/
bool SMP_Register(tSMP_CALLBACK* p_cback) {
  LOG_ASSERT(!bluetooth::shim::is_gd_shim_enabled())
      << "Legacy SMP API should not be invoked when GD Security is used";

  SMP_TRACE_EVENT("SMP_Register state=%d", smp_cb.state);

  if (smp_cb.p_callback != NULL) {
@@ -142,8 +134,6 @@ bool SMP_Register(tSMP_CALLBACK* p_cback) {
 *
 ******************************************************************************/
tSMP_STATUS SMP_Pair(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type) {
  LOG_ASSERT(!bluetooth::shim::is_gd_shim_enabled())
      << "Legacy SMP API should not be invoked when GD Security is used";
  tSMP_CB* p_cb = &smp_cb;

  SMP_TRACE_EVENT("%s: state=%d br_state=%d flag=0x%x, bd_addr=%s", __func__,
@@ -193,9 +183,6 @@ tSMP_STATUS SMP_Pair(const RawAddress& bd_addr) {
 *
 ******************************************************************************/
tSMP_STATUS SMP_BR_PairWith(const RawAddress& bd_addr) {
  LOG_ASSERT(!bluetooth::shim::is_gd_shim_enabled())
      << "Legacy SMP API should not be invoked when GD Security is used";

  tSMP_CB* p_cb = &smp_cb;

  SMP_TRACE_EVENT("%s: state=%d br_state=%d flag=0x%x, bd_addr=%s", __func__,
@@ -237,9 +224,6 @@ tSMP_STATUS SMP_BR_PairWith(const RawAddress& bd_addr) {
 *
 ******************************************************************************/
bool SMP_PairCancel(const RawAddress& bd_addr) {
  LOG_ASSERT(!bluetooth::shim::is_gd_shim_enabled())
      << "Legacy SMP API should not be invoked when GD Security is used";

  tSMP_CB* p_cb = &smp_cb;

  SMP_TRACE_EVENT("SMP_CancelPair state=%d flag=0x%x ", p_cb->state,
@@ -270,9 +254,6 @@ bool SMP_PairCancel(const RawAddress& bd_addr) {
 *
 ******************************************************************************/
void SMP_SecurityGrant(const RawAddress& bd_addr, tSMP_STATUS res) {
  LOG_ASSERT(!bluetooth::shim::is_gd_shim_enabled())
      << "Legacy SMP API should not be invoked when GD Security is used";

  SMP_TRACE_EVENT("SMP_SecurityGrant ");

  // If just showing consent dialog, send response
@@ -357,9 +338,6 @@ void SMP_SecurityGrant(const RawAddress& bd_addr, tSMP_STATUS res) {
 ******************************************************************************/
void SMP_PasskeyReply(const RawAddress& bd_addr, uint8_t res,
                      uint32_t passkey) {
  LOG_ASSERT(!bluetooth::shim::is_gd_shim_enabled())
      << "Legacy SMP API should not be invoked when GD Security is used";

  tSMP_CB* p_cb = &smp_cb;

  SMP_TRACE_EVENT("SMP_PasskeyReply: Key: %d  Result:%d", passkey, res);
@@ -414,9 +392,6 @@ void SMP_PasskeyReply(const RawAddress& bd_addr, uint8_t res,
 *
 ******************************************************************************/
void SMP_ConfirmReply(const RawAddress& bd_addr, uint8_t res) {
  LOG_ASSERT(!bluetooth::shim::is_gd_shim_enabled())
      << "Legacy SMP API should not be invoked when GD Security is used";

  tSMP_CB* p_cb = &smp_cb;

  SMP_TRACE_EVENT("%s: Result:%d", __func__, res);
@@ -462,9 +437,6 @@ void SMP_ConfirmReply(const RawAddress& bd_addr, uint8_t res) {
 ******************************************************************************/
void SMP_OobDataReply(const RawAddress& bd_addr, tSMP_STATUS res, uint8_t len,
                      uint8_t* p_data) {
  LOG_ASSERT(!bluetooth::shim::is_gd_shim_enabled())
      << "Legacy SMP API should not be invoked when GD Security is used";

  tSMP_CB* p_cb = &smp_cb;
  tSMP_KEY key;

@@ -599,9 +571,6 @@ void SMP_ClearLocScOobData() { smp_clear_local_oob_data(); }
 *
 ******************************************************************************/
void SMP_SirkConfirmDeviceReply(const RawAddress& bd_addr, uint8_t res) {
  LOG_ASSERT(!bluetooth::shim::is_gd_shim_enabled())
      << "Legacy SMP API should not be invoked when GD Security is used";

  tSMP_CB* p_cb = &smp_cb;

  LOG_INFO("Result: %d", res);
Loading