during cell selection, if the serving cell is ok, avoid calling serving cell configuration if the sibs are already acquired

master
Francisco Paisana 4 years ago committed by Xavier Arteaga
parent 4b1626bf24
commit 924cc4f937

@ -114,8 +114,7 @@ bool prach::set_cell(srslte_cell_t cell_, srslte_prach_cfg_t prach_cfg)
// We must not reset preamble_idx here, MAC might have already called prepare_to_send()
if (6 + prach_cfg.freq_offset > cell.nof_prb) {
srslte::console(
"Error no space for PRACH: frequency offset=%d, N_rb_ul=%d\n", prach_cfg.freq_offset, cell.nof_prb);
srslte::console("Error no space for PRACH: frequency offset=%d, N_rb_ul=%d\n", prach_cfg.freq_offset, cell.nof_prb);
log_h->error("Error no space for PRACH: frequency offset=%d, N_rb_ul=%d\n", prach_cfg.freq_offset, cell.nof_prb);
return false;
}

@ -456,9 +456,9 @@ rrc::cell_selection_proc::cell_selection_proc(rrc* parent_) : rrc_ptr(parent_) {
*/
proc_outcome_t rrc::cell_selection_proc::init(std::vector<uint32_t> required_sibs_)
{
bool serv_cell_is_ok = rrc_ptr->phy_ctrl->is_in_sync() and rrc_ptr->phy->cell_is_camping();
if (rrc_ptr->meas_cells.nof_neighbours() == 0 and serv_cell_is_ok and
rrc_ptr->meas_cells.serving_cell().has_sibs(required_sibs_)) {
bool serv_cell_is_ok = rrc_ptr->phy_ctrl->is_in_sync() and rrc_ptr->phy->cell_is_camping();
bool has_required_sibs = rrc_ptr->meas_cells.serving_cell().has_sibs(required_sibs_);
if (rrc_ptr->meas_cells.nof_neighbours() == 0 and serv_cell_is_ok and has_required_sibs) {
// don't bother with cell selection if there are no neighbours and we are already camping
Debug("Skipping Cell Selection Procedure as there are no neighbour and cell is camping.\n");
cs_result = cs_result_t::same_cell;
@ -486,7 +486,7 @@ proc_outcome_t rrc::cell_selection_proc::init(std::vector<uint32_t> required_sib
discard_serving = false;
serv_cell_select_attempted = false;
cell_search_called = false;
if (serv_cell_is_ok) {
if (serv_cell_is_ok and not has_required_sibs) {
state = search_state_t::cell_config;
if (not rrc_ptr->serv_cell_cfg.launch(&serv_cell_cfg_fut, required_sibs)) {
Warning("Failed to launch %s procedure\n", rrc_ptr->serv_cell_cfg.get()->name());

Loading…
Cancel
Save