fix resetting of phy and mac during reestablishment

master
Francisco Paisana 4 years ago committed by Xavier Arteaga
parent 83d13cf20f
commit 514deaf25b

@ -1381,6 +1381,10 @@ int cc_sched_ue::alloc_tbs(uint32_t nof_prb, uint32_t nof_re, uint32_t req_bytes
if (tbs_bytes > (int)req_bytes && req_bytes > 0) {
int req_tbs_idx = srslte_ra_tbs_to_table_idx(req_bytes * 8, nof_prb);
int req_mcs = srslte_ra_mcs_from_tbs_idx(req_tbs_idx, cfg->use_tbs_index_alt, is_ul);
while (cfg->use_tbs_index_alt and req_mcs < 0 and req_tbs_idx < 33) {
// some tbs_idx are invalid for 256QAM. See TS 36.213 - Table 7.1.7.1-1A
req_mcs = srslte_ra_mcs_from_tbs_idx(++req_tbs_idx, cfg->use_tbs_index_alt, is_ul);
}
if (req_mcs >= 0 and req_mcs < (int)sel_mcs) {
sel_mcs = req_mcs;

@ -127,7 +127,7 @@ int rrc::ue::mac_controller::apply_basic_conn_cfg(const asn1::rrc::rr_cfg_ded_s&
current_sched_ue_cfg.continuous_pusch = false;
// Only PCell active at this point
current_sched_ue_cfg.supported_cc_list.resize(1);
current_sched_ue_cfg.supported_cc_list.resize(1, {});
current_sched_ue_cfg.supported_cc_list[0].active = true;
current_sched_ue_cfg.supported_cc_list[0].enb_cc_idx = pcell->cell_common->enb_cc_idx;
@ -136,8 +136,9 @@ int rrc::ue::mac_controller::apply_basic_conn_cfg(const asn1::rrc::rr_cfg_ded_s&
current_sched_ue_cfg.ue_bearers[0].direction = srsenb::sched_interface::ue_bearer_cfg_t::BOTH;
current_sched_ue_cfg.ue_bearers[1].direction = srsenb::sched_interface::ue_bearer_cfg_t::BOTH;
// Set basic antenna configuration
// Set default configuration
current_sched_ue_cfg.supported_cc_list[0].dl_cfg.tm = SRSLTE_TM1;
current_sched_ue_cfg.use_tbs_index_alt = false;
// Apply common PhyConfig updates (e.g. SR/CQI resources, antenna cfg)
if (rr_cfg.phys_cfg_ded_present) {

@ -388,7 +388,6 @@ void rrc::ue::handle_rrc_con_reest_req(rrc_conn_reest_request_s* msg)
} else {
parent->rrc_log->error("Received ReestablishmentRequest from an rnti=0x%x not in IDLE\n", rnti);
}
return;
}
void rrc::ue::send_connection_reest(uint8_t ncc)

@ -67,6 +67,7 @@ public:
void out_sync() { trigger(out_sync_ev{}); }
bool set_cell_config(const srslte::phy_cfg_t& config, uint32_t cc_idx = 0);
void set_phy_to_default();
void set_phy_to_default_dedicated();
void set_phy_to_default_pucch_srs();
void set_config_complete();
@ -77,7 +78,7 @@ public:
srslte::span<const srslte::phy_cfg_t> current_cell_config() const { return current_cells_cfg; }
srslte::span<srslte::phy_cfg_t> current_cell_config() { return current_cells_cfg; }
const std::bitset<SRSLTE_MAX_CARRIERS>& current_config_scells() const { return current_scells_cfg; }
const std::bitset<SRSLTE_MAX_CARRIERS>& current_config_scells() const { return configured_scell_mask; }
// FSM states
struct unknown_st {};
@ -135,9 +136,9 @@ private:
srslte::event_dispatcher<cell_srch_res> cell_search_observers;
uint32_t nof_pending_configs = 0;
std::array<srslte::phy_cfg_t, SRSLTE_MAX_CARRIERS> current_cells_cfg = {};
std::bitset<SRSLTE_MAX_CARRIERS> current_scells_cfg = {};
std::bitset<SRSLTE_MAX_CARRIERS> configured_scell_mask = {};
bool set_cell_config_common(const srslte::phy_cfg_t& cfg, uint32_t cc_idx, bool is_set);
bool set_cell_config(const srslte::phy_cfg_t& cfg, uint32_t cc_idx, bool is_set);
protected:
state_list<unknown_st, in_sync_st, out_sync_st, searching_cell, selecting_cell> states{this,

@ -47,7 +47,7 @@ void phy_controller::in_sync()
bool phy_controller::set_cell_config(const srslte::phy_cfg_t& config, uint32_t cc_idx)
{
log_h->info("Setting PHY config for cc_idx=%d\n", cc_idx);
return set_cell_config_common(config, cc_idx, true);
return set_cell_config(config, cc_idx, true);
}
void phy_controller::set_phy_to_default()
@ -57,7 +57,19 @@ void phy_controller::set_phy_to_default()
srslte::phy_cfg_t& default_cfg = current_cells_cfg[0];
default_cfg.set_defaults();
for (uint32_t i = 0; i < SRSLTE_MAX_CARRIERS; ++i) {
set_cell_config_common(default_cfg, i, false);
set_cell_config(default_cfg, i, false);
}
}
/// Apply default PHY config for all SCells as specified in TS 36.331 9.2.4
void phy_controller::set_phy_to_default_dedicated()
{
log_h->info("Setting default dedicated PHY config\n");
srslte::phy_cfg_t& default_cfg = current_cells_cfg[0];
default_cfg.set_defaults_dedicated();
for (uint32_t i = 0; i < SRSLTE_MAX_CARRIERS; ++i) {
set_cell_config(default_cfg, i, false);
}
}
@ -68,16 +80,16 @@ void phy_controller::set_phy_to_default_pucch_srs()
srslte::phy_cfg_t& default_cfg_ded = current_cells_cfg[0];
default_cfg_ded.set_defaults_pucch_sr();
for (uint32_t i = 0; i < SRSLTE_MAX_CARRIERS; ++i) {
set_cell_config_common(default_cfg_ded, i, false);
set_cell_config(default_cfg_ded, i, false);
}
}
bool phy_controller::set_cell_config_common(const srslte::phy_cfg_t& cfg, uint32_t cc_idx, bool is_set)
bool phy_controller::set_cell_config(const srslte::phy_cfg_t& cfg, uint32_t cc_idx, bool is_set)
{
if ((is_set or cc_idx == 0 or current_scells_cfg[cc_idx]) and phy->set_config(cfg, cc_idx)) {
if ((is_set or cc_idx == 0 or configured_scell_mask[cc_idx]) and phy->set_config(cfg, cc_idx)) {
current_cells_cfg[cc_idx] = cfg;
if (cc_idx > 0) {
current_scells_cfg[cc_idx] = is_set;
configured_scell_mask[cc_idx] = is_set;
}
nof_pending_configs++;
return true;

@ -1332,7 +1332,7 @@ proc_outcome_t rrc::connection_reest_proc::init(asn1::rrc::reest_cause_e cause)
}
// 1> apply the default physical channel configuration as specified in 9.2.4;
// Note: this is done by the MAC Reset procedure
rrc_ptr->phy_ctrl->set_phy_to_default_dedicated();
// 1> apply the default semi-persistent scheduling configuration as specified in 9.2.3;
// N.A.

Loading…
Cancel
Save