mirror of https://github.com/PentHertz/srsLTE.git
RLC reestablish to re-enable tx_enabled
This commit is contained in:
parent
1e61dbceff
commit
005fe87ae9
|
@ -163,6 +163,7 @@ public:
|
||||||
srslte::mac_interface_timers *mac_timers_) = 0;
|
srslte::mac_interface_timers *mac_timers_) = 0;
|
||||||
virtual void configure(srslte_rlc_config_t cnfg) = 0;
|
virtual void configure(srslte_rlc_config_t cnfg) = 0;
|
||||||
virtual void stop() = 0;
|
virtual void stop() = 0;
|
||||||
|
virtual void reestablish() = 0;
|
||||||
virtual void empty_queue() = 0;
|
virtual void empty_queue() = 0;
|
||||||
|
|
||||||
virtual rlc_mode_t get_mode() = 0;
|
virtual rlc_mode_t get_mode() = 0;
|
||||||
|
|
|
@ -49,6 +49,7 @@ public:
|
||||||
mac_interface_timers *mac_timers);
|
mac_interface_timers *mac_timers);
|
||||||
void configure(srslte_rlc_config_t cnfg);
|
void configure(srslte_rlc_config_t cnfg);
|
||||||
void stop();
|
void stop();
|
||||||
|
void reestablish();
|
||||||
void empty_queue();
|
void empty_queue();
|
||||||
|
|
||||||
rlc_mode_t get_mode();
|
rlc_mode_t get_mode();
|
||||||
|
|
|
@ -57,6 +57,7 @@ public:
|
||||||
srsue::rrc_interface_rlc *rrc_,
|
srsue::rrc_interface_rlc *rrc_,
|
||||||
mac_interface_timers *mac_timers_);
|
mac_interface_timers *mac_timers_);
|
||||||
void configure(srslte_rlc_config_t cnfg);
|
void configure(srslte_rlc_config_t cnfg);
|
||||||
|
void reestablish();
|
||||||
void stop();
|
void stop();
|
||||||
void empty_queue();
|
void empty_queue();
|
||||||
bool is_mrb();
|
bool is_mrb();
|
||||||
|
|
|
@ -130,11 +130,7 @@ void rlc::reestablish() {
|
||||||
// defaul lcid=0 is created
|
// defaul lcid=0 is created
|
||||||
void rlc::reset()
|
void rlc::reset()
|
||||||
{
|
{
|
||||||
for(uint32_t i=0; i<SRSLTE_N_RADIO_BEARERS; i++) {
|
stop();
|
||||||
if(rlc_array[i].active())
|
|
||||||
rlc_array[i].stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
rlc_array[0].init(RLC_MODE_TM, rlc_log, default_lcid, pdcp, rrc, mac_timers, buffer_size); // SRB0
|
rlc_array[0].init(RLC_MODE_TM, rlc_log, default_lcid, pdcp, rrc, mac_timers, buffer_size); // SRB0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,12 @@ void rlc_am::empty_queue() {
|
||||||
while(tx_sdu_queue.try_read(&buf)) {
|
while(tx_sdu_queue.try_read(&buf)) {
|
||||||
pool->deallocate(buf);
|
pool->deallocate(buf);
|
||||||
}
|
}
|
||||||
|
tx_sdu_queue.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
void rlc_am::reestablish() {
|
||||||
|
stop();
|
||||||
|
tx_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rlc_am::stop()
|
void rlc_am::stop()
|
||||||
|
|
|
@ -87,7 +87,7 @@ void rlc_entity::configure(srslte_rlc_config_t cnfg)
|
||||||
|
|
||||||
// Reestablishment stops the entity but does not destroy it. Mode will not change
|
// Reestablishment stops the entity but does not destroy it. Mode will not change
|
||||||
void rlc_entity::reestablish() {
|
void rlc_entity::reestablish() {
|
||||||
rlc->stop();
|
rlc->reestablish();
|
||||||
}
|
}
|
||||||
|
|
||||||
// A call to stop() stops the entity and clears deletes the instance. Next time this entity can be used for other mode.
|
// A call to stop() stops the entity and clears deletes the instance. Next time this entity can be used for other mode.
|
||||||
|
|
|
@ -68,6 +68,12 @@ void rlc_tm::empty_queue()
|
||||||
while(ul_queue.try_read(&buf)) {
|
while(ul_queue.try_read(&buf)) {
|
||||||
pool->deallocate(buf);
|
pool->deallocate(buf);
|
||||||
}
|
}
|
||||||
|
ul_queue.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
void rlc_tm::reestablish() {
|
||||||
|
stop();
|
||||||
|
tx_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rlc_tm::stop()
|
void rlc_tm::stop()
|
||||||
|
|
|
@ -122,6 +122,7 @@ void rlc_um::empty_queue() {
|
||||||
while(tx_sdu_queue.try_read(&buf)) {
|
while(tx_sdu_queue.try_read(&buf)) {
|
||||||
pool->deallocate(buf);
|
pool->deallocate(buf);
|
||||||
}
|
}
|
||||||
|
tx_sdu_queue.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool rlc_um::is_mrb()
|
bool rlc_um::is_mrb()
|
||||||
|
@ -129,6 +130,11 @@ bool rlc_um::is_mrb()
|
||||||
return cfg.is_mrb;
|
return cfg.is_mrb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void rlc_um::reestablish() {
|
||||||
|
stop();
|
||||||
|
tx_enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
void rlc_um::stop()
|
void rlc_um::stop()
|
||||||
{
|
{
|
||||||
// Empty tx_sdu_queue before locking the mutex
|
// Empty tx_sdu_queue before locking the mutex
|
||||||
|
|
Loading…
Reference in New Issue