Fix issues with RLF in B210 and X300 (#669)

* Calling tx_end() from radio_reset() causes long execution time in B210. Using boolean to call later instead. Fixes RLF failing in B210. Checked in X300

* Fix issue #655
This commit is contained in:
Ismael Gomez 2019-09-20 15:41:16 +02:00 committed by GitHub
parent a2ab043c0d
commit 0984debe1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 24 deletions

View File

@ -408,38 +408,51 @@ struct mac_cfg_t {
**************************/
struct phy_cfg_t {
phy_cfg_t()
phy_cfg_t() { set_defaults(); }
void set_defaults()
{
ZERO_OBJECT(ul_cfg);
ZERO_OBJECT(dl_cfg);
ZERO_OBJECT(prach_cfg);
set_defaults_common();
set_defaults_dedicated();
}
void set_defaults_common()
{
// CommonConfig defaults for non-zero values
ul_cfg.pucch.delta_pucch_shift = 1;
ul_cfg.power_ctrl.delta_f_pucch[0] = 0;
ul_cfg.power_ctrl.delta_f_pucch[1] = 1;
ul_cfg.power_ctrl.delta_f_pucch[2] = 0;
ul_cfg.power_ctrl.delta_f_pucch[3] = 0;
ul_cfg.power_ctrl.delta_f_pucch[4] = 0;
set_defaults_dedicated();
}
// 36.331 9.2.4
void set_defaults_dedicated()
{
dl_cfg.tm = SRSLTE_TM1;
dl_cfg.pdsch.use_tbs_index_alt = false;
dl_cfg.pdsch.p_a = 0;
dl_cfg.cqi_report.periodic_configured = false;
dl_cfg.cqi_report.aperiodic_configured = false;
ul_cfg.pucch.tdd_ack_multiplex = false;
ul_cfg.pusch.uci_offset.I_offset_ack = 10;
ul_cfg.pusch.uci_offset.I_offset_cqi = 15;
ul_cfg.pusch.uci_offset.I_offset_ri = 12;
ul_cfg.pusch.uci_offset.I_offset_cqi = 15;
ul_cfg.power_ctrl.acc_enabled = true;
ul_cfg.power_ctrl.p_srs_offset = 7;
ul_cfg.power_ctrl.p0_nominal_pusch = 0;
ul_cfg.power_ctrl.delta_mcs_based = false;
ul_cfg.power_ctrl.acc_enabled = true;
ul_cfg.power_ctrl.p0_nominal_pucch = 0;
ul_cfg.power_ctrl.p_srs_offset = 7;
// Rest of default values are 0 or false
ul_cfg.srs.dedicated_enabled = false;
ul_cfg.pucch.sr_configured = false;
}
srslte_dl_cfg_t dl_cfg;

View File

@ -177,6 +177,8 @@ private:
uint32_t nof_workers;
uint32_t max_workers;
bool is_pending_tx_end = false;
srslte::radio_interface_phy* radio_h;
float cfo;
srslte::log* log_h;

View File

@ -584,17 +584,24 @@ void phy_common::worker_end(uint32_t tti,
radio_h->tx(i, buffer[i], nof_samples[i], tx_time[i]);
} else {
if (radio_h->is_continuous_tx()) {
if (!radio_h->get_is_start_of_burst(i)) {
if (is_pending_tx_end) {
radio_h->tx_end();
is_pending_tx_end = false;
} else {
if (!radio_h->get_is_start_of_burst(i)) {
if (ul_channel && !srslte_timestamp_iszero(&tx_time[i])) {
bzero(zeros_multi[0], sizeof(cf_t) * nof_samples[i]);
ul_channel->run(zeros_multi, zeros_multi, nof_samples[i], tx_time[i]);
if (ul_channel && !srslte_timestamp_iszero(&tx_time[i])) {
bzero(zeros_multi[0], sizeof(cf_t) * nof_samples[i]);
ul_channel->run(zeros_multi, zeros_multi, nof_samples[i], tx_time[i]);
}
radio_h->tx(i, zeros_multi, nof_samples[i], tx_time[i]);
}
radio_h->tx(i, zeros_multi, nof_samples[i], tx_time[i]);
}
} else {
radio_h->tx_end();
if (i == 0) {
radio_h->tx_end();
}
}
}
}
@ -696,9 +703,7 @@ void phy_common::reset_radio()
// Since is_first_of_burst is set to true, the radio need to send
// end of burst in order to stall correctly the Tx stream.
// This is required for UHD version 3.10 and newer.
if (radio_h) {
radio_h->tx_end();
}
is_pending_tx_end = true;
}
void phy_common::reset()

View File

@ -1340,8 +1340,8 @@ void rrc::leave_connected()
nas->leave_connected();
pdcp->reset();
rlc->reset();
phy->reset();
mac->reset();
phy->reset();
set_phy_default();
set_mac_default();
stop_timers();
@ -2421,8 +2421,7 @@ void rrc::log_phy_config_dedicated()
// Apply default physical common and dedicated configuration
void rrc::set_phy_default()
{
current_phy_cfg.set_defaults_dedicated();
current_phy_cfg.set_defaults_common();
current_phy_cfg.set_defaults();
if (phy != nullptr) {
phy->set_config(current_phy_cfg);