nr,ue,rrc: avoid configuring the CSI until NR RA is complete

master
Francisco 3 years ago committed by Francisco Paisana
parent 8118c368d9
commit b8976ca463

@ -108,6 +108,7 @@ public:
/// RRC /// RRC
void rrc_ra_problem(); void rrc_ra_problem();
void rrc_ra_completed();
/// stack interface /// stack interface
void process_pdus(); void process_pdus();

@ -36,6 +36,7 @@ public:
// RRC functions // RRC functions
virtual void rrc_ra_problem() = 0; virtual void rrc_ra_problem() = 0;
virtual void rrc_ra_completed() = 0;
}; };
/** /**

@ -506,6 +506,11 @@ void mac_nr::rrc_ra_problem()
rrc->ra_problem(); rrc->ra_problem();
} }
void mac_nr::rrc_ra_completed()
{
rrc->ra_completed();
}
/** /**
* Called from the main stack thread to process received PDUs * Called from the main stack thread to process received PDUs
*/ */

@ -278,6 +278,7 @@ void proc_ra_nr::ra_completion()
srsran::console("Random Access Complete. c-rnti=0x%x, ta=%d\n", mac.get_crnti(), current_ta); srsran::console("Random Access Complete. c-rnti=0x%x, ta=%d\n", mac.get_crnti(), current_ta);
logger.info("Random Access Complete. c-rnti=0x%x, ta=%d", mac.get_crnti(), current_ta); logger.info("Random Access Complete. c-rnti=0x%x, ta=%d", mac.get_crnti(), current_ta);
temp_crnti = SRSRAN_INVALID_RNTI; temp_crnti = SRSRAN_INVALID_RNTI;
mac.rrc_ra_completed();
reset(); reset();
} }

@ -73,6 +73,7 @@ public:
void msga_flush(){}; void msga_flush(){};
// RRC RA problem // RRC RA problem
void rrc_ra_problem() { logger.warning("Dummy MAC RRC ra problem"); } void rrc_ra_problem() { logger.warning("Dummy MAC RRC ra problem"); }
void rrc_ra_completed() { logger.info("Dummy MAC RRC ra completed"); }
private: private:
uint16_t crnti = SRSRAN_INVALID_RNTI; uint16_t crnti = SRSRAN_INVALID_RNTI;

@ -1143,6 +1143,7 @@ bool rrc_nr::apply_sp_cell_ded_ul_pusch(const asn1::rrc_nr::pusch_cfg_s& pusch_c
bool rrc_nr::apply_sp_cell_cfg(const sp_cell_cfg_s& sp_cell_cfg) bool rrc_nr::apply_sp_cell_cfg(const sp_cell_cfg_s& sp_cell_cfg)
{ {
srsran_csi_hl_cfg_t prev_csi = phy_cfg.csi;
if (sp_cell_cfg.recfg_with_sync_present) { if (sp_cell_cfg.recfg_with_sync_present) {
const recfg_with_sync_s& recfg_with_sync = sp_cell_cfg.recfg_with_sync; const recfg_with_sync_s& recfg_with_sync = sp_cell_cfg.recfg_with_sync;
mac->set_crnti(recfg_with_sync.new_ue_id); mac->set_crnti(recfg_with_sync.new_ue_id);
@ -1305,7 +1306,14 @@ bool rrc_nr::apply_sp_cell_cfg(const sp_cell_cfg_s& sp_cell_cfg)
logger.warning("Option sp_cell_cfg_ded not present"); logger.warning("Option sp_cell_cfg_ded not present");
return false; return false;
} }
phy->set_config(phy_cfg);
// Configure PHY
// Note: CSI config is deferred to when RA is complete. See TS 38.331, Section 5.3.5.3
srsran::phy_cfg_nr_t current_phycfg = phy_cfg;
current_phycfg.csi = prev_csi;
phy->set_config(current_phycfg);
// Start RA procedure
mac->start_ra_procedure(); mac->start_ra_procedure();
return true; return true;
} }
@ -1501,7 +1509,11 @@ void rrc_nr::max_retx_attempted() {}
void rrc_nr::protocol_failure() {} void rrc_nr::protocol_failure() {}
// MAC interface // MAC interface
void rrc_nr::ra_completed() {} void rrc_nr::ra_completed()
{
logger.info("RA completed. Applying remaining CSI configuration.");
phy->set_config(phy_cfg);
}
void rrc_nr::ra_problem() void rrc_nr::ra_problem()
{ {
rrc_eutra->nr_scg_failure_information(scg_failure_cause_t::random_access_problem); rrc_eutra->nr_scg_failure_information(scg_failure_cause_t::random_access_problem);

Loading…
Cancel
Save