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

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

Merge changes I672c778a,I8fd857d8,I214e42ab,I4be78209

* changes:
  Remove declarations stack/acl/btm_acl
  Use btif_acl and bta_dm_acl in btm_acl
  Add btif/include/btif_acl.h
  Add bta/include/bta_dm_acl.h
parents 9de4e814 2d921c16
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
/*
 * Copyright 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#pragma once

#include <cstdint>

#include "stack/include/bt_types.h"
#include "types/bt_transport.h"
#include "types/raw_address.h"

void BTA_dm_acl_up(const RawAddress bd_addr, tBT_TRANSPORT transport,
                   uint16_t handle);
void BTA_dm_acl_down(const RawAddress bd_addr, tBT_TRANSPORT transport);
void BTA_dm_report_role_change(const RawAddress bd_addr, uint8_t new_role,
                               uint8_t hci_status);
+21 −0
Original line number Diff line number Diff line
/*
 * Copyright 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#pragma once

#include <cstdint>

void BTIF_dm_report_inquiry_status_change(uint8_t busy_level_flags);
+4 −15
Original line number Diff line number Diff line
@@ -34,7 +34,9 @@
#define LOG_TAG "btm_acl"

#include <cstdint>
#include "bta/include/bta_dm_acl.h"
#include "bta/sys/bta_sys.h"
#include "btif/include/btif_acl.h"
#include "common/metrics.h"
#include "device/include/controller.h"
#include "device/include/interop.h"
@@ -44,6 +46,7 @@
#include "stack/acl/acl.h"
#include "stack/btm/btm_dev.h"
#include "stack/btm/btm_int_types.h"
#include "stack/btm/btm_sec.h"
#include "stack/include/acl_api.h"
#include "stack/include/btm_api.h"
#include "stack/include/btu.h"
@@ -80,13 +83,6 @@ StackAclBtmAcl internal_;

extern tBTM_CB btm_cb;

tBTM_STATUS btm_sec_execute_procedure(tBTM_SEC_DEV_REC* p_dev_rec);
void btm_ble_refresh_local_resolvable_private_addr(
    const RawAddress& pseudo_addr, const RawAddress& local_rpa);
void btm_sec_dev_rec_cback_event(tBTM_SEC_DEV_REC* p_dev_rec, uint8_t res,
                                 bool is_le_trasnport);
void btm_io_capabilities_req(const RawAddress& p);

static void btm_acl_chk_peer_pkt_type_support(tACL_CONN* p,
                                              uint16_t* p_pkt_type);
static void btm_cont_rswitch(tACL_CONN* p, tBTM_SEC_DEV_REC* p_dev_rec);
@@ -100,15 +96,8 @@ static void btm_process_remote_ext_features(tACL_CONN* p_acl_cb,
static void btm_sec_set_peer_sec_caps(tACL_CONN* p_acl_cb,
                                      tBTM_SEC_DEV_REC* p_dev_rec);
static bool acl_is_role_master(const RawAddress& bda, tBT_TRANSPORT transport);

void BTIF_dm_report_inquiry_status_change(uint8_t busy_level_flags);
void BTA_dm_acl_up(const RawAddress bd_addr, tBT_TRANSPORT transport,
                   uint16_t handle);
void BTA_dm_acl_down(const RawAddress bd_addr, tBT_TRANSPORT transport);
void BTA_dm_report_role_change(const RawAddress bd_addr, uint8_t new_role,
                               uint8_t hci_status);

static void btm_set_link_policy(tACL_CONN* conn, uint16_t policy);

/* 3 seconds timeout waiting for responses */
#define BTM_DEV_REPLY_TIMEOUT_MS (3 * 1000)