Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions model/controller/acl_connection_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ uint16_t AclConnectionHandler::CreateLeConnection(AddressWithType addr,
AddressWithType resolved_peer,
AddressWithType own_addr,
bluetooth::hci::Role role,
LeAclConnectionParameters connection_parameters) {
LeAclConnectionParameters connection_parameters,
LeAclSubrateParameters subrate_parameters) {
uint16_t handle = GetUnusedHandle(le_acl_connections_, ConnectionHandle::kLeAclRangeStart,
ConnectionHandle::kLeAclRangeEnd, last_le_acl_handle_);
le_acl_connections_.emplace(handle, LeAclConnection{handle, addr, own_addr, resolved_peer, role,
connection_parameters});
connection_parameters, subrate_parameters});
return handle;
}

Expand Down
3 changes: 2 additions & 1 deletion model/controller/acl_connection_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class AclConnectionHandler {
uint16_t CreateLeConnection(bluetooth::hci::AddressWithType addr,
bluetooth::hci::AddressWithType resolved_addr,
bluetooth::hci::AddressWithType own_addr, bluetooth::hci::Role role,
LeAclConnectionParameters connection_parameters);
LeAclConnectionParameters connection_parameters,
LeAclSubrateParameters subrate_parameters);

bool Disconnect(uint16_t handle, std::function<void(TaskId)> stopStream);

Expand Down
3,214 changes: 1,801 additions & 1,413 deletions model/controller/bredr_controller.cc

Large diffs are not rendered by default.

223 changes: 118 additions & 105 deletions model/controller/bredr_controller.h

Large diffs are not rendered by default.

24 changes: 19 additions & 5 deletions model/controller/controller_properties.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ static constexpr uint64_t LlFeatures() {

LLFeaturesBits::CONNECTED_ISOCHRONOUS_STREAM_CENTRAL,
LLFeaturesBits::CONNECTED_ISOCHRONOUS_STREAM_PERIPHERAL,
LLFeaturesBits::CONNECTION_SUBRATING,
};

uint64_t value = 0;
Expand Down Expand Up @@ -441,8 +442,8 @@ static std::array<uint8_t, 64> SupportedCommands() {
// OpCodeIndex::LE_SET_TRANSMIT_POWER_REPORTING_ENABLE,
// OpCodeIndex::LE_TRANSMITTER_TEST_V4,
// OpCodeIndex::LE_SET_DATA_RELATED_ADDRESS_CHANGES,
// OpCodeIndex::LE_SET_DEFAULT_SUBRATE,
// OpCodeIndex::LE_SUBRATE_REQUEST,
OpCodeIndex::LE_SET_DEFAULT_SUBRATE,
OpCodeIndex::LE_SUBRATE_REQUEST,
};

std::array<uint8_t, 64> value{};
Expand Down Expand Up @@ -1717,16 +1718,23 @@ static std::vector<OpCodeIndex> ll_privacy_commands_ = {
OpCodeIndex::LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT,
};

// Commands enabled by the LL Connected Isochronous Stream feature bit.
// Commands enabled by the Connected Isochronous Stream feature bit.
// Central and Peripheral support bits are enabled together.
static std::vector<OpCodeIndex> ll_connected_isochronous_stream_commands_ = {
static std::vector<OpCodeIndex> connected_isochronous_stream_commands_ = {
OpCodeIndex::LE_SET_CIG_PARAMETERS, OpCodeIndex::LE_SET_CIG_PARAMETERS_TEST,
OpCodeIndex::LE_CREATE_CIS, OpCodeIndex::LE_REMOVE_CIG,
OpCodeIndex::LE_ACCEPT_CIS_REQUEST, OpCodeIndex::LE_REJECT_CIS_REQUEST,
OpCodeIndex::LE_SETUP_ISO_DATA_PATH, OpCodeIndex::LE_REMOVE_ISO_DATA_PATH,
OpCodeIndex::LE_REQUEST_PEER_SCA,
};

// Commands enabled by the Connection Subrating feature bit.
// Central and Peripheral support bits are enabled together.
static std::vector<OpCodeIndex> connection_subrating_commands_ = {
OpCodeIndex::LE_SET_DEFAULT_SUBRATE,
OpCodeIndex::LE_SUBRATE_REQUEST,
};

static void SetLLFeatureBit(uint64_t& le_features, LLFeaturesBits bit, bool set) {
if (set) {
le_features |= static_cast<uint64_t>(bit);
Expand Down Expand Up @@ -1889,9 +1897,15 @@ ControllerProperties::ControllerProperties(rootcanal::configuration::Controller
features.le_connected_isochronous_stream());
SetLLFeatureBit(le_features, LLFeaturesBits::CONNECTED_ISOCHRONOUS_STREAM_PERIPHERAL,
features.le_connected_isochronous_stream());
SetSupportedCommandBits(supported_commands, ll_connected_isochronous_stream_commands_,
SetSupportedCommandBits(supported_commands, connected_isochronous_stream_commands_,
features.le_connected_isochronous_stream());
}
if (features.has_le_connection_subrating()) {
SetLLFeatureBit(le_features, LLFeaturesBits::CONNECTION_SUBRATING,
features.le_connected_isochronous_stream());
SetSupportedCommandBits(supported_commands, connection_subrating_commands_,
features.le_connection_subrating());
}
}

// Apply selected quirks.
Expand Down
Loading
Loading