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 get_sync_metrics(sync_metrics_t m[SRSLTE_MAX_CARRIERS]);
void reset(); void reset();
void reset_radio();
/* SCell Management */ /* SCell Management */
void enable_scell(uint32_t cc_idx, bool enable); 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) 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); sfsync.set_time_adv_sec(0.0f);
common.reset_radio();
if (!prach_buffer.prepare_to_send(preamble_idx, allowed_subframe, target_power_dbm)) { if (!prach_buffer.prepare_to_send(preamble_idx, allowed_subframe, target_power_dbm)) {
Error("Preparing PRACH to send\n"); 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; 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() void phy_common::reset()
{ {
reset_radio();
sr_enabled = false; sr_enabled = false;
is_first_tx = true;
cur_pathloss = 0; cur_pathloss = 0;
cur_pusch_power = 0; cur_pusch_power = 0;
p0_preamble = 0; p0_preamble = 0;
@ -711,10 +720,6 @@ void phy_common::reset()
pcell_report_period = 20; 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_ack);
ZERO_OBJECT(pending_dl_dai); ZERO_OBJECT(pending_dl_dai);
ZERO_OBJECT(pending_ul_ack); ZERO_OBJECT(pending_ul_ack);

@ -167,7 +167,7 @@ bool prach::prepare_to_send(uint32_t preamble_idx_, int allowed_subframe_, float
} else { } else {
if (!cell_initiated) { if (!cell_initiated) {
Error("PRACH: Cell not configured\n"); Error("PRACH: Cell not configured\n");
} else if (preamble_idx_ >= 64) { } else {
Error("PRACH: Invalid preamble %d\n", preamble_idx_); Error("PRACH: Invalid preamble %d\n", preamble_idx_);
} }
return false; 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"); Info("Not implemented\n");
} }
} else { } 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; ho_src_rnti = uernti.crnti;
// Reset/Reestablish stack // Reset/Reestablish stack
mac->wait_uplink();
mac->clear_rntis(); mac->clear_rntis();
phy->meas_reset(); phy->meas_reset();
mac->wait_uplink();
pdcp->reestablish(); pdcp->reestablish();
rlc->reestablish(); rlc->reestablish();
mac->reset(); mac->reset();
@ -1472,7 +1472,7 @@ void rrc::start_cell_reselection()
return; return;
} }
rrc_log->info("Cell Reselection - Starting..."); rrc_log->info("Cell Reselection - Starting...\n");
callback_list.defer_task([this]() { callback_list.defer_task([this]() {
if (cell_selector.run()) { if (cell_selector.run()) {
return srslte::proc_outcome_t::yield; return srslte::proc_outcome_t::yield;
@ -1498,7 +1498,7 @@ void rrc::start_cell_reselection()
break; break;
} }
} }
rrc_log->info("Cell Reselection - Finished successfully"); rrc_log->info("Cell Reselection - Finished successfully\n");
return srslte::proc_outcome_t::success; return srslte::proc_outcome_t::success;
}); });
} }

Loading…
Cancel
Save