L2CAP Allow updating ERTM config and FCS
Bug: 144770885
Test: run_cert.sh
Change-Id: I34e0deb7b30d0c0c65bdc3c8f91fd74ab6ecde06
diff --git a/gd/l2cap/internal/enhanced_retransmission_mode_channel_data_controller.cc b/gd/l2cap/internal/enhanced_retransmission_mode_channel_data_controller.cc
index 3e5042d..08a4bbe 100644
--- a/gd/l2cap/internal/enhanced_retransmission_mode_channel_data_controller.cc
+++ b/gd/l2cap/internal/enhanced_retransmission_mode_channel_data_controller.cc
@@ -875,11 +875,23 @@
}
}
+void ErtmController::EnableFcs(bool enabled) {
+ fcs_enabled_ = enabled;
+}
+
void ErtmController::send_pdu(std::unique_ptr<BasicFrameBuilder> pdu) {
pdu_queue_.emplace(std::move(pdu));
scheduler_->OnPacketsReady(cid_, 1);
}
+void ErtmController::SetRetransmissionAndFlowControlOptions(
+ const RetransmissionAndFlowControlConfigurationOption& option) {
+ local_tx_window_ = option.tx_window_size_;
+ local_max_transmit_ = option.max_transmit_;
+ local_retransmit_timeout_ms_ = option.retransmission_time_out_;
+ local_monitor_timeout_ms_ = option.monitor_time_out_;
+}
+
void ErtmController::close_channel() {
// TODO: Get a reference to signalling manager
}