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

This commit is contained in:
Ismael Gomez 2019-09-04 17:46:51 +02:00 committed by Andre Puschmann
parent 4bd0d2da6d
commit cbb1bbfaa1
6 changed files with 18 additions and 10 deletions

View File

@ -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);

View File

@ -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");
}

View File

@ -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);

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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;
});
}