Loading system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.cc +10 −6 Original line number Original line Diff line number Diff line Loading @@ -1611,12 +1611,16 @@ void DualModeController::LeReadBufferSizeV2(CommandView command) { } } void DualModeController::LeSetAddressResolutionEnable(CommandView command) { void DualModeController::LeSetAddressResolutionEnable(CommandView command) { // NOP auto command_view = gd_hci::LeSetAddressResolutionEnableView::Create( auto payload = gd_hci::LeSecurityCommandView::Create( std::make_unique<bluetooth::packet::RawBuilder>(std::vector<uint8_t>( gd_hci::SecurityCommandView::Create(command))); {static_cast<uint8_t>(bluetooth::hci::ErrorCode::SUCCESS)})); ASSERT(command_view.IsValid()); send_event_(bluetooth::hci::CommandCompleteBuilder::Create( auto status = link_layer_controller_.LeSetAddressResolutionEnable( kNumCommandPackets, command.GetOpCode(), std::move(payload))); command_view.GetAddressResolutionEnable() == bluetooth::hci::Enable::ENABLED); send_event_( bluetooth::hci::LeSetAddressResolutionEnableCompleteBuilder::Create( kNumCommandPackets, status)); } } void DualModeController::LeSetResovalablePrivateAddressTimeout(CommandView command) { void DualModeController::LeSetResovalablePrivateAddressTimeout(CommandView command) { Loading system/vendor_libs/test_vendor_lib/model/controller/link_layer_controller.cc +9 −0 Original line number Original line Diff line number Diff line Loading @@ -2876,6 +2876,15 @@ ErrorCode LinkLayerController::LeConnectListClear() { return ErrorCode::SUCCESS; return ErrorCode::SUCCESS; } } ErrorCode LinkLayerController::LeSetAddressResolutionEnable(bool enable) { if (ResolvingListBusy()) { return ErrorCode::COMMAND_DISALLOWED; } le_resolving_list_enabled_ = enable; return ErrorCode::SUCCESS; } ErrorCode LinkLayerController::LeResolvingListClear() { ErrorCode LinkLayerController::LeResolvingListClear() { if (ResolvingListBusy()) { if (ResolvingListBusy()) { return ErrorCode::COMMAND_DISALLOWED; return ErrorCode::COMMAND_DISALLOWED; Loading system/vendor_libs/test_vendor_lib/model/controller/link_layer_controller.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -181,6 +181,7 @@ class LinkLayerController { bool LeConnectListContainsDevice(Address addr, uint8_t addr_type); bool LeConnectListContainsDevice(Address addr, uint8_t addr_type); bool LeConnectListFull(); bool LeConnectListFull(); bool ResolvingListBusy(); bool ResolvingListBusy(); ErrorCode LeSetAddressResolutionEnable(bool enable); ErrorCode LeResolvingListClear(); ErrorCode LeResolvingListClear(); ErrorCode LeResolvingListAddDevice(Address addr, uint8_t addr_type, ErrorCode LeResolvingListAddDevice(Address addr, uint8_t addr_type, std::array<uint8_t, kIrkSize> peerIrk, std::array<uint8_t, kIrkSize> peerIrk, Loading Loading @@ -463,6 +464,7 @@ class LinkLayerController { std::array<uint8_t, kIrkSize> local_irk; std::array<uint8_t, kIrkSize> local_irk; }; }; std::vector<ResolvingListEntry> le_resolving_list_; std::vector<ResolvingListEntry> le_resolving_list_; bool le_resolving_list_enabled_{false}; std::array<LeAdvertiser, 7> advertisers_; std::array<LeAdvertiser, 7> advertisers_; Loading Loading
system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.cc +10 −6 Original line number Original line Diff line number Diff line Loading @@ -1611,12 +1611,16 @@ void DualModeController::LeReadBufferSizeV2(CommandView command) { } } void DualModeController::LeSetAddressResolutionEnable(CommandView command) { void DualModeController::LeSetAddressResolutionEnable(CommandView command) { // NOP auto command_view = gd_hci::LeSetAddressResolutionEnableView::Create( auto payload = gd_hci::LeSecurityCommandView::Create( std::make_unique<bluetooth::packet::RawBuilder>(std::vector<uint8_t>( gd_hci::SecurityCommandView::Create(command))); {static_cast<uint8_t>(bluetooth::hci::ErrorCode::SUCCESS)})); ASSERT(command_view.IsValid()); send_event_(bluetooth::hci::CommandCompleteBuilder::Create( auto status = link_layer_controller_.LeSetAddressResolutionEnable( kNumCommandPackets, command.GetOpCode(), std::move(payload))); command_view.GetAddressResolutionEnable() == bluetooth::hci::Enable::ENABLED); send_event_( bluetooth::hci::LeSetAddressResolutionEnableCompleteBuilder::Create( kNumCommandPackets, status)); } } void DualModeController::LeSetResovalablePrivateAddressTimeout(CommandView command) { void DualModeController::LeSetResovalablePrivateAddressTimeout(CommandView command) { Loading
system/vendor_libs/test_vendor_lib/model/controller/link_layer_controller.cc +9 −0 Original line number Original line Diff line number Diff line Loading @@ -2876,6 +2876,15 @@ ErrorCode LinkLayerController::LeConnectListClear() { return ErrorCode::SUCCESS; return ErrorCode::SUCCESS; } } ErrorCode LinkLayerController::LeSetAddressResolutionEnable(bool enable) { if (ResolvingListBusy()) { return ErrorCode::COMMAND_DISALLOWED; } le_resolving_list_enabled_ = enable; return ErrorCode::SUCCESS; } ErrorCode LinkLayerController::LeResolvingListClear() { ErrorCode LinkLayerController::LeResolvingListClear() { if (ResolvingListBusy()) { if (ResolvingListBusy()) { return ErrorCode::COMMAND_DISALLOWED; return ErrorCode::COMMAND_DISALLOWED; Loading
system/vendor_libs/test_vendor_lib/model/controller/link_layer_controller.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -181,6 +181,7 @@ class LinkLayerController { bool LeConnectListContainsDevice(Address addr, uint8_t addr_type); bool LeConnectListContainsDevice(Address addr, uint8_t addr_type); bool LeConnectListFull(); bool LeConnectListFull(); bool ResolvingListBusy(); bool ResolvingListBusy(); ErrorCode LeSetAddressResolutionEnable(bool enable); ErrorCode LeResolvingListClear(); ErrorCode LeResolvingListClear(); ErrorCode LeResolvingListAddDevice(Address addr, uint8_t addr_type, ErrorCode LeResolvingListAddDevice(Address addr, uint8_t addr_type, std::array<uint8_t, kIrkSize> peerIrk, std::array<uint8_t, kIrkSize> peerIrk, Loading Loading @@ -463,6 +464,7 @@ class LinkLayerController { std::array<uint8_t, kIrkSize> local_irk; std::array<uint8_t, kIrkSize> local_irk; }; }; std::vector<ResolvingListEntry> le_resolving_list_; std::vector<ResolvingListEntry> le_resolving_list_; bool le_resolving_list_enabled_{false}; std::array<LeAdvertiser, 7> advertisers_; std::array<LeAdvertiser, 7> advertisers_; Loading