fixing some bugs in embms with new stack and cc scheduler in enodeb

master
yagoda 5 years ago committed by Andre Puschmann
parent e69cb8a9f7
commit 94f62b54ad

@ -212,7 +212,7 @@ int mac::ue_cfg(uint16_t rnti, sched_interface::ue_cfg_t* cfg)
if (not ue_ptr->is_phy_added) { if (not ue_ptr->is_phy_added) {
Info("Registering RNTI=0x%X to PHY...\n", rnti); Info("Registering RNTI=0x%X to PHY...\n", rnti);
// Register new user in PHY with first CC index // Register new user in PHY with first CC index
if (phy_h->add_rnti(rnti, cfg->supported_cc_list.front().enb_cc_idx, false) == SRSLTE_ERROR) { if (phy_h->add_rnti(rnti, (SRSLTE_MRNTI) ? 0 : cfg->supported_cc_list.front().enb_cc_idx, false) == SRSLTE_ERROR) {
Error("Registering new UE RNTI=0x%X to PHY\n", rnti); Error("Registering new UE RNTI=0x%X to PHY\n", rnti);
} }
Info("Done registering RNTI=0x%X to PHY...\n", rnti); Info("Done registering RNTI=0x%X to PHY...\n", rnti);

@ -173,14 +173,19 @@ void rrc::add_user(uint16_t rnti, const sched_interface::ue_cfg_t& sched_ue_cfg)
{ {
auto user_it = users.find(rnti); auto user_it = users.find(rnti);
if (user_it == users.end()) { if (user_it == users.end()) {
auto p = users.insert(std::make_pair(rnti, std::unique_ptr<ue>(new ue{this, rnti, sched_ue_cfg}))); bool rnti_added = true;
if (p.second and p.first->second->is_allocated()) { if (rnti != SRSLTE_MRNTI) {
// only non-eMBMS RNTIs are present in user map
auto p = users.insert(std::make_pair(rnti, std::unique_ptr<ue>(new ue{this, rnti, sched_ue_cfg})));
rnti_added = p.second and p.first->second->is_allocated();
}
if (rnti_added) {
rlc->add_user(rnti); rlc->add_user(rnti);
pdcp->add_user(rnti); pdcp->add_user(rnti);
rrc_log->info("Added new user rnti=0x%x\n", rnti); rrc_log->info("Added new user rnti=0x%x\n", rnti);
} else { } else {
mac->bearer_ue_rem(rnti, 0); mac->bearer_ue_rem(rnti, 0);
rrc_log->error("Adding user rnti=0x%x - Fail to allocate user resources\n", rnti); rrc_log->error("Adding user rnti=0x%x - Failed to allocate user resources\n", rnti);
} }
} else { } else {
rrc_log->error("Adding user rnti=0x%x (already exists)\n", rnti); rrc_log->error("Adding user rnti=0x%x (already exists)\n", rnti);
@ -1021,7 +1026,7 @@ rrc::ue::ue(rrc* outer_rrc, uint16_t rnti_, const sched_interface::ue_cfg_t& sch
{ {
if (current_sched_ue_cfg.supported_cc_list.empty() or not current_sched_ue_cfg.supported_cc_list[0].active) { if (current_sched_ue_cfg.supported_cc_list.empty() or not current_sched_ue_cfg.supported_cc_list[0].active) {
parent->rrc_log->warning("No PCell set. Picking eNBccIdx=0 as PCell\n"); parent->rrc_log->warning("No PCell set. Picking eNBccIdx=0 as PCell\n");
current_sched_ue_cfg.supported_cc_list.resize(0); current_sched_ue_cfg.supported_cc_list.resize(1);
current_sched_ue_cfg.supported_cc_list[0].active = true; current_sched_ue_cfg.supported_cc_list[0].active = true;
current_sched_ue_cfg.supported_cc_list[0].enb_cc_idx = UE_PCELL_CC_IDX; current_sched_ue_cfg.supported_cc_list[0].enb_cc_idx = UE_PCELL_CC_IDX;
} }

Loading…
Cancel
Save