Loading system/main/shim/helpers.h +11 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include "hci/address_with_type.h" #include "gd/packet/raw_builder.h" #include "stack/include/bt_types.h" namespace bluetooth { Loading Loading @@ -64,4 +65,14 @@ inline hci::AddressWithType ToAddressWithType(const RawAddress& legacy_address, return hci::AddressWithType{address, type}; } inline std::unique_ptr<bluetooth::packet::RawBuilder> MakeUniquePacket( const uint8_t* data, size_t len) { bluetooth::packet::RawBuilder builder; std::vector<uint8_t> bytes(data, data + len); auto payload = std::make_unique<bluetooth::packet::RawBuilder>(); payload->AddOctets(bytes); return payload; } } // namespace bluetooth system/main/shim/l2c_api.cc +0 −9 Original line number Diff line number Diff line Loading @@ -379,15 +379,6 @@ bool bluetooth::shim::L2CA_ConnectFixedChnl(uint16_t cid, return bluetooth::shim::L2CA_ConnectFixedChnl(cid, rem_bda); } static std::unique_ptr<bluetooth::packet::RawBuilder> MakeUniquePacket( const uint8_t* data, size_t len) { bluetooth::packet::RawBuilder builder; std::vector<uint8_t> bytes(data, data + len); auto payload = std::make_unique<bluetooth::packet::RawBuilder>(); payload->AddOctets(bytes); return payload; } uint16_t bluetooth::shim::L2CA_SendFixedChnlData(uint16_t cid, const RawAddress& rem_bda, BT_HDR* p_buf) { Loading system/stack/include/hci_error_code.h +14 −51 Original line number Diff line number Diff line Loading @@ -17,10 +17,9 @@ #pragma once /* * Defentions for HCI Error Codes that are past in the events * Definitions for HCI Error Codes that are passed in the events */ #define HCI_SUCCESS 0x00 #define HCI_PENDING 0x00 #define HCI_ERR_ILLEGAL_COMMAND 0x01 #define HCI_ERR_NO_CONNECTION 0x02 #define HCI_ERR_HW_FAILURE 0x03 Loading @@ -36,62 +35,26 @@ #define HCI_ERR_HOST_REJECT_RESOURCES 0x0D #define HCI_ERR_HOST_REJECT_SECURITY 0x0E #define HCI_ERR_HOST_REJECT_DEVICE 0x0F #define HCI_ERR_HOST_TIMEOUT 0x10 #define HCI_ERR_UNSUPPORTED_VALUE 0x11 #define HCI_ERR_HOST_TIMEOUT 0x10 // stack/btm/btm_ble_gap #define HCI_ERR_ILLEGAL_PARAMETER_FMT 0x12 #define HCI_ERR_PEER_USER 0x13 #define HCI_ERR_PEER_LOW_RESOURCES 0x14 #define HCI_ERR_PEER_POWER_OFF 0x15 #define HCI_ERR_CONN_CAUSE_LOCAL_HOST 0x16 #define HCI_ERR_REPEATED_ATTEMPTS 0x17 #define HCI_ERR_PAIRING_NOT_ALLOWED 0x18 #define HCI_ERR_UNKNOWN_LMP_PDU 0x19 #define HCI_ERR_UNSUPPORTED_REM_FEATURE 0x1A #define HCI_ERR_SCO_OFFSET_REJECTED 0x1B #define HCI_ERR_SCO_INTERVAL_REJECTED 0x1C #define HCI_ERR_SCO_AIR_MODE 0x1D #define HCI_ERR_INVALID_LMP_PARAM 0x1E #define HCI_ERR_UNSUPPORTED_REM_FEATURE 0x1A // stack/btm/btm_ble_gap #define HCI_ERR_UNSPECIFIED 0x1F #define HCI_ERR_UNSUPPORTED_LMP_FEATURE 0x20 #define HCI_ERR_ROLE_CHANGE_NOT_ALLOWED 0x21 #define HCI_ERR_LMP_RESPONSE_TIMEOUT 0x22 #define HCI_ERR_LMP_ERR_TRANS_COLLISION 0x23 #define HCI_ERR_LMP_PDU_NOT_ALLOWED 0x24 #define HCI_ERR_LMP_RESPONSE_TIMEOUT 0x22 // GATT_CONN_LMP_TIMEOUT #define HCI_ERR_LMP_ERR_TRANS_COLLISION 0x23 // TODO remove #define HCI_ERR_ENCRY_MODE_NOT_ACCEPTABLE 0x25 #define HCI_ERR_UNIT_KEY_USED 0x26 #define HCI_ERR_QOS_NOT_SUPPORTED 0x27 #define HCI_ERR_INSTANT_PASSED 0x28 #define HCI_ERR_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED 0x29 #define HCI_ERR_DIFF_TRANSACTION_COLLISION 0x2A #define HCI_ERR_UNDEFINED_0x2B 0x2B #define HCI_ERR_QOS_UNACCEPTABLE_PARAM 0x2C #define HCI_ERR_QOS_REJECTED 0x2D #define HCI_ERR_CHAN_CLASSIF_NOT_SUPPORTED 0x2E #define HCI_ERR_INSUFFCIENT_SECURITY 0x2F #define HCI_ERR_PARAM_OUT_OF_RANGE 0x30 #define HCI_ERR_UNDEFINED_0x31 0x31 #define HCI_ERR_ROLE_SWITCH_PENDING 0x32 #define HCI_ERR_UNDEFINED_0x33 0x33 #define HCI_ERR_RESERVED_SLOT_VIOLATION 0x34 #define HCI_ERR_ROLE_SWITCH_FAILED 0x35 #define HCI_ERR_INQ_RSP_DATA_TOO_LARGE 0x36 #define HCI_ERR_SIMPLE_PAIRING_NOT_SUPPORTED 0x37 #define HCI_ERR_HOST_BUSY_PAIRING 0x38 #define HCI_ERR_REJ_NO_SUITABLE_CHANNEL 0x39 #define HCI_ERR_CONTROLLER_BUSY 0x3A #define HCI_ERR_UNACCEPT_CONN_INTERVAL 0x3B #define HCI_ERR_ADVERTISING_TIMEOUT 0x3C #define HCI_ERR_CONN_TOUT_DUE_TO_MIC_FAILURE 0x3D #define HCI_ERR_CONN_FAILED_ESTABLISHMENT 0x3E #define HCI_ERR_LIMIT_REACHED 0x43 #define HCI_ERR_MAC_CONNECTION_FAILED 0x3F #define HCI_ERR_DIFF_TRANSACTION_COLLISION 0x2A // stack/btm/btm_sec #define HCI_ERR_INSUFFCIENT_SECURITY 0x2F // btif/btu #define HCI_ERR_ROLE_SWITCH_PENDING 0x32 // stack/btm/btm_sco #define HCI_ERR_HOST_BUSY_PAIRING 0x38 // stack/btm/btm_sec #define HCI_ERR_UNACCEPT_CONN_INTERVAL 0x3B // stack/l2cap/l2c_ble #define HCI_ERR_ADVERTISING_TIMEOUT 0x3C // stack/btm/btm_ble #define HCI_ERR_CONN_FAILED_ESTABLISHMENT 0x3E // GATT_CONN_FAIL_ESTABLISH #define HCI_ERR_LIMIT_REACHED 0x43 // stack/btm/btm_ble_multi_adv.cc /* ConnectionLess Broadcast errors */ #define HCI_ERR_LT_ADDR_ALREADY_IN_USE 0x40 #define HCI_ERR_LT_ADDR_NOT_ALLOCATED 0x41 #define HCI_ERR_CLB_NOT_ENABLED 0x42 #define HCI_ERR_CLB_DATA_TOO_BIG 0x43 #define HCI_ERR_MAX_ERR 0x43 #define HCI_HINT_TO_RECREATE_AMP_PHYS_LINK 0xFF #define HCI_ERR_MAX_ERR 0x43 // TODO remove. randomly used Loading
system/main/shim/helpers.h +11 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include "hci/address_with_type.h" #include "gd/packet/raw_builder.h" #include "stack/include/bt_types.h" namespace bluetooth { Loading Loading @@ -64,4 +65,14 @@ inline hci::AddressWithType ToAddressWithType(const RawAddress& legacy_address, return hci::AddressWithType{address, type}; } inline std::unique_ptr<bluetooth::packet::RawBuilder> MakeUniquePacket( const uint8_t* data, size_t len) { bluetooth::packet::RawBuilder builder; std::vector<uint8_t> bytes(data, data + len); auto payload = std::make_unique<bluetooth::packet::RawBuilder>(); payload->AddOctets(bytes); return payload; } } // namespace bluetooth
system/main/shim/l2c_api.cc +0 −9 Original line number Diff line number Diff line Loading @@ -379,15 +379,6 @@ bool bluetooth::shim::L2CA_ConnectFixedChnl(uint16_t cid, return bluetooth::shim::L2CA_ConnectFixedChnl(cid, rem_bda); } static std::unique_ptr<bluetooth::packet::RawBuilder> MakeUniquePacket( const uint8_t* data, size_t len) { bluetooth::packet::RawBuilder builder; std::vector<uint8_t> bytes(data, data + len); auto payload = std::make_unique<bluetooth::packet::RawBuilder>(); payload->AddOctets(bytes); return payload; } uint16_t bluetooth::shim::L2CA_SendFixedChnlData(uint16_t cid, const RawAddress& rem_bda, BT_HDR* p_buf) { Loading
system/stack/include/hci_error_code.h +14 −51 Original line number Diff line number Diff line Loading @@ -17,10 +17,9 @@ #pragma once /* * Defentions for HCI Error Codes that are past in the events * Definitions for HCI Error Codes that are passed in the events */ #define HCI_SUCCESS 0x00 #define HCI_PENDING 0x00 #define HCI_ERR_ILLEGAL_COMMAND 0x01 #define HCI_ERR_NO_CONNECTION 0x02 #define HCI_ERR_HW_FAILURE 0x03 Loading @@ -36,62 +35,26 @@ #define HCI_ERR_HOST_REJECT_RESOURCES 0x0D #define HCI_ERR_HOST_REJECT_SECURITY 0x0E #define HCI_ERR_HOST_REJECT_DEVICE 0x0F #define HCI_ERR_HOST_TIMEOUT 0x10 #define HCI_ERR_UNSUPPORTED_VALUE 0x11 #define HCI_ERR_HOST_TIMEOUT 0x10 // stack/btm/btm_ble_gap #define HCI_ERR_ILLEGAL_PARAMETER_FMT 0x12 #define HCI_ERR_PEER_USER 0x13 #define HCI_ERR_PEER_LOW_RESOURCES 0x14 #define HCI_ERR_PEER_POWER_OFF 0x15 #define HCI_ERR_CONN_CAUSE_LOCAL_HOST 0x16 #define HCI_ERR_REPEATED_ATTEMPTS 0x17 #define HCI_ERR_PAIRING_NOT_ALLOWED 0x18 #define HCI_ERR_UNKNOWN_LMP_PDU 0x19 #define HCI_ERR_UNSUPPORTED_REM_FEATURE 0x1A #define HCI_ERR_SCO_OFFSET_REJECTED 0x1B #define HCI_ERR_SCO_INTERVAL_REJECTED 0x1C #define HCI_ERR_SCO_AIR_MODE 0x1D #define HCI_ERR_INVALID_LMP_PARAM 0x1E #define HCI_ERR_UNSUPPORTED_REM_FEATURE 0x1A // stack/btm/btm_ble_gap #define HCI_ERR_UNSPECIFIED 0x1F #define HCI_ERR_UNSUPPORTED_LMP_FEATURE 0x20 #define HCI_ERR_ROLE_CHANGE_NOT_ALLOWED 0x21 #define HCI_ERR_LMP_RESPONSE_TIMEOUT 0x22 #define HCI_ERR_LMP_ERR_TRANS_COLLISION 0x23 #define HCI_ERR_LMP_PDU_NOT_ALLOWED 0x24 #define HCI_ERR_LMP_RESPONSE_TIMEOUT 0x22 // GATT_CONN_LMP_TIMEOUT #define HCI_ERR_LMP_ERR_TRANS_COLLISION 0x23 // TODO remove #define HCI_ERR_ENCRY_MODE_NOT_ACCEPTABLE 0x25 #define HCI_ERR_UNIT_KEY_USED 0x26 #define HCI_ERR_QOS_NOT_SUPPORTED 0x27 #define HCI_ERR_INSTANT_PASSED 0x28 #define HCI_ERR_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED 0x29 #define HCI_ERR_DIFF_TRANSACTION_COLLISION 0x2A #define HCI_ERR_UNDEFINED_0x2B 0x2B #define HCI_ERR_QOS_UNACCEPTABLE_PARAM 0x2C #define HCI_ERR_QOS_REJECTED 0x2D #define HCI_ERR_CHAN_CLASSIF_NOT_SUPPORTED 0x2E #define HCI_ERR_INSUFFCIENT_SECURITY 0x2F #define HCI_ERR_PARAM_OUT_OF_RANGE 0x30 #define HCI_ERR_UNDEFINED_0x31 0x31 #define HCI_ERR_ROLE_SWITCH_PENDING 0x32 #define HCI_ERR_UNDEFINED_0x33 0x33 #define HCI_ERR_RESERVED_SLOT_VIOLATION 0x34 #define HCI_ERR_ROLE_SWITCH_FAILED 0x35 #define HCI_ERR_INQ_RSP_DATA_TOO_LARGE 0x36 #define HCI_ERR_SIMPLE_PAIRING_NOT_SUPPORTED 0x37 #define HCI_ERR_HOST_BUSY_PAIRING 0x38 #define HCI_ERR_REJ_NO_SUITABLE_CHANNEL 0x39 #define HCI_ERR_CONTROLLER_BUSY 0x3A #define HCI_ERR_UNACCEPT_CONN_INTERVAL 0x3B #define HCI_ERR_ADVERTISING_TIMEOUT 0x3C #define HCI_ERR_CONN_TOUT_DUE_TO_MIC_FAILURE 0x3D #define HCI_ERR_CONN_FAILED_ESTABLISHMENT 0x3E #define HCI_ERR_LIMIT_REACHED 0x43 #define HCI_ERR_MAC_CONNECTION_FAILED 0x3F #define HCI_ERR_DIFF_TRANSACTION_COLLISION 0x2A // stack/btm/btm_sec #define HCI_ERR_INSUFFCIENT_SECURITY 0x2F // btif/btu #define HCI_ERR_ROLE_SWITCH_PENDING 0x32 // stack/btm/btm_sco #define HCI_ERR_HOST_BUSY_PAIRING 0x38 // stack/btm/btm_sec #define HCI_ERR_UNACCEPT_CONN_INTERVAL 0x3B // stack/l2cap/l2c_ble #define HCI_ERR_ADVERTISING_TIMEOUT 0x3C // stack/btm/btm_ble #define HCI_ERR_CONN_FAILED_ESTABLISHMENT 0x3E // GATT_CONN_FAIL_ESTABLISH #define HCI_ERR_LIMIT_REACHED 0x43 // stack/btm/btm_ble_multi_adv.cc /* ConnectionLess Broadcast errors */ #define HCI_ERR_LT_ADDR_ALREADY_IN_USE 0x40 #define HCI_ERR_LT_ADDR_NOT_ALLOCATED 0x41 #define HCI_ERR_CLB_NOT_ENABLED 0x42 #define HCI_ERR_CLB_DATA_TOO_BIG 0x43 #define HCI_ERR_MAX_ERR 0x43 #define HCI_HINT_TO_RECREATE_AMP_PHYS_LINK 0xFF #define HCI_ERR_MAX_ERR 0x43 // TODO remove. randomly used