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

Commit 2e1a1d7a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I1f062705,I7429a6ea,Ia9ba7418,Ib41cba8e,I237f2de3 into main

* changes:
  [10/25] btif::dm Use stack::l2cap::get_interface()
  [9/25] bta::le_audio Use stack::l2cap::get_interface()
  [8/25] bta::jv Use stack::l2cap::get_interface()
  [7/25] bta::hh Use stack::l2cap::get_interface()
  [6/25] bta::hf_client Use stack::l2cap::get_interface()
parents e2cf3a88 8a34e4a6
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@

#include "bta/hf_client/bta_hf_client_int.h"
#include "bta/include/bta_dm_api.h"
#include "stack/include/l2c_api.h"
#include "stack/include/l2cap_interface.h"
#include "stack/include/port_api.h"
#include "stack/include/sdp_status.h"
#include "types/bt_transport.h"
@@ -62,7 +62,8 @@ void bta_hf_client_start_close(tBTA_HF_CLIENT_DATA* p_data) {

  /* Take the link out of sniff and set L2C idle time to 0 */
  bta_dm_pm_active(client_cb->peer_addr);
  if (!L2CA_SetIdleTimeoutByBdAddr(client_cb->peer_addr, 0, BT_TRANSPORT_BR_EDR)) {
  if (!stack::l2cap::get_interface().L2CA_SetIdleTimeoutByBdAddr(client_cb->peer_addr, 0,
                                                                 BT_TRANSPORT_BR_EDR)) {
    log::warn("Unable to set L2CAP idle timeout peer:{} transport:{} timeout:{}",
              client_cb->peer_addr, bt_transport_text(BT_TRANSPORT_BR_EDR), 0);
  }
+5 −4
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@
#include "stack/include/btm_client_interface.h"
#include "stack/include/btm_log_history.h"
#include "stack/include/btm_status.h"
#include "stack/include/l2c_api.h"  // L2CA_
#include "stack/include/l2cap_interface.h"
#include "stack/include/main_thread.h"
#include "stack/include/srvc_api.h"  // tDIS_VALUE
#include "types/bluetooth/uuid.h"
@@ -1355,7 +1355,8 @@ static void read_pref_conn_params_cb(uint16_t conn_id, tGATT_STATUS status, uint

  // Make sure both min, and max are bigger than 11.25ms, lower values can
  // introduce audio issues if A2DP is also active.
  L2CA_AdjustConnectionIntervals(&min_interval, &max_interval, BTM_BLE_CONN_INT_MIN_LIMIT);
  stack::l2cap::get_interface().L2CA_AdjustConnectionIntervals(&min_interval, &max_interval,
                                                               BTM_BLE_CONN_INT_MIN_LIMIT);

  // If the device has no preferred connection timeout, use the default.
  if (timeout == BTM_BLE_CONN_PARAM_UNDEF) {
@@ -1387,8 +1388,8 @@ static void read_pref_conn_params_cb(uint16_t conn_id, tGATT_STATUS status, uint

  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)) {
  if (!stack::l2cap::get_interface().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:{}",
              p_dev_cb->link_spec.addrt.bda);
  }
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@
#include "macros.h"
#include "stack/include/bt_hdr.h"
#include "stack/include/hiddefs.h"
#include "stack/include/l2c_api.h"
#include "stack/include/l2cap_types.h"
#include "types/ble_address_with_type.h"
#include "types/bluetooth/uuid.h"

+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#include "internal_include/bt_target.h"
#include "stack/include/bt_hdr.h"
#include "stack/include/l2c_api.h"
#include "stack/include/l2cap_interface.h"
#include "stack/include/rfcdefs.h"
#include "types/bluetooth/uuid.h"
#include "types/raw_address.h"
+3 −4
Original line number Diff line number Diff line
@@ -35,8 +35,6 @@
#include "bta/jv/bta_jv_int.h"
#include "bta/sys/bta_sys.h"
#include "internal_include/bt_target.h"
#include "internal_include/bt_trace.h"
#include "os/logging/log_adapter.h"
#include "osi/include/allocator.h"
#include "osi/include/properties.h"
#include "stack/btm/btm_sec.h"
@@ -48,6 +46,7 @@
#include "stack/include/bt_uuid16.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/gap_api.h"
#include "stack/include/l2cap_interface.h"
#include "stack/include/l2cdefs.h"
#include "stack/include/port_api.h"
#include "stack/include/rfcdefs.h"
@@ -755,7 +754,7 @@ void bta_jv_get_channel_id(tBTA_JV_CONN_TYPE type /* One of BTA_JV_CONN_TYPE_ */
      }
      break;
    case tBTA_JV_CONN_TYPE::L2CAP_LE:
      psm = L2CA_AllocateLePSM();
      psm = stack::l2cap::get_interface().L2CA_AllocateLePSM();
      if (psm == 0) {
        log::error("Error: No free LE PSM available");
      }
@@ -782,7 +781,7 @@ void bta_jv_free_scn(tBTA_JV_CONN_TYPE type /* One of BTA_JV_CONN_TYPE_ */, uint
      break;
    case tBTA_JV_CONN_TYPE::L2CAP_LE:
      log::verbose("type=BTA_JV_CONN_TYPE::L2CAP_LE. psm={}", scn);
      L2CA_FreeLePSM(scn);
      stack::l2cap::get_interface().L2CA_FreeLePSM(scn);
      break;
    default:
      break;
Loading