use dedicated UL harq config

- this patch changes the UL harq config to a dedicated one
  instead of passing the whole MAC config which may be specific to
  a specific RAT
- it also extends the RRC to fill the harq specific config field in the
  MAC config
- clean up dl_harq and remove unused mac config
master
Andre Puschmann 8 years ago
parent 583aa2d180
commit 9f3b4bf9a5

@ -58,11 +58,10 @@ public:
pcap = NULL;
}
bool init(srslte::log *log_h_, mac_interface_rrc::mac_cfg_t *mac_cfg_, srslte::timers *timers_, demux *demux_unit_)
bool init(srslte::log *log_h_, srslte::timers *timers_, demux *demux_unit_)
{
timers_db = timers_;
demux_unit = demux_unit_;
mac_cfg = mac_cfg_;
si_window_start = 0;
log_h = log_h_;
for (uint32_t i=0;i<N+1;i++) {
@ -347,7 +346,6 @@ private:
std::vector<dl_harq_process> proc;
srslte::timers *timers_db;
mac_interface_rrc::mac_cfg_t *mac_cfg;
demux *demux_unit;
srslte::log *log_h;
srslte::mac_pcap *pcap;

@ -59,21 +59,21 @@ public:
timers_db = NULL;
mux_unit = NULL;
log_h = NULL;
mac_cfg = NULL;
params = NULL;
rntis = NULL;
average_retx = 0;
nof_pkts = 0;
}
bool init(srslte::log *log_h_,
mac_interface_rrc::ue_rnti_t *rntis_,
mac_interface_rrc::mac_cfg_t *mac_cfg_,
mac_interface_rrc_common::ue_rnti_t *rntis_,
mac_interface_rrc_common::ul_harq_params_t *params_,
srslte::timers* timers_db_,
mux *mux_unit_)
{
log_h = log_h_;
mux_unit = mux_unit_;
mac_cfg = mac_cfg_;
params = params_;
rntis = rntis_;
timers_db = timers_db_;
for (uint32_t i=0;i<N;i++) {
@ -201,9 +201,9 @@ private:
{
uint32_t max_retx;
if (is_msg3) {
max_retx = harq_entity->mac_cfg->rach.max_harq_msg3_tx;
max_retx = harq_entity->params->max_harq_msg3_tx;
} else {
max_retx = liblte_rrc_max_harq_tx_num[harq_entity->mac_cfg->main.ulsch_cnfg.max_harq_tx];
max_retx = harq_entity->params->max_harq_tx;
}
// Receive and route HARQ feedbacks
@ -409,8 +409,8 @@ private:
srslte::log *log_h;
srslte::mac_pcap *pcap;
mac_interface_rrc::ue_rnti_t *rntis;
mac_interface_rrc::mac_cfg_t *mac_cfg;
mac_interface_rrc_common::ue_rnti_t *rntis;
mac_interface_rrc_common::ul_harq_params_t *params;
float average_retx;
uint64_t nof_pkts;

@ -66,13 +66,13 @@ bool mac::init(phy_interface_mac *phy, rlc_interface_mac *rlc, rrc_interface_mac
srslte_softbuffer_rx_init(&pch_softbuffer, 100);
bsr_procedure.init( rlc_h, log_h, &config, &timers_db);
phr_procedure.init(phy_h, log_h, &config, &timers_db);
mux_unit.init ( rlc_h, log_h, &bsr_procedure, &phr_procedure);
demux_unit.init (phy_h, rlc_h, log_h, &timers_db);
ra_procedure.init (phy_h, rrc, log_h, &uernti, &config, &timers_db, &mux_unit, &demux_unit);
phr_procedure.init(phy_h, log_h, &config, &timers_db);
mux_unit.init ( rlc_h, log_h, &bsr_procedure, &phr_procedure);
demux_unit.init (phy_h, rlc_h, log_h, &timers_db);
ra_procedure.init (phy_h, rrc, log_h, &uernti, &config, &timers_db, &mux_unit, &demux_unit);
sr_procedure.init (phy_h, rrc, log_h, &config);
ul_harq.init ( log_h, &uernti, &config, &timers_db, &mux_unit);
dl_harq.init ( log_h, &config, &timers_db, &demux_unit);
ul_harq.init ( log_h, &uernti, &config.ul_harq_params, &timers_db, &mux_unit);
dl_harq.init ( log_h, &timers_db, &demux_unit);
reset();

@ -989,7 +989,8 @@ void rrc::apply_sib2_configs()
mac->get_config(&cfg);
cfg.main.time_alignment_timer = sib2.time_alignment_timer;
memcpy(&cfg.rach, &sib2.rr_config_common_sib.rach_cnfg, sizeof(LIBLTE_RRC_RACH_CONFIG_COMMON_STRUCT));
cfg.prach_config_index = sib2.rr_config_common_sib.prach_cnfg.root_sequence_index;
cfg.prach_config_index = sib2.rr_config_common_sib.prach_cnfg.root_sequence_index;
cfg.ul_harq_params.max_harq_msg3_tx = cfg.rach.max_harq_msg3_tx;
mac->set_config(&cfg);
rrc_log->info("Set RACH ConfigCommon: NofPreambles=%d, ResponseWindow=%d, ContentionResolutionTimer=%d ms\n",
@ -1218,7 +1219,13 @@ void rrc::apply_mac_config_dedicated(LIBLTE_RRC_MAC_MAIN_CONFIG_STRUCT *mac_cnfg
}
// Setup MAC configuration
mac->set_config_main(&default_cfg);
mac->set_config_main(&default_cfg);
// Update UL HARQ config
mac_interface_rrc::mac_cfg_t cfg;
mac->get_config(&cfg);
cfg.ul_harq_params.max_harq_tx = liblte_rrc_max_harq_tx_num[default_cfg.ulsch_cnfg.max_harq_tx];
mac->set_config(&cfg);
rrc_log->info("Set MAC main config: harq-MaxReTX=%d, bsr-TimerReTX=%d, bsr-TimerPeriodic=%d\n",
liblte_rrc_max_harq_tx_num[default_cfg.ulsch_cnfg.max_harq_tx],

Loading…
Cancel
Save