nr,ue,rrc: release NR logical channels during RRC release

master
Francisco 3 years ago committed by Francisco Paisana
parent e93503bae3
commit 81174bda64

@ -146,6 +146,7 @@ public:
class mac_interface_rrc_nr
{
public:
virtual void reset() = 0;
// Config calls that return SRSRAN_SUCCESS or SRSRAN_ERROR
virtual int setup_lcid(const srsran::logical_channel_config_t& config) = 0;
virtual int set_config(const srsran::bsr_cfg_nr_t& bsr_cfg) = 0;

@ -110,6 +110,7 @@ public:
uint32_t sk_counter_r15,
bool nr_radio_bearer_cfg1_r15_present,
asn1::dyn_octstring nr_radio_bearer_cfg1_r15) = 0;
virtual void rrc_release() = 0;
virtual bool is_config_pending() = 0;
};

@ -48,7 +48,6 @@ public:
int init(const mac_nr_args_t& args_, phy_interface_mac_nr* phy_, rlc_interface_mac* rlc_, rrc_interface_mac* rrc_);
void stop();
void reset();
void run_tti(const uint32_t tti);
void start_pcap(srsran::mac_pcap* pcap_);
@ -75,6 +74,7 @@ public:
void get_metrics(mac_metrics_t* metrics);
/// Interface for RRC (RRC -> MAC)
void reset();
int setup_lcid(const srsran::logical_channel_config_t& config);
int set_config(const srsran::bsr_cfg_nr_t& bsr_cfg);
int set_config(const srsran::sr_cfg_nr_t& sr_cfg);

@ -113,6 +113,7 @@ public:
uint32_t sk_counter_r15,
bool nr_radio_bearer_cfg1_r15_present,
asn1::dyn_octstring nr_radio_bearer_cfg1_r15);
void rrc_release();
bool configure_sk_counter(uint16_t sk_counter);
bool is_config_pending();
// STACK interface

@ -97,6 +97,11 @@ void mac_nr::stop()
void mac_nr::reset()
{
logger.info("Resetting MAC-NR");
proc_bsr.reset();
proc_sr.reset();
proc_ra.reset();
mux.reset();
}
void mac_nr::run_tti(const uint32_t tti)

@ -35,6 +35,12 @@ int32_t mux_nr::init(rlc_interface_mac* rlc_)
return SRSRAN_SUCCESS;
}
void mux_nr::reset()
{
std::lock_guard<std::mutex> lock(mutex);
this->logical_channels.clear();
}
int mux_nr::setup_lcid(const srsran::logical_channel_config_t& config)
{
std::lock_guard<std::mutex> lock(mutex);

@ -63,6 +63,8 @@ void proc_bsr_nr::reset()
timer_periodic.stop();
timer_retx.stop();
lcg_priorities.clear();
triggered_bsr_type = NONE;
}

@ -1134,6 +1134,10 @@ void rrc::rrc_connection_release(const std::string& cause)
// Save idleModeMobilityControlInfo, etc.
srsran::console("Received RRC Connection Release (releaseCause: %s)\n", cause.c_str());
if (has_nr_dc()) {
rrc_nr->rrc_release();
}
// delay actions by 60ms as per 5.3.8.3
task_sched.defer_callback(60, [this]() { start_go_idle(); });
}

@ -362,6 +362,13 @@ bool rrc_nr::rrc_reconfiguration(bool endc_release_and_add_r15,
return true;
}
void rrc_nr::rrc_release()
{
rlc->reset();
pdcp->reset();
mac->reset();
}
int rrc_nr::get_nr_capabilities(srsran::byte_buffer_t* nr_caps_pdu)
{
struct ue_nr_cap_s nr_cap;

@ -180,7 +180,8 @@ public:
asn1::dyn_octstring nr_radio_bearer_cfg1_r15) override
{
return false;
};
}
void rrc_release() override {}
bool is_config_pending() override { return false; };
};

@ -27,6 +27,7 @@ class dummy_phy : public phy_interface_rrc_nr
class dummy_mac : public mac_interface_rrc_nr
{
void reset() {}
int setup_lcid(const srsran::logical_channel_config_t& config) { return SRSRAN_SUCCESS; }
int set_config(const srsran::bsr_cfg_nr_t& bsr_cfg) { return SRSRAN_SUCCESS; }
int set_config(const srsran::sr_cfg_nr_t& sr_cfg) { return SRSRAN_SUCCESS; }

Loading…
Cancel
Save