#include "stack/include/btm_api.h"
#include "stack/include/btm_iso_api.h"
#include "stack/include/btu.h"
+#include "stack/include/hci_error_code.h"
#include "stack/include/hcimsgs.h"
#include "stack/include/l2cap_acl_interface.h"
#include "stack/include/sco_hci_link_interface.h"
void gatt_find_in_device_record(const RawAddress& bd_addr,
tBLE_BD_ADDR* address_with_type);
-void l2c_link_hci_conn_comp(uint8_t status, uint16_t handle,
+void l2c_link_hci_conn_comp(tHCI_STATUS status, uint16_t handle,
const RawAddress& p_bda);
void BTM_db_reset(void);
#include "stack/include/btu.h"
#include "stack/include/dev_hci_link_interface.h"
#include "stack/include/gatt_api.h"
+#include "stack/include/hci_error_code.h"
#include "stack/include/hci_evt_length.h"
#include "stack/include/hcidefs.h"
#include "stack/include/inq_hci_link_interface.h"
using base::Location;
using bluetooth::hci::IsoManager;
-bool l2c_link_hci_disc_comp(uint16_t handle, uint8_t reason); // TODO remove
+bool l2c_link_hci_disc_comp(uint16_t handle,
+ tHCI_REASON reason); // TODO remove
bool BTM_BLE_IS_RESOLVE_BDA(const RawAddress& x); // TODO remove
void BTA_sys_signal_hw_error(); // TODO remove
void smp_cancel_start_encryption_attempt(); // TODO remove
#pragma once
#include "bt_common.h"
+#include "stack/include/hci_error_code.h"
// This header contains functions for HCI-LinkManagement to invoke
-extern bool l2c_link_hci_disc_comp(uint16_t handle, uint8_t reason);
+extern bool l2c_link_hci_disc_comp(uint16_t handle, tHCI_REASON reason);
extern void l2c_link_role_changed(const RawAddress* bd_addr, uint8_t new_role,
uint8_t hci_status);
// Get a CCB and link the lcb to it
if (!l2cu_initialize_fixed_ccb(p_lcb, fixed_cid)) {
- p_lcb->SetDisconnectReason(L2CAP_CONN_NO_RESOURCES);
LOG_WARN("Unable to allocate fixed channel resource fixed_cid:0x%04x",
fixed_cid);
l2cu_release_lcb(p_lcb);
#include "osi/include/alarm.h"
#include "osi/include/fixed_queue.h"
#include "osi/include/list.h"
+#include "stack/include/hci_error_code.h"
#define L2CAP_MIN_MTU 48 /* Minimum acceptable MTU is 48 bytes */
tL2C_CCB* p_fixed_ccbs[L2CAP_NUM_FIXED_CHNLS];
private:
- uint16_t disc_reason_;
+ tHCI_REASON disc_reason_{HCI_ERR_UNDEFINED};
public:
- uint16_t DisconnectReason() const { return disc_reason_; }
- void SetDisconnectReason(uint16_t disc_reason) { disc_reason_ = disc_reason; }
+ tHCI_REASON DisconnectReason() const { return disc_reason_; }
+ void SetDisconnectReason(tHCI_REASON disc_reason) {
+ disc_reason_ = disc_reason;
+ }
tBT_TRANSPORT transport;
bool is_transport_br_edr() const { return transport == BT_TRANSPORT_BR_EDR; }
#include "stack/btm/btm_int_types.h"
#include "stack/include/acl_api.h"
#include "stack/include/bt_types.h"
+#include "stack/include/hci_error_code.h"
#include "stack/include/hcimsgs.h"
#include "stack/l2cap/l2c_int.h"
#include "types/bt_transport.h"
}
}
-void l2c_link_hci_conn_comp(uint8_t status, uint16_t handle,
+void l2c_link_hci_conn_comp(tHCI_STATUS status, uint16_t handle,
const RawAddress& p_bda) {
if (bluetooth::shim::is_gd_l2cap_enabled()) {
return;
* Returns true if the link is known about, else false
*
******************************************************************************/
-bool l2c_link_hci_disc_comp(uint16_t handle, uint8_t reason) {
+bool l2c_link_hci_disc_comp(uint16_t handle, tHCI_REASON reason) {
if (bluetooth::shim::is_gd_l2cap_enabled()) {
return false;
}
#include "osi/include/log.h"
#include "stack/btm/btm_sec.h"
#include "stack/include/acl_api.h"
+#include "stack/include/hci_error_code.h"
tL2C_CCB* l2cu_get_next_channel_in_rr(tL2C_LCB* p_lcb); // TODO Move
for (xx = 0; xx < MAX_L2CAP_LINKS; xx++, p_lcb++) {
if ((p_lcb->in_use) && (p_lcb->Handle() != HCI_INVALID_HANDLE)) {
- l2c_link_hci_disc_comp(p_lcb->Handle(), (uint8_t)-1);
+ l2c_link_hci_disc_comp(p_lcb->Handle(), HCI_ERR_UNDEFINED);
}
}
}
mock_function_count_map[__func__]++;
return nullptr;
}
-bool l2c_link_hci_disc_comp(uint16_t handle, uint8_t reason) {
+bool l2c_link_hci_disc_comp(uint16_t handle, tHCI_REASON reason) {
mock_function_count_map[__func__]++;
return false;
}
BT_HDR* p_buf) {
mock_function_count_map[__func__]++;
}
-void l2c_link_hci_conn_comp(uint8_t status, uint16_t handle,
+void l2c_link_hci_conn_comp(tHCI_STATUS status, uint16_t handle,
const RawAddress& p_bda) {
mock_function_count_map[__func__]++;
}