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

Commit b21dc4c3 authored by Chris Manton's avatar Chris Manton Committed by Gerrit Code Review
Browse files

Merge changes Ieb7d23c3,I20fa2210,I6610625b,Ie0d68779,I08aadd6f, ... into main

* changes:
  mock: [10/63] Remove BTM_block_sniff_mode_for
  mock: [9/63] Remove BTM_block_role_switch_for
  mock: [8/63] Remove BTM_BleSetPrefConnParams
  mock: [7/63] Remove BTM_BleSetPhy
  mock: [6/63] Remove BTM_BleObserve
  mock: stack::btm_client_interface Add missing entries
parents 11911dbd b19e0e1b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1844,7 +1844,7 @@ void bta_av_do_start(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
      (cur_role == HCI_ROLE_CENTRAL)) {
    BTM_block_role_switch_and_sniff_mode_for(p_scb->PeerAddress());
  } else {
    BTM_block_sniff_mode_for(p_scb->PeerAddress());
    get_btm_client_interface().link_policy.BTM_block_sniff_mode_for(p_scb->PeerAddress());
  }

  uint16_t result = AVDT_StartReq(&p_scb->avdt_handle, 1);
@@ -2315,7 +2315,7 @@ void bta_av_start_ok(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
          (cur_role == HCI_ROLE_CENTRAL)) {
        BTM_block_role_switch_and_sniff_mode_for(p_scb->PeerAddress());
      } else {
        BTM_block_sniff_mode_for(p_scb->PeerAddress());
        get_btm_client_interface().link_policy.BTM_block_sniff_mode_for(p_scb->PeerAddress());
      }
    }

+1 −1
Original line number Diff line number Diff line
@@ -1044,7 +1044,7 @@ bool bta_av_switch_if_needed(tBTA_AV_SCB* p_scb) {
       */
      if (HCI_ROLE_CENTRAL != role) {
        if (bta_av_cb.features & BTA_AV_FEAT_CENTRAL)
          BTM_block_role_switch_for(p_scbi->PeerAddress());
          get_btm_client_interface().link_policy.BTM_block_role_switch_for(p_scbi->PeerAddress());
        if (BTM_CMD_STARTED !=
            BTM_SwitchRole(p_scbi->PeerAddress(), HCI_ROLE_CENTRAL)) {
          /* can not switch role on SCBI
+3 −3
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@
#include "hci/controller_interface.h"
#include "internal_include/bt_trace.h"
#include "main/shim/entry.h"
#include "os/log.h"
#include "osi/include/allocator.h"
#include "osi/include/properties.h"
#include "stack/btm/btm_sec.h"
@@ -49,6 +48,7 @@
#include "stack/include/bt_hdr.h"
#include "stack/include/bt_types.h"
#include "stack/include/bt_uuid16.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/l2c_api.h"  // L2CAP_MIN_OFFSET
#include "stack/include/main_thread.h"
#include "types/bluetooth/uuid.h"
@@ -521,7 +521,7 @@ public:

    if (bluetooth::shim::GetController()->SupportsBle2mPhy()) {
      log::info("{} set preferred 2M PHY", address);
      BTM_BleSetPhy(address, PHY_LE_2M, PHY_LE_2M, 0);
      get_btm_client_interface().ble.BTM_BleSetPhy(address, PHY_LE_2M, PHY_LE_2M, 0);
    }

    // Set data length
@@ -711,7 +711,7 @@ public:
              "phy update successful with unexpected phys, retrying:"
              " bd_addr={} tx_phy=0x{:x} rx_phy=0x{:x}",
              hearingDevice->address, tx_phys, rx_phys);
      BTM_BleSetPhy(hearingDevice->address, PHY_LE_2M, PHY_LE_2M, 0);
      get_btm_client_interface().ble.BTM_BleSetPhy(hearingDevice->address, PHY_LE_2M, PHY_LE_2M, 0);
      hearingDevice->phy_update_retry_remain--;
    } else {
      log::warn(
+3 −2
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
#include "stack/include/bt_hdr.h"
#include "stack/include/bt_types.h"
#include "stack/include/bt_uuid16.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/btm_log_history.h"
#include "stack/include/l2c_api.h"  // L2CA_
#include "stack/include/main_thread.h"
@@ -1395,8 +1396,8 @@ static void read_pref_conn_params_cb(uint16_t conn_id, tGATT_STATUS status, uint
    latency = 0;
  }

  BTM_BleSetPrefConnParams(p_dev_cb->link_spec.addrt.bda, min_interval, max_interval, latency,
                           timeout);
  get_btm_client_interface().ble.BTM_BleSetPrefConnParams(
          p_dev_cb->link_spec.addrt.bda, min_interval, max_interval, latency, timeout);
  if (!L2CA_UpdateBleConnParams(p_dev_cb->link_spec.addrt.bda, min_interval, max_interval, latency,
                                timeout, 0, 0)) {
    log::warn("Unable to update L2CAP ble connection params peer:{}",
+4 −3
Original line number Diff line number Diff line
@@ -2009,7 +2009,7 @@ public:

    if (bluetooth::shim::GetController()->SupportsBle2mPhy()) {
      log::info("{} set preferred PHY to 2M", address);
      BTM_BleSetPhy(address, PHY_LE_2M, PHY_LE_2M, 0);
      get_btm_client_interface().ble.BTM_BleSetPhy(address, PHY_LE_2M, PHY_LE_2M, 0);
    }

    get_btm_client_interface().peer.BTM_RequestPeerSCA(leAudioDevice->address_, transport);
@@ -2149,7 +2149,7 @@ public:
    if (!leAudioDevice->acl_phy_update_done_ &&
        bluetooth::shim::GetController()->SupportsBle2mPhy()) {
      log::info("{} set preferred PHY to 2M", leAudioDevice->address_);
      BTM_BleSetPhy(address, PHY_LE_2M, PHY_LE_2M, 0);
      get_btm_client_interface().ble.BTM_BleSetPhy(address, PHY_LE_2M, PHY_LE_2M, 0);
    }

    changeMtuIfPossible(leAudioDevice);
@@ -5623,7 +5623,8 @@ private:
      }

      log::info("SetAsymmetricBlePhy: {} for {}", asymmetric, tmpDevice->address_);
      BTM_BleSetPhy(tmpDevice->address_, PHY_LE_2M, asymmetric ? PHY_LE_1M : PHY_LE_2M, 0);
      get_btm_client_interface().ble.BTM_BleSetPhy(tmpDevice->address_, PHY_LE_2M,
                                                   asymmetric ? PHY_LE_1M : PHY_LE_2M, 0);
      tmpDevice->acl_asymmetric_ = asymmetric;
    }
  }
Loading