fix: avoid configuring the phy mbsfn from the rrc, when phy is not fully initialized

This commit is contained in:
Francisco 2021-06-14 12:21:38 +01:00 committed by Francisco Paisana
parent f55e1c5a73
commit 4cf5a8b25a
2 changed files with 6 additions and 3 deletions

View File

@ -70,7 +70,6 @@ int enb::init(const all_args_t& args_)
return SRSRAN_ERROR; return SRSRAN_ERROR;
} }
// Only init Stack if both radio and PHY could be initialized
if (ret == SRSRAN_SUCCESS) { if (ret == SRSRAN_SUCCESS) {
if (lte_stack->init(args.stack, rrc_cfg, lte_phy.get()) != SRSRAN_SUCCESS) { if (lte_stack->init(args.stack, rrc_cfg, lte_phy.get()) != SRSRAN_SUCCESS) {
srsran::console("Error initializing stack.\n"); srsran::console("Error initializing stack.\n");

View File

@ -848,8 +848,12 @@ void rrc::configure_mbsfn_sibs()
pmch_item->data_mcs = mbms_mcs; pmch_item->data_mcs = mbms_mcs;
pmch_item->mch_sched_period = srsran::pmch_info_t::mch_sched_period_t::rf64; pmch_item->mch_sched_period = srsran::pmch_info_t::mch_sched_period_t::rf64;
pmch_item->sf_alloc_end = 64 * 6; pmch_item->sf_alloc_end = 64 * 6;
phy->configure_mbsfn(&sibs2, &sibs13, mcch_t);
mac->write_mcch(&sibs2, &sibs13, &mcch_t, mcch_payload_buffer, current_mcch_length); // Configure PHY when PHY is done being initialized
task_sched.defer_task([this, sibs2, sibs13, mcch_t]() mutable {
phy->configure_mbsfn(&sibs2, &sibs13, mcch_t);
mac->write_mcch(&sibs2, &sibs13, &mcch_t, mcch_payload_buffer, current_mcch_length);
});
} }
int rrc::pack_mcch() int rrc::pack_mcch()