Loading system/gd/hci/acl_manager/classic_impl.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -619,7 +619,7 @@ struct classic_impl : public security::ISecurityManagerListener { } } uint16_t handle = flush_complete.GetConnectionHandle(); uint16_t handle = flush_complete.GetConnectionHandle(); connections.execute( connections.execute( handle, [=](ConnectionManagementCallbacks* callbacks) { callbacks->OnFlushOccurred(); }); handle, [](ConnectionManagementCallbacks* callbacks) { callbacks->OnFlushOccurred(); }); } } void on_read_remote_version_information( void on_read_remote_version_information( Loading system/main/shim/acl.cc +17 −0 Original line number Original line Diff line number Diff line Loading @@ -716,6 +716,8 @@ class ClassicShimAclConnection return connection_->locally_initiated_; return connection_->locally_initiated_; } } void Flush() { connection_->Flush(); } private: private: OnDisconnect on_disconnect_; OnDisconnect on_disconnect_; const shim::legacy::acl_classic_link_interface_t interface_; const shim::legacy::acl_classic_link_interface_t interface_; Loading Loading @@ -884,6 +886,14 @@ struct shim::legacy::Acl::impl { handle_to_classic_connection_map_[handle]->EnqueuePacket(std::move(packet)); handle_to_classic_connection_map_[handle]->EnqueuePacket(std::move(packet)); } } void Flush(HciHandle handle) { if (IsClassicAcl(handle)) { handle_to_classic_connection_map_[handle]->Flush(); } else { LOG_ERROR("handle %d is not a classic connection", handle); } } bool IsLeAcl(HciHandle handle) { bool IsLeAcl(HciHandle handle) { return handle_to_le_connection_map_.find(handle) != return handle_to_le_connection_map_.find(handle) != handle_to_le_connection_map_.end(); handle_to_le_connection_map_.end(); Loading Loading @@ -1431,6 +1441,13 @@ void shim::legacy::Acl::WriteData(HciHandle handle, std::move(packet))); std::move(packet))); } } void shim::legacy::Acl::flush(HciHandle handle) { pimpl_->Flush(handle); } void shim::legacy::Acl::Flush(HciHandle handle) { handler_->Post( common::BindOnce(&Acl::flush, common::Unretained(this), handle)); } void shim::legacy::Acl::CreateClassicConnection(const hci::Address& address) { void shim::legacy::Acl::CreateClassicConnection(const hci::Address& address) { GetAclManager()->CreateConnection(address); GetAclManager()->CreateConnection(address); LOG_DEBUG("Connection initiated for classic to remote:%s", LOG_DEBUG("Connection initiated for classic to remote:%s", Loading system/main/shim/acl.h +3 −0 Original line number Original line Diff line number Diff line Loading @@ -111,6 +111,8 @@ class Acl : public hci::acl_manager::ConnectionCallbacks, void WriteData(uint16_t hci_handle, void WriteData(uint16_t hci_handle, std::unique_ptr<packet::RawBuilder> packet); std::unique_ptr<packet::RawBuilder> packet); void Flush(uint16_t hci_handle); void Dump(int fd) const; void Dump(int fd) const; void DumpConnectionHistory(int fd) const; void DumpConnectionHistory(int fd) const; Loading @@ -125,6 +127,7 @@ class Acl : public hci::acl_manager::ConnectionCallbacks, void on_incoming_acl_credits(uint16_t handle, uint16_t credits); void on_incoming_acl_credits(uint16_t handle, uint16_t credits); void write_data_sync(uint16_t hci_handle, void write_data_sync(uint16_t hci_handle, std::unique_ptr<packet::RawBuilder> packet); std::unique_ptr<packet::RawBuilder> packet); void flush(uint16_t hci_handle); private: private: os::Handler* handler_; os::Handler* handler_; Loading system/main/shim/acl_api.cc +4 −0 Original line number Original line Diff line number Diff line Loading @@ -72,6 +72,10 @@ void bluetooth::shim::ACL_WriteData(uint16_t handle, BT_HDR* p_buf) { osi_free(p_buf); osi_free(p_buf); } } void bluetooth::shim::ACL_Flush(uint16_t handle) { Stack::GetInstance()->GetAcl()->Flush(handle); } void bluetooth::shim::ACL_ConfigureLePrivacy(bool is_le_privacy_enabled) { void bluetooth::shim::ACL_ConfigureLePrivacy(bool is_le_privacy_enabled) { hci::LeAddressManager::AddressPolicy address_policy = hci::LeAddressManager::AddressPolicy address_policy = is_le_privacy_enabled is_le_privacy_enabled Loading system/main/shim/acl_api.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -36,6 +36,7 @@ void ACL_IgnoreLeConnectionFrom(const tBLE_BD_ADDR& legacy_address_with_type); void ACL_Disconnect(uint16_t handle, bool is_classic, tHCI_STATUS reason, void ACL_Disconnect(uint16_t handle, bool is_classic, tHCI_STATUS reason, std::string comment); std::string comment); void ACL_WriteData(uint16_t handle, BT_HDR* p_buf); void ACL_WriteData(uint16_t handle, BT_HDR* p_buf); void ACL_Flush(uint16_t handle); void ACL_ConfigureLePrivacy(bool is_le_privacy_enabled); void ACL_ConfigureLePrivacy(bool is_le_privacy_enabled); void ACL_Shutdown(); void ACL_Shutdown(); void ACL_IgnoreAllLeConnections(); void ACL_IgnoreAllLeConnections(); Loading Loading
system/gd/hci/acl_manager/classic_impl.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -619,7 +619,7 @@ struct classic_impl : public security::ISecurityManagerListener { } } uint16_t handle = flush_complete.GetConnectionHandle(); uint16_t handle = flush_complete.GetConnectionHandle(); connections.execute( connections.execute( handle, [=](ConnectionManagementCallbacks* callbacks) { callbacks->OnFlushOccurred(); }); handle, [](ConnectionManagementCallbacks* callbacks) { callbacks->OnFlushOccurred(); }); } } void on_read_remote_version_information( void on_read_remote_version_information( Loading
system/main/shim/acl.cc +17 −0 Original line number Original line Diff line number Diff line Loading @@ -716,6 +716,8 @@ class ClassicShimAclConnection return connection_->locally_initiated_; return connection_->locally_initiated_; } } void Flush() { connection_->Flush(); } private: private: OnDisconnect on_disconnect_; OnDisconnect on_disconnect_; const shim::legacy::acl_classic_link_interface_t interface_; const shim::legacy::acl_classic_link_interface_t interface_; Loading Loading @@ -884,6 +886,14 @@ struct shim::legacy::Acl::impl { handle_to_classic_connection_map_[handle]->EnqueuePacket(std::move(packet)); handle_to_classic_connection_map_[handle]->EnqueuePacket(std::move(packet)); } } void Flush(HciHandle handle) { if (IsClassicAcl(handle)) { handle_to_classic_connection_map_[handle]->Flush(); } else { LOG_ERROR("handle %d is not a classic connection", handle); } } bool IsLeAcl(HciHandle handle) { bool IsLeAcl(HciHandle handle) { return handle_to_le_connection_map_.find(handle) != return handle_to_le_connection_map_.find(handle) != handle_to_le_connection_map_.end(); handle_to_le_connection_map_.end(); Loading Loading @@ -1431,6 +1441,13 @@ void shim::legacy::Acl::WriteData(HciHandle handle, std::move(packet))); std::move(packet))); } } void shim::legacy::Acl::flush(HciHandle handle) { pimpl_->Flush(handle); } void shim::legacy::Acl::Flush(HciHandle handle) { handler_->Post( common::BindOnce(&Acl::flush, common::Unretained(this), handle)); } void shim::legacy::Acl::CreateClassicConnection(const hci::Address& address) { void shim::legacy::Acl::CreateClassicConnection(const hci::Address& address) { GetAclManager()->CreateConnection(address); GetAclManager()->CreateConnection(address); LOG_DEBUG("Connection initiated for classic to remote:%s", LOG_DEBUG("Connection initiated for classic to remote:%s", Loading
system/main/shim/acl.h +3 −0 Original line number Original line Diff line number Diff line Loading @@ -111,6 +111,8 @@ class Acl : public hci::acl_manager::ConnectionCallbacks, void WriteData(uint16_t hci_handle, void WriteData(uint16_t hci_handle, std::unique_ptr<packet::RawBuilder> packet); std::unique_ptr<packet::RawBuilder> packet); void Flush(uint16_t hci_handle); void Dump(int fd) const; void Dump(int fd) const; void DumpConnectionHistory(int fd) const; void DumpConnectionHistory(int fd) const; Loading @@ -125,6 +127,7 @@ class Acl : public hci::acl_manager::ConnectionCallbacks, void on_incoming_acl_credits(uint16_t handle, uint16_t credits); void on_incoming_acl_credits(uint16_t handle, uint16_t credits); void write_data_sync(uint16_t hci_handle, void write_data_sync(uint16_t hci_handle, std::unique_ptr<packet::RawBuilder> packet); std::unique_ptr<packet::RawBuilder> packet); void flush(uint16_t hci_handle); private: private: os::Handler* handler_; os::Handler* handler_; Loading
system/main/shim/acl_api.cc +4 −0 Original line number Original line Diff line number Diff line Loading @@ -72,6 +72,10 @@ void bluetooth::shim::ACL_WriteData(uint16_t handle, BT_HDR* p_buf) { osi_free(p_buf); osi_free(p_buf); } } void bluetooth::shim::ACL_Flush(uint16_t handle) { Stack::GetInstance()->GetAcl()->Flush(handle); } void bluetooth::shim::ACL_ConfigureLePrivacy(bool is_le_privacy_enabled) { void bluetooth::shim::ACL_ConfigureLePrivacy(bool is_le_privacy_enabled) { hci::LeAddressManager::AddressPolicy address_policy = hci::LeAddressManager::AddressPolicy address_policy = is_le_privacy_enabled is_le_privacy_enabled Loading
system/main/shim/acl_api.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -36,6 +36,7 @@ void ACL_IgnoreLeConnectionFrom(const tBLE_BD_ADDR& legacy_address_with_type); void ACL_Disconnect(uint16_t handle, bool is_classic, tHCI_STATUS reason, void ACL_Disconnect(uint16_t handle, bool is_classic, tHCI_STATUS reason, std::string comment); std::string comment); void ACL_WriteData(uint16_t handle, BT_HDR* p_buf); void ACL_WriteData(uint16_t handle, BT_HDR* p_buf); void ACL_Flush(uint16_t handle); void ACL_ConfigureLePrivacy(bool is_le_privacy_enabled); void ACL_ConfigureLePrivacy(bool is_le_privacy_enabled); void ACL_Shutdown(); void ACL_Shutdown(); void ACL_IgnoreAllLeConnections(); void ACL_IgnoreAllLeConnections(); Loading