nr,gnb,mac: fix default ue cfg used when mac receives a RACH

master
Francisco 3 years ago committed by Francisco Paisana
parent 3f6d35bc6c
commit 7ccb86c480

@ -102,11 +102,14 @@ private:
// args // args
srsran::task_sched_handle task_sched; srsran::task_sched_handle task_sched;
srsran::task_queue_handle stack_task_queue; srsran::task_queue_handle stack_task_queue;
std::unique_ptr<srsran::mac_pcap> pcap = nullptr;
mac_nr_args_t args = {}; mac_nr_args_t args = {};
srslog::basic_logger& logger; srslog::basic_logger& logger;
// derived
srsran::phy_cfg_nr_t default_ue_phy_cfg;
std::unique_ptr<srsran::mac_pcap> pcap = nullptr;
std::atomic<bool> started = {false}; std::atomic<bool> started = {false};
const static uint32_t NUMEROLOGY_IDX = 0; /// only 15kHz supported at this stage const static uint32_t NUMEROLOGY_IDX = 0; /// only 15kHz supported at this stage

@ -276,6 +276,14 @@ int mac_nr::cell_cfg(const std::vector<srsenb::sched_nr_interface::cell_cfg_t>&
rx.reset(new mac_nr_rx{rlc, rrc, stack_task_queue, sched.get(), logger}); rx.reset(new mac_nr_rx{rlc, rrc, stack_task_queue, sched.get(), logger});
srsran::phy_cfg_nr_default_t::reference_cfg_t ref_args{};
ref_args.duplex = cell_config[0].duplex.mode == SRSRAN_DUPLEX_MODE_TDD
? srsran::phy_cfg_nr_default_t::reference_cfg_t::R_DUPLEX_TDD_CUSTOM_6_4
: srsran::phy_cfg_nr_default_t::reference_cfg_t::R_DUPLEX_FDD;
default_ue_phy_cfg = srsran::phy_cfg_nr_default_t{ref_args};
default_ue_phy_cfg.pdcch = cell_config[0].bwps[0].pdcch;
default_ue_phy_cfg.csi = {}; // disable CSI until RA is complete
return SRSRAN_SUCCESS; return SRSRAN_SUCCESS;
} }
@ -313,12 +321,7 @@ void mac_nr::rach_detected(const rach_info_t& rach_info)
uecfg.carriers[0].active = true; uecfg.carriers[0].active = true;
uecfg.carriers[0].cc = enb_cc_idx; uecfg.carriers[0].cc = enb_cc_idx;
uecfg.ue_bearers[0].direction = mac_lc_ch_cfg_t::BOTH; uecfg.ue_bearers[0].direction = mac_lc_ch_cfg_t::BOTH;
srsran::phy_cfg_nr_default_t::reference_cfg_t ref_args{}; uecfg.phy_cfg = default_ue_phy_cfg;
ref_args.duplex = cell_config[0].duplex.mode == SRSRAN_DUPLEX_MODE_TDD
? srsran::phy_cfg_nr_default_t::reference_cfg_t::R_DUPLEX_TDD_CUSTOM_6_4
: srsran::phy_cfg_nr_default_t::reference_cfg_t::R_DUPLEX_FDD;
uecfg.phy_cfg = srsran::phy_cfg_nr_default_t{ref_args};
uecfg.phy_cfg.csi = {}; // disable CSI until RA is complete
uint16_t rnti = alloc_ue(enb_cc_idx); uint16_t rnti = alloc_ue(enb_cc_idx);

Loading…
Cancel
Save