Loading tools/rootcanal/model/controller/controller_properties.cc +8 −0 Original line number Diff line number Diff line Loading @@ -1876,6 +1876,7 @@ ControllerProperties::ControllerProperties( case ControllerPreset::CSR_RCK_PTS_DONGLE: // Configuration extracted with the helper script controller_info.py vendor_csr = true; br_supported = true; le_supported = true; hci_version = bluetooth::hci::HciVersion::V_4_2; Loading Loading @@ -1966,6 +1967,13 @@ ControllerProperties::ControllerProperties( // TODO(b/270606199): support send_acl_data_before_connection_complete } // Apply selected vendor features. if (config.has_vendor()) { if (config.vendor().has_csr()) { vendor_csr = config.vendor().csr(); } } if (!CheckSupportedFeatures()) { INFO( "Warning: LMP and/or LE features are not consistent. Please make sure" Loading tools/rootcanal/model/controller/controller_properties.h +3 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,9 @@ struct ControllerProperties { // Provide parameters returned by vendor specific commands. std::vector<uint8_t> le_vendor_capabilities{}; // Enable the support for the CSR vendor command. bool vendor_csr{true}; bool SupportsLMPFeature(bluetooth::hci::LMPFeaturesPage0Bits bit) const { return (lmp_features[0] & static_cast<uint64_t>(bit)) != 0; } Loading tools/rootcanal/model/controller/dual_mode_controller.cc +7 −0 Original line number Diff line number Diff line Loading @@ -2819,6 +2819,13 @@ void DualModeController::LeEnergyInfo(CommandView command) { // Implement the command specific to the CSR controller // used specifically by the PTS tool to pass certification tests. void DualModeController::CsrVendorCommand(CommandView command) { if (!properties_.vendor_csr) { SendCommandCompleteUnknownOpCodeEvent(OpCode(CSR_VENDOR)); return; } DEBUG(id_, "<< CSR"); // The byte order is little endian. // The command parameters are formatted as // Loading tools/rootcanal/proto/rootcanal/configuration.proto +7 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,11 @@ message ControllerQuirks { optional bool hardware_error_before_reset = 3; } message VendorFeatures { // Enable the support for the CSR vendor command. optional bool csr = 1; } message Controller { // Configure the controller preset. Presets come with a pre-selection // of features and quirks, but these can be overridden with the next fields. Loading @@ -61,6 +66,8 @@ message Controller { // Activate assertion checks in RootCanal for missing RootCanal features // or Host stack misbehavior. optional bool strict = 4; // Configure support for vendor features. optional VendorFeatures vendor = 5; } message TcpServer { Loading Loading
tools/rootcanal/model/controller/controller_properties.cc +8 −0 Original line number Diff line number Diff line Loading @@ -1876,6 +1876,7 @@ ControllerProperties::ControllerProperties( case ControllerPreset::CSR_RCK_PTS_DONGLE: // Configuration extracted with the helper script controller_info.py vendor_csr = true; br_supported = true; le_supported = true; hci_version = bluetooth::hci::HciVersion::V_4_2; Loading Loading @@ -1966,6 +1967,13 @@ ControllerProperties::ControllerProperties( // TODO(b/270606199): support send_acl_data_before_connection_complete } // Apply selected vendor features. if (config.has_vendor()) { if (config.vendor().has_csr()) { vendor_csr = config.vendor().csr(); } } if (!CheckSupportedFeatures()) { INFO( "Warning: LMP and/or LE features are not consistent. Please make sure" Loading
tools/rootcanal/model/controller/controller_properties.h +3 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,9 @@ struct ControllerProperties { // Provide parameters returned by vendor specific commands. std::vector<uint8_t> le_vendor_capabilities{}; // Enable the support for the CSR vendor command. bool vendor_csr{true}; bool SupportsLMPFeature(bluetooth::hci::LMPFeaturesPage0Bits bit) const { return (lmp_features[0] & static_cast<uint64_t>(bit)) != 0; } Loading
tools/rootcanal/model/controller/dual_mode_controller.cc +7 −0 Original line number Diff line number Diff line Loading @@ -2819,6 +2819,13 @@ void DualModeController::LeEnergyInfo(CommandView command) { // Implement the command specific to the CSR controller // used specifically by the PTS tool to pass certification tests. void DualModeController::CsrVendorCommand(CommandView command) { if (!properties_.vendor_csr) { SendCommandCompleteUnknownOpCodeEvent(OpCode(CSR_VENDOR)); return; } DEBUG(id_, "<< CSR"); // The byte order is little endian. // The command parameters are formatted as // Loading
tools/rootcanal/proto/rootcanal/configuration.proto +7 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,11 @@ message ControllerQuirks { optional bool hardware_error_before_reset = 3; } message VendorFeatures { // Enable the support for the CSR vendor command. optional bool csr = 1; } message Controller { // Configure the controller preset. Presets come with a pre-selection // of features and quirks, but these can be overridden with the next fields. Loading @@ -61,6 +66,8 @@ message Controller { // Activate assertion checks in RootCanal for missing RootCanal features // or Host stack misbehavior. optional bool strict = 4; // Configure support for vendor features. optional VendorFeatures vendor = 5; } message TcpServer { Loading