mirror of https://github.com/PentHertz/srsLTE.git
lte,pdcp: silence error message when a reconfiguration of a PDCP entity is no-op
This commit is contained in:
parent
9855450a4a
commit
eb4999a18e
|
@ -156,6 +156,15 @@ public:
|
||||||
|
|
||||||
// TODO: Support the following configurations
|
// TODO: Support the following configurations
|
||||||
// bool do_rohc;
|
// bool do_rohc;
|
||||||
|
|
||||||
|
bool operator==(const pdcp_config_t& other) const
|
||||||
|
{
|
||||||
|
return bearer_id == other.bearer_id and rb_type == other.rb_type and tx_direction == other.tx_direction and
|
||||||
|
rx_direction == other.rx_direction and sn_len == other.sn_len and hdr_len_bytes == other.hdr_len_bytes and
|
||||||
|
t_reordering == other.t_reordering and discard_timer == other.discard_timer and rat == other.rat and
|
||||||
|
status_report_required == other.status_report_required;
|
||||||
|
}
|
||||||
|
bool operator!=(const pdcp_config_t& other) const { return not(*this == other); }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Specifies in which direction security (integrity and ciphering) are enabled for PDCP
|
// Specifies in which direction security (integrity and ciphering) are enabled for PDCP
|
||||||
|
|
|
@ -93,8 +93,7 @@ void pdcp::write_sdu_mch(uint32_t lcid, unique_byte_buffer_t sdu)
|
||||||
int pdcp::add_bearer(uint32_t lcid, pdcp_config_t cfg)
|
int pdcp::add_bearer(uint32_t lcid, pdcp_config_t cfg)
|
||||||
{
|
{
|
||||||
if (valid_lcid(lcid)) {
|
if (valid_lcid(lcid)) {
|
||||||
logger.error("Bearer %s already configured.", rrc->get_rb_name(lcid));
|
return pdcp_array[lcid]->configure(cfg) ? SRSRAN_SUCCESS : SRSRAN_ERROR;
|
||||||
return SRSRAN_ERROR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<pdcp_entity_base> entity;
|
std::unique_ptr<pdcp_entity_base> entity;
|
||||||
|
|
|
@ -51,6 +51,15 @@ pdcp_entity_lte::~pdcp_entity_lte()
|
||||||
|
|
||||||
bool pdcp_entity_lte::configure(const pdcp_config_t& cnfg_)
|
bool pdcp_entity_lte::configure(const pdcp_config_t& cnfg_)
|
||||||
{
|
{
|
||||||
|
if (active) {
|
||||||
|
// Already configured
|
||||||
|
if (cnfg_ != cfg) {
|
||||||
|
logger.error("Bearer reconfiguration not supported. LCID=%d.", rrc->get_rb_name(lcid));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cfg = cnfg_;
|
cfg = cnfg_;
|
||||||
maximum_pdcp_sn = (1u << cfg.sn_len) - 1u;
|
maximum_pdcp_sn = (1u << cfg.sn_len) - 1u;
|
||||||
st.last_submitted_pdcp_rx_sn = maximum_pdcp_sn;
|
st.last_submitted_pdcp_rx_sn = maximum_pdcp_sn;
|
||||||
|
|
|
@ -43,6 +43,15 @@ void pdcp_entity_nr::reestablish()
|
||||||
|
|
||||||
bool pdcp_entity_nr::configure(const pdcp_config_t& cnfg_)
|
bool pdcp_entity_nr::configure(const pdcp_config_t& cnfg_)
|
||||||
{
|
{
|
||||||
|
if (active) {
|
||||||
|
// Already configured
|
||||||
|
if (cnfg_ != cfg) {
|
||||||
|
logger.error("Bearer reconfiguration not supported. LCID=%d.", rrc->get_rb_name(lcid));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cfg = cnfg_;
|
cfg = cnfg_;
|
||||||
window_size = 1 << (cfg.sn_len - 1);
|
window_size = 1 << (cfg.sn_len - 1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue