fix handling of CRNTI CE in the RRC. The scheduler should not allocate more grants for the new rnti after this point.

master
Francisco 4 years ago committed by Ismael Gomez
parent 59513c0eed
commit 8811b7c9a7

@ -46,6 +46,7 @@ public:
void activity_timer_expired(const activity_timeout_type_t type); void activity_timer_expired(const activity_timeout_type_t type);
void rlf_timer_expired(uint32_t timeout_id); void rlf_timer_expired(uint32_t timeout_id);
void max_rlc_retx_reached(); void max_rlc_retx_reached();
void deactivate_bearers() { mac_ctrl.set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::IDLE); }
rrc_state_t get_state(); rrc_state_t get_state();
void get_metrics(rrc_ue_metrics_t& ue_metrics) const; void get_metrics(rrc_ue_metrics_t& ue_metrics) const;

@ -222,12 +222,16 @@ int rrc::add_user(uint16_t rnti, const sched_interface::ue_cfg_t& sched_ue_cfg)
void rrc::upd_user(uint16_t new_rnti, uint16_t old_rnti) void rrc::upd_user(uint16_t new_rnti, uint16_t old_rnti)
{ {
// Remove new_rnti // Remove new_rnti
auto new_ue_it = users.find(new_rnti);
if (new_ue_it != users.end()) {
new_ue_it->second->deactivate_bearers();
rem_user_thread(new_rnti); rem_user_thread(new_rnti);
}
// Send Reconfiguration to old_rnti if is RRC_CONNECT or RRC Release if already released here // Send Reconfiguration to old_rnti if is RRC_CONNECT or RRC Release if already released here
auto old_it = users.find(old_rnti); auto old_it = users.find(old_rnti);
if (old_it == users.end()) { if (old_it == users.end()) {
send_rrc_connection_reject(old_rnti); logger.info("rnti=0x%x received MAC CRNTI CE: 0x%x, but old context is unavailable", new_rnti, old_rnti);
return; return;
} }
ue* ue_ptr = old_it->second.get(); ue* ue_ptr = old_it->second.get();

Loading…
Cancel
Save