Fix multiple PRACHs after SR fail and a minor issue in HO

master
Ismael Gomez 5 years ago committed by Andre Puschmann
parent 4bd0d2da6d
commit cbb1bbfaa1

@ -157,6 +157,7 @@ public:
void get_sync_metrics(sync_metrics_t m[SRSLTE_MAX_CARRIERS]);
void reset();
void reset_radio();
/* SCell Management */
void enable_scell(uint32_t cc_idx, bool enable);

@ -341,7 +341,9 @@ uint32_t phy::get_current_earfcn() {
void phy::prach_send(uint32_t preamble_idx, int allowed_subframe, float target_power_dbm)
{
n_ta = 0;
sfsync.set_time_adv_sec(0.0f);
common.reset_radio();
if (!prach_buffer.prepare_to_send(preamble_idx, allowed_subframe, target_power_dbm)) {
Error("Preparing PRACH to send\n");
}

@ -692,10 +692,19 @@ void phy_common::get_sync_metrics(sync_metrics_t m[SRSLTE_MAX_CARRIERS])
sync_metrics_read = true;
}
void phy_common::reset_radio()
{
is_first_tx = true;
for (int i = 0; i < SRSLTE_MAX_RADIOS; i++) {
is_first_of_burst[i] = true;
}
}
void phy_common::reset()
{
reset_radio();
sr_enabled = false;
is_first_tx = true;
cur_pathloss = 0;
cur_pusch_power = 0;
p0_preamble = 0;
@ -711,10 +720,6 @@ void phy_common::reset()
pcell_report_period = 20;
for (int i = 0; i < SRSLTE_MAX_RADIOS; i++) {
is_first_of_burst[i] = true;
}
ZERO_OBJECT(pending_dl_ack);
ZERO_OBJECT(pending_dl_dai);
ZERO_OBJECT(pending_ul_ack);

@ -167,7 +167,7 @@ bool prach::prepare_to_send(uint32_t preamble_idx_, int allowed_subframe_, float
} else {
if (!cell_initiated) {
Error("PRACH: Cell not configured\n");
} else if (preamble_idx_ >= 64) {
} else {
Error("PRACH: Invalid preamble %d\n", preamble_idx_);
}
return false;

@ -110,7 +110,7 @@ void ul_harq_entity::new_grant_ul(mac_interface_phy_lte::mac_grant_ul_t grant,
Info("Not implemented\n");
}
} else {
Warning("Received grant for unknnown rnti=0x%x\n", grant.rnti);
Warning("Received grant for unknown rnti=0x%x\n", grant.rnti);
}
}

@ -1070,9 +1070,9 @@ bool rrc::ho_prepare()
ho_src_rnti = uernti.crnti;
// Reset/Reestablish stack
mac->wait_uplink();
mac->clear_rntis();
phy->meas_reset();
mac->wait_uplink();
pdcp->reestablish();
rlc->reestablish();
mac->reset();
@ -1472,7 +1472,7 @@ void rrc::start_cell_reselection()
return;
}
rrc_log->info("Cell Reselection - Starting...");
rrc_log->info("Cell Reselection - Starting...\n");
callback_list.defer_task([this]() {
if (cell_selector.run()) {
return srslte::proc_outcome_t::yield;
@ -1498,7 +1498,7 @@ void rrc::start_cell_reselection()
break;
}
}
rrc_log->info("Cell Reselection - Finished successfully");
rrc_log->info("Cell Reselection - Finished successfully\n");
return srslte::proc_outcome_t::success;
});
}

Loading…
Cancel
Save