Loading system/gd/hci/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ filegroup { "device_database.cc", "hci_layer.cc", "le_advertising_manager.cc", "le_scanning_manager.cc", ], } Loading @@ -29,6 +30,7 @@ filegroup { "dual_device_test.cc", "hci_layer_test.cc", "hci_packets_test.cc", "le_scanning_manager_test.cc", ], } Loading system/gd/hci/acl_manager.cc +5 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ namespace bluetooth { namespace hci { constexpr uint16_t kQualcommDebugHandle = 0xedc; using common::Bind; using common::BindOnce; Loading Loading @@ -221,6 +223,9 @@ struct AclManager::impl { return; } uint16_t handle = packet->GetHandle(); if (handle == kQualcommDebugHandle) { return; } auto connection_pair = acl_connections_.find(handle); if (connection_pair == acl_connections_.end()) { LOG_INFO("Dropping packet of size %zu to unknown connection 0x%0hx", packet->size(), handle); Loading system/gd/hci/acl_manager_test.cc +2 −2 Original line number Diff line number Diff line Loading @@ -73,11 +73,11 @@ class TestController : public Controller { acl_cb_handler_ = handler; } uint16_t GetControllerAclPacketLength() override { uint16_t GetControllerAclPacketLength() const override { return acl_buffer_length_; } uint16_t GetControllerNumAclPacketBuffers() override { uint16_t GetControllerNumAclPacketBuffers() const override { return total_acl_buffers_; } Loading system/gd/hci/controller.cc +19 −19 Original line number Diff line number Diff line Loading @@ -696,50 +696,50 @@ void Controller::RegisterCompletedAclPacketsCallback(Callback<void(uint16_t /* h impl_->RegisterCompletedAclPacketsCallback(cb, handler); // TODO hsz: why here? } std::string Controller::GetControllerLocalName() { std::string Controller::GetControllerLocalName() const { return impl_->local_name_; } LocalVersionInformation Controller::GetControllerLocalVersionInformation() { LocalVersionInformation Controller::GetControllerLocalVersionInformation() const { return impl_->local_version_information_; } std::array<uint8_t, 64> Controller::GetControllerLocalSupportedCommands() { std::array<uint8_t, 64> Controller::GetControllerLocalSupportedCommands() const { return impl_->local_supported_commands_; } uint8_t Controller::GetControllerLocalExtendedFeaturesMaxPageNumber() { uint8_t Controller::GetControllerLocalExtendedFeaturesMaxPageNumber() const { return impl_->maximum_page_number_; } uint64_t Controller::GetControllerLocalSupportedFeatures() { uint64_t Controller::GetControllerLocalSupportedFeatures() const { return impl_->local_supported_features_; } uint64_t Controller::GetControllerLocalExtendedFeatures(uint8_t page_number) { uint64_t Controller::GetControllerLocalExtendedFeatures(uint8_t page_number) const { if (page_number <= impl_->maximum_page_number_) { return impl_->extended_lmp_features_array_[page_number]; } return 0x00; } uint16_t Controller::GetControllerAclPacketLength() { uint16_t Controller::GetControllerAclPacketLength() const { return impl_->acl_buffer_length_; } uint16_t Controller::GetControllerNumAclPacketBuffers() { uint16_t Controller::GetControllerNumAclPacketBuffers() const { return impl_->acl_buffers_; } uint8_t Controller::GetControllerScoPacketLength() { uint8_t Controller::GetControllerScoPacketLength() const { return impl_->sco_buffer_length_; } uint16_t Controller::GetControllerNumScoPacketBuffers() { uint16_t Controller::GetControllerNumScoPacketBuffers() const { return impl_->sco_buffers_; } Address Controller::GetControllerMacAddress() { Address Controller::GetControllerMacAddress() const { return impl_->mac_address_; } Loading Loading @@ -813,35 +813,35 @@ void Controller::LeSetEventMask(uint64_t le_event_mask) { GetHandler()->Post(common::BindOnce(&impl::le_set_event_mask, common::Unretained(impl_.get()), le_event_mask)); } LeBufferSize Controller::GetControllerLeBufferSize() { LeBufferSize Controller::GetControllerLeBufferSize() const { return impl_->le_buffer_size_; } uint64_t Controller::GetControllerLeLocalSupportedFeatures() { uint64_t Controller::GetControllerLeLocalSupportedFeatures() const { return impl_->le_local_supported_features_; } uint64_t Controller::GetControllerLeSupportedStates() { uint64_t Controller::GetControllerLeSupportedStates() const { return impl_->le_supported_states_; } LeMaximumDataLength Controller::GetControllerLeMaximumDataLength() { LeMaximumDataLength Controller::GetControllerLeMaximumDataLength() const { return impl_->le_maximum_data_length_; } uint16_t Controller::GetControllerLeMaximumAdvertisingDataLength() { uint16_t Controller::GetControllerLeMaximumAdvertisingDataLength() const { return impl_->le_maximum_advertising_data_length_; } uint16_t Controller::GetControllerLeNumberOfSupportedAdverisingSets() { uint16_t Controller::GetControllerLeNumberOfSupportedAdverisingSets() const { return impl_->le_number_supported_advertising_sets_; } VendorCapabilities Controller::GetControllerVendorCapabilities() { VendorCapabilities Controller::GetControllerVendorCapabilities() const { return impl_->vendor_capabilities_; } bool Controller::IsSupported(bluetooth::hci::OpCode op_code) { bool Controller::IsSupported(bluetooth::hci::OpCode op_code) const { return impl_->is_supported(op_code); } Loading system/gd/hci/controller.h +19 −19 Original line number Diff line number Diff line Loading @@ -34,27 +34,27 @@ class Controller : public Module { virtual void RegisterCompletedAclPacketsCallback( common::Callback<void(uint16_t /* handle */, uint16_t /* num_packets */)> cb, os::Handler* handler); virtual std::string GetControllerLocalName(); virtual std::string GetControllerLocalName() const; virtual LocalVersionInformation GetControllerLocalVersionInformation(); virtual LocalVersionInformation GetControllerLocalVersionInformation() const; virtual std::array<uint8_t, 64> GetControllerLocalSupportedCommands(); virtual std::array<uint8_t, 64> GetControllerLocalSupportedCommands() const; virtual uint64_t GetControllerLocalSupportedFeatures(); virtual uint64_t GetControllerLocalSupportedFeatures() const; virtual uint8_t GetControllerLocalExtendedFeaturesMaxPageNumber(); virtual uint8_t GetControllerLocalExtendedFeaturesMaxPageNumber() const; virtual uint64_t GetControllerLocalExtendedFeatures(uint8_t page_number); virtual uint64_t GetControllerLocalExtendedFeatures(uint8_t page_number) const; virtual uint16_t GetControllerAclPacketLength(); virtual uint16_t GetControllerAclPacketLength() const; virtual uint16_t GetControllerNumAclPacketBuffers(); virtual uint16_t GetControllerNumAclPacketBuffers() const; virtual uint8_t GetControllerScoPacketLength(); virtual uint8_t GetControllerScoPacketLength() const; virtual uint16_t GetControllerNumScoPacketBuffers(); virtual uint16_t GetControllerNumScoPacketBuffers() const; virtual Address GetControllerMacAddress(); virtual Address GetControllerMacAddress() const; virtual void SetEventMask(uint64_t event_mask); Loading Loading @@ -86,21 +86,21 @@ class Controller : public Module { // LE controller commands virtual void LeSetEventMask(uint64_t le_event_mask); LeBufferSize GetControllerLeBufferSize(); virtual LeBufferSize GetControllerLeBufferSize() const; uint64_t GetControllerLeLocalSupportedFeatures(); virtual uint64_t GetControllerLeLocalSupportedFeatures() const; uint64_t GetControllerLeSupportedStates(); virtual uint64_t GetControllerLeSupportedStates() const; LeMaximumDataLength GetControllerLeMaximumDataLength(); virtual LeMaximumDataLength GetControllerLeMaximumDataLength() const; uint16_t GetControllerLeMaximumAdvertisingDataLength(); virtual uint16_t GetControllerLeMaximumAdvertisingDataLength() const; uint16_t GetControllerLeNumberOfSupportedAdverisingSets(); virtual uint16_t GetControllerLeNumberOfSupportedAdverisingSets() const; VendorCapabilities GetControllerVendorCapabilities(); virtual VendorCapabilities GetControllerVendorCapabilities() const; bool IsSupported(OpCode op_code); virtual bool IsSupported(OpCode op_code) const; static const ModuleFactory Factory; Loading Loading
system/gd/hci/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ filegroup { "device_database.cc", "hci_layer.cc", "le_advertising_manager.cc", "le_scanning_manager.cc", ], } Loading @@ -29,6 +30,7 @@ filegroup { "dual_device_test.cc", "hci_layer_test.cc", "hci_packets_test.cc", "le_scanning_manager_test.cc", ], } Loading
system/gd/hci/acl_manager.cc +5 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ namespace bluetooth { namespace hci { constexpr uint16_t kQualcommDebugHandle = 0xedc; using common::Bind; using common::BindOnce; Loading Loading @@ -221,6 +223,9 @@ struct AclManager::impl { return; } uint16_t handle = packet->GetHandle(); if (handle == kQualcommDebugHandle) { return; } auto connection_pair = acl_connections_.find(handle); if (connection_pair == acl_connections_.end()) { LOG_INFO("Dropping packet of size %zu to unknown connection 0x%0hx", packet->size(), handle); Loading
system/gd/hci/acl_manager_test.cc +2 −2 Original line number Diff line number Diff line Loading @@ -73,11 +73,11 @@ class TestController : public Controller { acl_cb_handler_ = handler; } uint16_t GetControllerAclPacketLength() override { uint16_t GetControllerAclPacketLength() const override { return acl_buffer_length_; } uint16_t GetControllerNumAclPacketBuffers() override { uint16_t GetControllerNumAclPacketBuffers() const override { return total_acl_buffers_; } Loading
system/gd/hci/controller.cc +19 −19 Original line number Diff line number Diff line Loading @@ -696,50 +696,50 @@ void Controller::RegisterCompletedAclPacketsCallback(Callback<void(uint16_t /* h impl_->RegisterCompletedAclPacketsCallback(cb, handler); // TODO hsz: why here? } std::string Controller::GetControllerLocalName() { std::string Controller::GetControllerLocalName() const { return impl_->local_name_; } LocalVersionInformation Controller::GetControllerLocalVersionInformation() { LocalVersionInformation Controller::GetControllerLocalVersionInformation() const { return impl_->local_version_information_; } std::array<uint8_t, 64> Controller::GetControllerLocalSupportedCommands() { std::array<uint8_t, 64> Controller::GetControllerLocalSupportedCommands() const { return impl_->local_supported_commands_; } uint8_t Controller::GetControllerLocalExtendedFeaturesMaxPageNumber() { uint8_t Controller::GetControllerLocalExtendedFeaturesMaxPageNumber() const { return impl_->maximum_page_number_; } uint64_t Controller::GetControllerLocalSupportedFeatures() { uint64_t Controller::GetControllerLocalSupportedFeatures() const { return impl_->local_supported_features_; } uint64_t Controller::GetControllerLocalExtendedFeatures(uint8_t page_number) { uint64_t Controller::GetControllerLocalExtendedFeatures(uint8_t page_number) const { if (page_number <= impl_->maximum_page_number_) { return impl_->extended_lmp_features_array_[page_number]; } return 0x00; } uint16_t Controller::GetControllerAclPacketLength() { uint16_t Controller::GetControllerAclPacketLength() const { return impl_->acl_buffer_length_; } uint16_t Controller::GetControllerNumAclPacketBuffers() { uint16_t Controller::GetControllerNumAclPacketBuffers() const { return impl_->acl_buffers_; } uint8_t Controller::GetControllerScoPacketLength() { uint8_t Controller::GetControllerScoPacketLength() const { return impl_->sco_buffer_length_; } uint16_t Controller::GetControllerNumScoPacketBuffers() { uint16_t Controller::GetControllerNumScoPacketBuffers() const { return impl_->sco_buffers_; } Address Controller::GetControllerMacAddress() { Address Controller::GetControllerMacAddress() const { return impl_->mac_address_; } Loading Loading @@ -813,35 +813,35 @@ void Controller::LeSetEventMask(uint64_t le_event_mask) { GetHandler()->Post(common::BindOnce(&impl::le_set_event_mask, common::Unretained(impl_.get()), le_event_mask)); } LeBufferSize Controller::GetControllerLeBufferSize() { LeBufferSize Controller::GetControllerLeBufferSize() const { return impl_->le_buffer_size_; } uint64_t Controller::GetControllerLeLocalSupportedFeatures() { uint64_t Controller::GetControllerLeLocalSupportedFeatures() const { return impl_->le_local_supported_features_; } uint64_t Controller::GetControllerLeSupportedStates() { uint64_t Controller::GetControllerLeSupportedStates() const { return impl_->le_supported_states_; } LeMaximumDataLength Controller::GetControllerLeMaximumDataLength() { LeMaximumDataLength Controller::GetControllerLeMaximumDataLength() const { return impl_->le_maximum_data_length_; } uint16_t Controller::GetControllerLeMaximumAdvertisingDataLength() { uint16_t Controller::GetControllerLeMaximumAdvertisingDataLength() const { return impl_->le_maximum_advertising_data_length_; } uint16_t Controller::GetControllerLeNumberOfSupportedAdverisingSets() { uint16_t Controller::GetControllerLeNumberOfSupportedAdverisingSets() const { return impl_->le_number_supported_advertising_sets_; } VendorCapabilities Controller::GetControllerVendorCapabilities() { VendorCapabilities Controller::GetControllerVendorCapabilities() const { return impl_->vendor_capabilities_; } bool Controller::IsSupported(bluetooth::hci::OpCode op_code) { bool Controller::IsSupported(bluetooth::hci::OpCode op_code) const { return impl_->is_supported(op_code); } Loading
system/gd/hci/controller.h +19 −19 Original line number Diff line number Diff line Loading @@ -34,27 +34,27 @@ class Controller : public Module { virtual void RegisterCompletedAclPacketsCallback( common::Callback<void(uint16_t /* handle */, uint16_t /* num_packets */)> cb, os::Handler* handler); virtual std::string GetControllerLocalName(); virtual std::string GetControllerLocalName() const; virtual LocalVersionInformation GetControllerLocalVersionInformation(); virtual LocalVersionInformation GetControllerLocalVersionInformation() const; virtual std::array<uint8_t, 64> GetControllerLocalSupportedCommands(); virtual std::array<uint8_t, 64> GetControllerLocalSupportedCommands() const; virtual uint64_t GetControllerLocalSupportedFeatures(); virtual uint64_t GetControllerLocalSupportedFeatures() const; virtual uint8_t GetControllerLocalExtendedFeaturesMaxPageNumber(); virtual uint8_t GetControllerLocalExtendedFeaturesMaxPageNumber() const; virtual uint64_t GetControllerLocalExtendedFeatures(uint8_t page_number); virtual uint64_t GetControllerLocalExtendedFeatures(uint8_t page_number) const; virtual uint16_t GetControllerAclPacketLength(); virtual uint16_t GetControllerAclPacketLength() const; virtual uint16_t GetControllerNumAclPacketBuffers(); virtual uint16_t GetControllerNumAclPacketBuffers() const; virtual uint8_t GetControllerScoPacketLength(); virtual uint8_t GetControllerScoPacketLength() const; virtual uint16_t GetControllerNumScoPacketBuffers(); virtual uint16_t GetControllerNumScoPacketBuffers() const; virtual Address GetControllerMacAddress(); virtual Address GetControllerMacAddress() const; virtual void SetEventMask(uint64_t event_mask); Loading Loading @@ -86,21 +86,21 @@ class Controller : public Module { // LE controller commands virtual void LeSetEventMask(uint64_t le_event_mask); LeBufferSize GetControllerLeBufferSize(); virtual LeBufferSize GetControllerLeBufferSize() const; uint64_t GetControllerLeLocalSupportedFeatures(); virtual uint64_t GetControllerLeLocalSupportedFeatures() const; uint64_t GetControllerLeSupportedStates(); virtual uint64_t GetControllerLeSupportedStates() const; LeMaximumDataLength GetControllerLeMaximumDataLength(); virtual LeMaximumDataLength GetControllerLeMaximumDataLength() const; uint16_t GetControllerLeMaximumAdvertisingDataLength(); virtual uint16_t GetControllerLeMaximumAdvertisingDataLength() const; uint16_t GetControllerLeNumberOfSupportedAdverisingSets(); virtual uint16_t GetControllerLeNumberOfSupportedAdverisingSets() const; VendorCapabilities GetControllerVendorCapabilities(); virtual VendorCapabilities GetControllerVendorCapabilities() const; bool IsSupported(OpCode op_code); virtual bool IsSupported(OpCode op_code) const; static const ModuleFactory Factory; Loading