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

Commit 572d3309 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "[5/19] get_btm_client_interface().vendor.BTM_VendorSpecificCommand" into main

parents 18e2abb7 144fd956
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@
#include "stack/include/bt_hdr.h"
#include "stack/include/bt_types.h"
#include "stack/include/bt_uuid16.h"
#include "stack/include/btm_api.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/btm_log_history.h"
#include "stack/include/l2c_api.h"
@@ -3134,8 +3133,8 @@ void bta_av_vendor_offload_start(tBTA_AV_SCB* p_scb,
      offload_start->bits_per_sample, offload_start->ch_mode,
      offload_start->encoded_audio_bitrate, offload_start->acl_hdl,
      offload_start->l2c_rcid, offload_start->mtu);
  BTM_VendorSpecificCommand(HCI_CONTROLLER_A2DP, p_param - param, param,
                            offload_vendor_callback);
  get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
      HCI_CONTROLLER_A2DP, p_param - param, param, offload_vendor_callback);
}

void bta_av_vendor_offload_start_v2(tBTA_AV_SCB* p_scb,
@@ -3187,8 +3186,8 @@ void bta_av_vendor_offload_start_v2(tBTA_AV_SCB* p_scb,
  bta_av_cb.offload_start_pending_hndl = p_scb->hndl;
  bta_av_cb.offload_start_v2 = true;

  BTM_VendorSpecificCommand(HCI_CONTROLLER_A2DP, p_param - param,
                            param, offload_vendor_callback);
  get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
      HCI_CONTROLLER_A2DP, p_param - param, param, offload_vendor_callback);
}

void bta_av_vendor_offload_stop() {
@@ -3225,8 +3224,8 @@ void bta_av_vendor_offload_stop() {
    *p_param++ = VS_HCI_A2DP_OFFLOAD_STOP;
  }

  BTM_VendorSpecificCommand(HCI_CONTROLLER_A2DP, p_param - param, param,
                            offload_vendor_callback);
  get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
      HCI_CONTROLLER_A2DP, p_param - param, param, offload_vendor_callback);
}

/*******************************************************************************
+3 −5
Original line number Diff line number Diff line
@@ -52,17 +52,14 @@
#include "device/include/device_iot_config.h"
#include "hci/controller_interface.h"
#include "internal_include/bt_target.h"
#include "internal_include/bt_trace.h"
#include "main/shim/entry.h"
#include "main/shim/helpers.h"
#include "os/log.h"
#include "osi/include/allocator.h"
#include "osi/include/future.h"
#include "osi/include/properties.h"
#include "stack/include/a2dp_api.h"
#include "stack/include/bt_types.h"
#include "stack/include/btm_api.h"
#include "stack/include/btm_ble_api.h"
#include "stack/include/btm_client_interface.h"
#include "storage/config_keys.h"
#include "types/bluetooth/uuid.h"
#include "types/raw_address.h"
@@ -296,7 +293,8 @@ void btif_dut_mode_configure(uint8_t enable) {
void btif_dut_mode_send(uint16_t opcode, uint8_t* buf, uint8_t len) {
  log::verbose("");
  /* For now nothing to be done. */
  BTM_VendorSpecificCommand(opcode, len, buf, [](tBTM_VSC_CMPL*) {});
  get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
      opcode, len, buf, [](tBTM_VSC_CMPL*) {});
}

/*****************************************************************************
+3 −5
Original line number Diff line number Diff line
@@ -19,14 +19,12 @@
#define LOG_TAG "btm_ble_cont_energy"

#include <bluetooth/log.h>
#include <inttypes.h>
#include <string.h>

#include "btm_ble_api.h"
#include "internal_include/bt_target.h"
#include "os/log.h"
#include "stack/btm/btm_int_types.h"
#include "stack/include/bt_types.h"
#include "stack/include/btm_client_interface.h"

using namespace bluetooth;

@@ -100,7 +98,7 @@ tBTM_STATUS BTM_BleGetEnergyInfo(tBTM_BLE_ENERGY_INFO_CBACK* p_ener_cback) {
  }

  ble_energy_info_cb.p_ener_cback = p_ener_cback;
  BTM_VendorSpecificCommand(HCI_BLE_ENERGY_INFO, 0, NULL,
                            btm_ble_cont_energy_cmpl_cback);
  get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
      HCI_BLE_ENERGY_INFO, 0, NULL, btm_ble_cont_energy_cmpl_cback);
  return BTM_CMD_STARTED;
}
+13 −12
Original line number Diff line number Diff line
@@ -33,12 +33,11 @@
#include "hci/controller_interface.h"
#include "main/shim/acl_api.h"
#include "main/shim/entry.h"
#include "os/log.h"
#include "osi/include/allocator.h"
#include "stack/btm/btm_int_types.h"
#include "stack/include/bt_octets.h"
#include "stack/include/bt_types.h"
#include "stack/include/btm_api.h"
#include "stack/include/btm_client_interface.h"
#include "types/raw_address.h"

using namespace bluetooth;
@@ -456,8 +455,8 @@ static tBTM_STATUS btm_ble_remove_resolving_list_entry(
    UINT8_TO_STREAM(p, p_dev_rec->ble.identity_address_with_type.type);
    BDADDR_TO_STREAM(p, p_dev_rec->ble.identity_address_with_type.bda);

    BTM_VendorSpecificCommand(HCI_VENDOR_BLE_RPA_VSC,
                              BTM_BLE_META_REMOVE_IRK_LEN, param,
    get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
        HCI_VENDOR_BLE_RPA_VSC, BTM_BLE_META_REMOVE_IRK_LEN, param,
        btm_ble_resolving_list_vsc_op_cmpl);
    btm_ble_enq_resolving_list_pending(p_dev_rec->bd_addr,
                                       BTM_BLE_META_REMOVE_IRK_ENTRY);
@@ -482,8 +481,8 @@ static void btm_ble_clear_resolving_list(void) {
    uint8_t* p = param;

    UINT8_TO_STREAM(p, BTM_BLE_META_CLEAR_IRK_LIST);
    BTM_VendorSpecificCommand(HCI_VENDOR_BLE_RPA_VSC,
                              BTM_BLE_META_CLEAR_IRK_LEN, param,
    get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
        HCI_VENDOR_BLE_RPA_VSC, BTM_BLE_META_CLEAR_IRK_LEN, param,
        btm_ble_resolving_list_vsc_op_cmpl);
  }
}
@@ -520,8 +519,9 @@ bool btm_ble_read_resolving_list_entry(tBTM_SEC_DEV_REC* p_dev_rec) {
    UINT8_TO_STREAM(p, BTM_BLE_META_READ_IRK_ENTRY);
    UINT8_TO_STREAM(p, p_dev_rec->ble.resolving_list_index);

    BTM_VendorSpecificCommand(HCI_VENDOR_BLE_RPA_VSC, BTM_BLE_META_READ_IRK_LEN,
                              param, btm_ble_resolving_list_vsc_op_cmpl);
    get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
        HCI_VENDOR_BLE_RPA_VSC, BTM_BLE_META_READ_IRK_LEN, param,
        btm_ble_resolving_list_vsc_op_cmpl);

    btm_ble_enq_resolving_list_pending(p_dev_rec->bd_addr,
                                       BTM_BLE_META_READ_IRK_ENTRY);
@@ -540,8 +540,9 @@ static void btm_ble_ble_unsupported_resolving_list_load_dev(
  UINT8_TO_STREAM(p, p_dev_rec->ble.identity_address_with_type.type);
  BDADDR_TO_STREAM(p, p_dev_rec->ble.identity_address_with_type.bda);

  BTM_VendorSpecificCommand(HCI_VENDOR_BLE_RPA_VSC, BTM_BLE_META_ADD_IRK_LEN,
                            param, btm_ble_resolving_list_vsc_op_cmpl);
  get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
      HCI_VENDOR_BLE_RPA_VSC, BTM_BLE_META_ADD_IRK_LEN, param,
      btm_ble_resolving_list_vsc_op_cmpl);

  btm_ble_enq_resolving_list_pending(p_dev_rec->bd_addr,
                                     BTM_BLE_META_ADD_IRK_ENTRY);
+17 −13
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@
#include "stack/include/acl_api.h"
#include "stack/include/bt_hdr.h"
#include "stack/include/bt_types.h"
#include "stack/include/btm_api.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/hci_error_code.h"
#include "stack/include/hcidefs.h"
@@ -2256,8 +2255,9 @@ static void l2cu_set_acl_priority_latency_brcm(tL2C_LCB* p_lcb,
  UINT16_TO_STREAM(pp, p_lcb->Handle());
  UINT8_TO_STREAM(pp, vs_param);

  BTM_VendorSpecificCommand(HCI_BRCM_SET_ACL_PRIORITY,
                            HCI_BRCM_ACL_PRIORITY_PARAM_SIZE, command, NULL);
  get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
      HCI_BRCM_SET_ACL_PRIORITY, HCI_BRCM_ACL_PRIORITY_PARAM_SIZE, command,
      NULL);
}

/*******************************************************************************
@@ -2297,8 +2297,9 @@ static void l2cu_set_acl_priority_latency_syna(tL2C_LCB* p_lcb,
  UINT16_TO_STREAM(pp, p_lcb->Handle());
  UINT8_TO_STREAM(pp, vs_param);

  BTM_VendorSpecificCommand(HCI_SYNA_SET_ACL_PRIORITY,
                            HCI_SYNA_ACL_PRIORITY_PARAM_SIZE, command, NULL);
  get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
      HCI_SYNA_SET_ACL_PRIORITY, HCI_SYNA_ACL_PRIORITY_PARAM_SIZE, command,
      NULL);
}

/*******************************************************************************
@@ -2329,8 +2330,9 @@ static void l2cu_set_acl_priority_unisoc(tL2C_LCB* p_lcb,
  UINT16_TO_STREAM(pp, p_lcb->Handle());
  UINT8_TO_STREAM(pp, vs_param);

  BTM_VendorSpecificCommand(HCI_UNISOC_SET_ACL_PRIORITY,
                            HCI_UNISOC_ACL_PRIORITY_PARAM_SIZE, command, NULL);
  get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
      HCI_UNISOC_SET_ACL_PRIORITY, HCI_UNISOC_ACL_PRIORITY_PARAM_SIZE, command,
      NULL);
}

/*******************************************************************************
@@ -2417,8 +2419,9 @@ static void l2cu_set_acl_latency_brcm(tL2C_LCB* p_lcb, tL2CAP_LATENCY latency) {
  UINT16_TO_STREAM(pp, p_lcb->Handle());
  UINT8_TO_STREAM(pp, vs_param);

  BTM_VendorSpecificCommand(HCI_BRCM_SET_ACL_PRIORITY,
                            HCI_BRCM_ACL_PRIORITY_PARAM_SIZE, command, NULL);
  get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
      HCI_BRCM_SET_ACL_PRIORITY, HCI_BRCM_ACL_PRIORITY_PARAM_SIZE, command,
      NULL);
}

/*******************************************************************************
@@ -2443,8 +2446,9 @@ static void l2cu_set_acl_latency_syna(tL2C_LCB* p_lcb, tL2CAP_LATENCY latency) {
  UINT16_TO_STREAM(pp, p_lcb->Handle());
  UINT8_TO_STREAM(pp, vs_param);

  BTM_VendorSpecificCommand(HCI_SYNA_SET_ACL_PRIORITY,
                            HCI_SYNA_ACL_PRIORITY_PARAM_SIZE, command, NULL);
  get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
      HCI_SYNA_SET_ACL_PRIORITY, HCI_SYNA_ACL_PRIORITY_PARAM_SIZE, command,
      NULL);
}

/*******************************************************************************
@@ -2470,8 +2474,8 @@ static void l2cu_set_acl_latency_mtk(tL2CAP_LATENCY latency) {
  UINT8_TO_STREAM(pp, 0);
  UINT16_TO_STREAM(pp, 0);  //reserved bytes

  BTM_VendorSpecificCommand(HCI_MTK_SET_ACL_PRIORITY,
                            HCI_MTK_ACL_PRIORITY_PARAM_SIZE, command, NULL);
  get_btm_client_interface().vendor.BTM_VendorSpecificCommand(
      HCI_MTK_SET_ACL_PRIORITY, HCI_MTK_ACL_PRIORITY_PARAM_SIZE, command, NULL);
}