implementation of SCell Deactivation

master
Francisco Paisana 4 years ago
parent eafc003671
commit 74c18ecf6c

@ -23,6 +23,7 @@
#define SRSLTE_MAC_CONTROLLER_H
#include "rrc_ue.h"
#include <bitset>
namespace srsenb {
@ -49,6 +50,11 @@ public:
const sched_interface::ue_cfg_t& get_ue_sched_cfg() const { return current_sched_ue_cfg; }
void set_scell_activation(const std::bitset<SRSLTE_MAX_CARRIERS>& scell_mask);
enum proc_stage_t : int8_t { config_tx, config_complete, other };
void update_mac(proc_stage_t stage);
private:
void handle_con_reconf_with_mobility();
int apply_basic_conn_cfg(const asn1::rrc::rr_cfg_ded_s& rr_cfg);

@ -1258,8 +1258,16 @@ void cc_sched_ue::reset()
void cc_sched_ue::set_cfg(const sched_interface::ue_cfg_t& cfg_)
{
cfg = &cfg_;
// Config HARQ processes
harq_ent.set_cfg(cfg->maxharq_tx);
// Handle deactivation
if (ue_cc_idx > 0 and not cfg_.supported_cc_list[ue_cc_idx].active and active) {
active = false;
reset();
log_h->info("SCHED: rnti=0x%x SCellIndex=%d deactivated\n", rnti, ue_cc_idx);
}
}
/* Find lowest DCI aggregation level supported by the UE spectral efficiency */

@ -336,4 +336,20 @@ void rrc::ue::mac_controller::handle_ho_prep(const asn1::rrc::ho_prep_info_r8_ie
void rrc::ue::mac_controller::handle_ho_prep_complete() {}
void rrc::ue::mac_controller::set_scell_activation(const std::bitset<SRSLTE_MAX_CARRIERS>& scell_mask)
{
for (uint32_t i = 1; i < current_sched_ue_cfg.supported_cc_list.size(); ++i) {
current_sched_ue_cfg.supported_cc_list[i].active = scell_mask[i];
}
}
void rrc::ue::mac_controller::update_mac(proc_stage_t stage)
{
// Apply changes to MAC scheduler
mac->ue_cfg(rrc_ue->rnti, &current_sched_ue_cfg);
if (stage != proc_stage_t::other) {
mac->phy_config_enabled(rrc_ue->rnti, stage == proc_stage_t::config_complete);
}
}
} // namespace srsenb

@ -1318,6 +1318,8 @@ void rrc::ue::rrc_mobility::intraenb_ho_st::enter(rrc_mobility* f, const ho_meas
}
/* Freeze all DRBs. SRBs DL are needed for sending the HO Cmd */
f->rrc_ue->mac_ctrl->set_scell_activation({0});
f->rrc_ue->mac_ctrl->update_mac(mac_controller::config_tx);
for (const drb_to_add_mod_s& drb : f->rrc_ue->bearer_list.get_established_drbs()) {
f->rrc_enb->mac->bearer_ue_rem(f->rrc_ue->rnti, drb.drb_id + 2);
}

Loading…
Cancel
Save