rrc,gnb: remove obsolete methods to verify config correctness

master
Francisco Paisana 3 years ago
parent e8902c785f
commit e9760f110a

@ -17,6 +17,10 @@
namespace srsenb {
// Helper methods
uint32_t coreset_get_bw(const asn1::rrc_nr::ctrl_res_set_s& coreset);
int coreset_get_pdcch_nr_max_candidates(const asn1::rrc_nr::ctrl_res_set_s& coreset, uint32_t aggregation_level);
void generate_default_nr_cell(rrc_cell_cfg_nr_t& cell);
int set_derived_nr_cell_params(bool is_sa, rrc_cell_cfg_nr_t& cell);
@ -24,10 +28,7 @@ int set_derived_nr_rrc_params(rrc_nr_cfg_t& rrc_cfg);
// Tests to ensure validity of config
int check_nr_cell_cfg_valid(const rrc_cell_cfg_nr_t& cell, bool is_sa);
int check_nr_phy_cell_cfg_valid(const phy_cell_cfg_nr_t& phy_cell);
int check_nr_pdcch_cfg_valid(const srsran_pdcch_cfg_nr_t& pdcch);
int check_rrc_nr_cfg_valid(const rrc_nr_cfg_t& cfg);
} // namespace srsenb

@ -90,8 +90,6 @@ int rrc_nr::init(const rrc_nr_cfg_t& cfg_,
return SRSRAN_ERROR;
}
srsran_assert(check_nr_phy_cell_cfg_valid(cfg.cell_list[0].phy_cell) == SRSRAN_SUCCESS, "Invalid PhyCell Config");
config_phy(); // if PHY is not yet initialized, config will be stored and applied on initialization
config_mac();

@ -294,7 +294,7 @@ int set_derived_nr_cell_params(bool is_sa, rrc_cell_cfg_nr_t& cell)
cell.pdcch_cfg_common.ra_search_space_present = true;
cell.pdcch_cfg_common.ra_search_space = ss1.search_space_id;
return check_nr_cell_cfg_valid(cell, is_sa);
return SRSRAN_SUCCESS;
}
int set_derived_nr_rrc_params(rrc_nr_cfg_t& rrc_cfg)
@ -305,19 +305,6 @@ int set_derived_nr_rrc_params(rrc_nr_cfg_t& rrc_cfg)
return SRSRAN_SUCCESS;
}
int check_nr_cell_cfg_valid(const rrc_cell_cfg_nr_t& cell, bool is_sa)
{
// verify SSB params are consistent
HANDLE_ERROR(check_nr_phy_cell_cfg_valid(cell.phy_cell));
return SRSRAN_SUCCESS;
}
int check_nr_phy_cell_cfg_valid(const phy_cell_cfg_nr_t& phy_cell)
{
return SRSRAN_SUCCESS;
}
int check_nr_pdcch_cfg_valid(const srsran_pdcch_cfg_nr_t& pdcch)
{
// Verify Search Spaces
@ -340,15 +327,4 @@ int check_nr_pdcch_cfg_valid(const srsran_pdcch_cfg_nr_t& pdcch)
return SRSRAN_SUCCESS;
}
int check_rrc_nr_cfg_valid(const rrc_nr_cfg_t& cfg)
{
ERROR_IF_NOT(cfg.cell_list.size() > 0, "The number of NR cells must be positive");
for (const rrc_cell_cfg_nr_t& cell : cfg.cell_list) {
HANDLE_ERROR(check_nr_cell_cfg_valid(cell, cfg.is_standalone));
}
return SRSRAN_SUCCESS;
}
} // namespace srsenb

@ -158,7 +158,6 @@ void test_rrc_sa_ngap_integration(ngap_args_t ngap_args)
rrc_cfg_nr.cell_list[0].duplex_mode = SRSRAN_DUPLEX_MODE_FDD;
rrc_cfg_nr.is_standalone = true;
set_derived_nr_cell_params(rrc_cfg_nr.is_standalone, rrc_cfg_nr.cell_list[0]);
srsran_assert(check_rrc_nr_cfg_valid(rrc_cfg_nr) == SRSRAN_SUCCESS, "Invalid RRC NR configuration");
TESTASSERT(
rrc_obj.init(rrc_cfg_nr, &phy_obj, &mac_obj, &rlc_obj, &pdcp_obj, &ngap_obj, &gtpu_obj, bearer_mapper, nullptr) ==

@ -62,7 +62,6 @@ void test_sib_generation()
srsran::string_to_mcc("001", &rrc_cfg_nr.mcc);
srsran::string_to_mnc("01", &rrc_cfg_nr.mnc);
set_derived_nr_cell_params(rrc_cfg_nr.is_standalone, rrc_cfg_nr.cell_list[0]);
srsran_assert(check_rrc_nr_cfg_valid(rrc_cfg_nr) == SRSRAN_SUCCESS, "Invalid RRC NR configuration");
TESTASSERT(
rrc_obj.init(rrc_cfg_nr, &phy_obj, &mac_obj, &rlc_obj, &pdcp_obj, nullptr, nullptr, bearer_mapper, nullptr) ==
@ -119,7 +118,6 @@ int test_rrc_setup()
srsran::string_to_mcc("001", &rrc_cfg_nr.mcc);
srsran::string_to_mnc("01", &rrc_cfg_nr.mnc);
set_derived_nr_cell_params(rrc_cfg_nr.is_standalone, rrc_cfg_nr.cell_list[0]);
srsran_assert(check_rrc_nr_cfg_valid(rrc_cfg_nr) == SRSRAN_SUCCESS, "Invalid RRC NR configuration");
TESTASSERT(
rrc_obj.init(rrc_cfg_nr, &phy_obj, &mac_obj, &rlc_obj, &pdcp_obj, nullptr, nullptr, bearer_mapper, nullptr) ==
SRSRAN_SUCCESS);
@ -163,7 +161,6 @@ void test_rrc_sa_connection()
srsran::string_to_mcc("001", &rrc_cfg_nr.mcc);
srsran::string_to_mnc("01", &rrc_cfg_nr.mnc);
set_derived_nr_cell_params(rrc_cfg_nr.is_standalone, rrc_cfg_nr.cell_list[0]);
srsran_assert(check_rrc_nr_cfg_valid(rrc_cfg_nr) == SRSRAN_SUCCESS, "Invalid RRC NR configuration");
TESTASSERT(
rrc_obj.init(rrc_cfg_nr, &phy_obj, &mac_obj, &rlc_obj, &pdcp_obj, &ngap_obj, nullptr, bearer_mapper, nullptr) ==

Loading…
Cancel
Save