Make SA the default mode, remove corresponding option
This commit is contained in:
@@ -304,15 +304,14 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf
|
||||
init_pdcp();
|
||||
}
|
||||
|
||||
if (is_x2ap_enabled() ) { //&& !NODE_IS_DU(node_type)
|
||||
if (get_softmodem_params()->nsa) { //&& !NODE_IS_DU(node_type)
|
||||
LOG_I(X2AP, "X2AP enabled \n");
|
||||
__attribute__((unused)) uint32_t x2_register_gnb_pending = gNB_app_register_x2 (gnb_id_start, gnb_id_end);
|
||||
}
|
||||
|
||||
/* For the CU case the gNB registration with the AMF might have to take place after the F1 setup, as the PLMN info
|
||||
* can originate from the DU. Add check on whether x2ap is enabled to account for ENDC NSA scenario.*/
|
||||
if ((get_softmodem_params()->sa || is_x2ap_enabled()) &&
|
||||
!NODE_IS_DU(node_type)) {
|
||||
if (IS_SA_MODE(get_softmodem_params()) && !NODE_IS_DU(node_type)) {
|
||||
/* Try to register each gNB */
|
||||
//registered_gnb = 0;
|
||||
__attribute__((unused)) uint32_t register_gnb_pending = gNB_app_register (gnb_id_start, gnb_id_end);
|
||||
@@ -324,7 +323,7 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (is_x2ap_enabled()) {
|
||||
if (get_softmodem_params()->nsa) {
|
||||
if(itti_create_task(TASK_X2AP, x2ap_task, NULL) < 0) {
|
||||
LOG_E(X2AP, "Create task for X2AP failed\n");
|
||||
}
|
||||
@@ -333,8 +332,7 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf
|
||||
}
|
||||
}
|
||||
|
||||
if (get_softmodem_params()->sa &&
|
||||
!NODE_IS_DU(node_type)) {
|
||||
if (IS_SA_MODE(get_softmodem_params()) && !NODE_IS_DU(node_type)) {
|
||||
|
||||
char* gnb_ipv4_address_for_NGU = NULL;
|
||||
uint32_t gnb_port_for_NGU = 0;
|
||||
@@ -383,7 +381,7 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf
|
||||
}
|
||||
|
||||
//Use check on x2ap to consider the NSA scenario
|
||||
if((is_x2ap_enabled() || get_softmodem_params()->sa) && (node_type != ngran_gNB_CUCP)) {
|
||||
if((is_x2ap_enabled() || IS_SA_MODE(get_softmodem_params())) && (node_type != ngran_gNB_CUCP)) {
|
||||
if (itti_create_task (TASK_GTPV1_U, >pv1uTask, NULL) < 0) {
|
||||
LOG_E(GTPU, "Create task for GTPV1U failed\n");
|
||||
return -1;
|
||||
|
||||
+4
-4
@@ -286,7 +286,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
LOG_D(NR_MAC, "The received sfn/slot [%d %d] from proxy\n",
|
||||
frame, slot);
|
||||
|
||||
if (get_softmodem_params()->sa && mac->mib == NULL) {
|
||||
if (IS_SA_MODE(get_softmodem_params()) && mac->mib == NULL) {
|
||||
LOG_D(NR_MAC, "We haven't gotten MIB. Lets see if we received it\n");
|
||||
nr_ue_dl_indication(&mac->dl_info);
|
||||
process_queued_nr_nfapi_msgs(mac, sfn_slot);
|
||||
@@ -392,7 +392,7 @@ static void UE_synch(void *arg) {
|
||||
ret = sl_nr_slss_search(UE, &syncD->proc, SL_NR_SSB_REPETITION_IN_FRAMES);
|
||||
} else {
|
||||
nr_get_carrier_frequencies(UE, &dl_carrier, &ul_carrier);
|
||||
ret = nr_initial_sync(&syncD->proc, UE, 2, get_softmodem_params()->sa, syncD->gscnInfo, syncD->numGscn);
|
||||
ret = nr_initial_sync(&syncD->proc, UE, 2, IS_SA_MODE(get_softmodem_params()), syncD->gscnInfo, syncD->numGscn);
|
||||
}
|
||||
|
||||
if (ret.cell_detected) {
|
||||
@@ -601,7 +601,7 @@ static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE, const UE_nr_rxtx_proc_t *proc
|
||||
if (UE->sl_mode == 2)
|
||||
fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params;
|
||||
|
||||
if (IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa) {
|
||||
if (IS_SOFTMODEM_NOS1 || IS_SA_MODE(get_softmodem_params())) {
|
||||
|
||||
// Start synchronization with a target gNB
|
||||
if (UE->synch_request.received_synch_request == 1) {
|
||||
@@ -1056,7 +1056,7 @@ void init_NR_UE(int nb_inst, char *uecap_file, char *reconfig_file, char *rbconf
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(i);
|
||||
mac->if_module = nr_ue_if_module_init(i);
|
||||
AssertFatal(mac->if_module, "can not initialize IF module\n");
|
||||
if (!get_softmodem_params()->sa || !get_softmodem_params()->sl_mode) {
|
||||
if (!IS_SA_MODE(get_softmodem_params()) || !get_softmodem_params()->sl_mode) {
|
||||
init_nsa_message(&rrc_inst[i], reconfig_file, rbconfig_file);
|
||||
nr_rlc_activate_srb0(mac_inst[i].crnti, NULL, send_srb0_rrc);
|
||||
}
|
||||
|
||||
@@ -480,7 +480,7 @@ int main(int argc, char **argv)
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(inst);
|
||||
init_nr_ue_phy_cpu_stats(&UE[CC_id]->phy_cpu_stats);
|
||||
|
||||
if (get_softmodem_params()->sa || get_softmodem_params()->sl_mode) { // set frame config to initial values from command line
|
||||
if (IS_SA_MODE(get_softmodem_params()) || get_softmodem_params()->sl_mode) { // set frame config to initial values from command line
|
||||
// and assume that the SSB is centered on the grid
|
||||
uint16_t nr_band = get_softmodem_params()->band;
|
||||
mac->nr_band = nr_band;
|
||||
|
||||
@@ -123,7 +123,6 @@ extern "C"
|
||||
#define CONTINUOUS_TX softmodem_params.continuous_tx
|
||||
#define PHY_TEST softmodem_params.phy_test
|
||||
#define DO_RA softmodem_params.do_ra
|
||||
#define SA softmodem_params.sa
|
||||
#define SL_MODE softmodem_params.sl_mode
|
||||
#define WAIT_FOR_SYNC softmodem_params.wait_for_sync
|
||||
#define CHAIN_OFFSET softmodem_params.chain_offset
|
||||
@@ -155,7 +154,6 @@ extern int usrp_tx_thread;
|
||||
{"thread-pool", CONFIG_HLP_TPOOL, 0, .strptr=&TP_CONFIG, .defstrval="-1,-1,-1,-1,-1,-1,-1,-1", TYPE_STRING, 0}, \
|
||||
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, .iptr=&PHY_TEST, .defintval=0, TYPE_INT, 0}, \
|
||||
{"do-ra", CONFIG_HLP_DORA, PARAMFLAG_BOOL, .iptr=&DO_RA, .defintval=0, TYPE_INT, 0}, \
|
||||
{"sa", CONFIG_HLP_SA, PARAMFLAG_BOOL, .iptr=&SA, .defintval=0, TYPE_INT, 0}, \
|
||||
{"sl-mode", CONFIG_HLP_SL_MODE, 0, .u8ptr=&SL_MODE, .defintval=0, TYPE_UINT8, 0}, \
|
||||
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, .u8ptr=&USIM_TEST, .defintval=0, TYPE_UINT8, 0}, \
|
||||
{"clock-source", CONFIG_HLP_CLK, 0, .uptr=&CLOCK_SOURCE, .defintval=0, TYPE_UINT, 0}, \
|
||||
@@ -224,7 +222,6 @@ extern int usrp_tx_thread;
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s3a = { config_checkstr_assign_integer, \
|
||||
{"MONOLITHIC", "PNF", "VNF", "AERIAL","UE_STUB_PNF","UE_STUB_OFFNET","STANDALONE_PNF"}, \
|
||||
{NFAPI_MONOLITHIC, NFAPI_MODE_PNF, NFAPI_MODE_VNF, NFAPI_MODE_AERIAL,NFAPI_UE_STUB_PNF,NFAPI_UE_STUB_OFFNET,NFAPI_MODE_STANDALONE_PNF}, \
|
||||
@@ -305,7 +302,6 @@ typedef struct {
|
||||
char *threadPoolConfig;
|
||||
int phy_test;
|
||||
int do_ra;
|
||||
int sa;
|
||||
uint8_t sl_mode;
|
||||
uint8_t usim_test;
|
||||
int emulate_rf;
|
||||
@@ -333,6 +329,8 @@ typedef struct {
|
||||
int threequarter_fs;
|
||||
} softmodem_params_t;
|
||||
|
||||
#define IS_SA_MODE(sM_params) (!(sM_params)->phy_test && !(sM_params)->do_ra && !(sM_params)->nsa)
|
||||
|
||||
uint64_t get_softmodem_optmask(void);
|
||||
uint64_t set_softmodem_optmask(uint64_t bitmask);
|
||||
uint64_t clear_softmodem_optmask(uint64_t bitmask);
|
||||
|
||||
@@ -283,7 +283,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
|
||||
init_timeshift_rotation(fp);
|
||||
|
||||
// initialize to false only for SA since in do-ra and phy-test it is already set to true before getting here
|
||||
if (get_softmodem_params()->sa)
|
||||
if (IS_SA_MODE(get_softmodem_params()))
|
||||
ue->received_config_request = false;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -271,7 +271,7 @@ void nr_generate_pbch(PHY_VARS_gNB *gNB,
|
||||
pbch_a |= ((pbch_pdu[i >> 3] >> (7 - (i & 7))) & 1) << i;
|
||||
|
||||
// NSA to signal no coreset0
|
||||
const int ssb_sc_offset = get_softmodem_params()->sa ? config->ssb_table.ssb_subcarrier_offset.value : 31;
|
||||
const int ssb_sc_offset = IS_SA_MODE(get_softmodem_params()) ? config->ssb_table.ssb_subcarrier_offset.value : 31;
|
||||
|
||||
#ifdef DEBUG_PBCH_ENCODING
|
||||
for (int i = 0; i < 3; i++)
|
||||
|
||||
@@ -95,7 +95,7 @@ void nr_common_signal_procedures(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_n
|
||||
const int sc_offset = (fp->freq_range == FR1) ? pdu->SsbSubcarrierOffset >> scs : pdu->SsbSubcarrierOffset;
|
||||
fp->ssb_start_subcarrier = (12 * prb_offset + sc_offset);
|
||||
|
||||
if (fp->print_ue_help_cmdline_log && get_softmodem_params()->sa) {
|
||||
if (fp->print_ue_help_cmdline_log && IS_SA_MODE(get_softmodem_params())) {
|
||||
fp->print_ue_help_cmdline_log = false;
|
||||
if (fp->dl_CarrierFreq != fp->ul_CarrierFreq)
|
||||
LOG_A(PHY,
|
||||
|
||||
@@ -153,7 +153,6 @@ int main(int argc, char **argv)
|
||||
int ssb_scan_threads = 0;
|
||||
|
||||
channel_desc_t *gNB2UE;
|
||||
get_softmodem_params()->sa = 1;
|
||||
get_softmodem_params()->usim_test = 1;
|
||||
|
||||
//uint8_t extended_prefix_flag=0;
|
||||
|
||||
@@ -71,7 +71,8 @@ uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, const E
|
||||
|
||||
for (gnb_id = gnb_id_start; (gnb_id < gnb_id_end) ; gnb_id++) {
|
||||
{
|
||||
if(get_softmodem_params()->sa){
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
|
||||
// note: there is an implicit relationship between the data structure and the message name
|
||||
msg_p = itti_alloc_new_message (TASK_GNB_APP, 0, NGAP_REGISTER_GNB_REQ); //Message Temporarily reuse
|
||||
|
||||
|
||||
@@ -1003,7 +1003,7 @@ static NR_ServingCellConfigCommon_t *get_scc_config(configmodule_interface_t *cf
|
||||
*scc->ssbSubcarrierSpacing,
|
||||
*frequencyInfoDL->absoluteFrequencySSB);
|
||||
LOG_I(RRC, "absoluteFrequencySSB %ld corresponds to %lu Hz\n", *frequencyInfoDL->absoluteFrequencySSB, ssb_freq);
|
||||
if (get_softmodem_params()->sa)
|
||||
if (IS_SA_MODE(get_softmodem_params()))
|
||||
check_ssb_raster(ssb_freq, *frequencyInfoDL->frequencyBandList.list.array[0], *scc->ssbSubcarrierSpacing);
|
||||
fix_scc(scc, ssb_bitmap);
|
||||
}
|
||||
@@ -1226,7 +1226,7 @@ static f1ap_setup_req_t *RC_read_F1Setup(uint64_t id,
|
||||
req->cell[0].info.measurement_timing_config = mtc_buf;
|
||||
req->cell[0].info.measurement_timing_config_len = len;
|
||||
|
||||
if (get_softmodem_params()->sa) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
// in NSA we don't transmit SIB1, so cannot fill DU system information
|
||||
// so cannot send MIB either
|
||||
|
||||
@@ -1503,7 +1503,7 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
|
||||
f1ap_served_cell_info_t info;
|
||||
read_du_cell_info(cfg, NODE_IS_DU(node_type), &gnb_id, &gnb_du_id, &name, &info, 1);
|
||||
|
||||
if (get_softmodem_params()->sa) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
nr_mac_configure_sib1(RC.nrmac[0], &info.plmn, info.nr_cellid, *info.tac);
|
||||
if (scc->ext2 && scc->ext2->ntn_Config_r17)
|
||||
nr_mac_configure_sib19(RC.nrmac[0]);
|
||||
@@ -1826,7 +1826,7 @@ void RCconfig_NRRRC(gNB_RRC_INST *rrc)
|
||||
config_getlist(config_get_if(), &GNBParamList, GNBParams, sizeofArray(GNBParams), NULL);
|
||||
if (GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default gNB ID
|
||||
if (get_softmodem_params()->sa) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
uint32_t hash;
|
||||
hash = ngap_generate_gNB_id ();
|
||||
gnb_id = i + (hash & 0xFFFFFF8);
|
||||
@@ -1978,7 +1978,7 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i) {
|
||||
for (k = 0; k < GNBParamList.numelt; k++) {
|
||||
if (GNBParamList.paramarray[k][GNB_GNB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default gNB ID
|
||||
if (get_softmodem_params()->sa) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
uint32_t hash;
|
||||
|
||||
hash = ngap_generate_gNB_id ();
|
||||
@@ -2119,7 +2119,7 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i) {
|
||||
// SCTP SETTING
|
||||
NGAP_REGISTER_GNB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS;
|
||||
NGAP_REGISTER_GNB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS;
|
||||
if (get_softmodem_params()->sa) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
sprintf(aprefix,"%s.[%i].%s",GNB_CONFIG_STRING_GNB_LIST,k,GNB_CONFIG_STRING_SCTP_CONFIG);
|
||||
config_get(config_get_if(), SCTPParams, sizeofArray(SCTPParams), aprefix);
|
||||
NGAP_REGISTER_GNB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[GNB_SCTP_INSTREAMS_IDX].uptr);
|
||||
@@ -2208,7 +2208,7 @@ int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i) {
|
||||
for (k = 0; k < GNBParamList.numelt; k++) {
|
||||
if (GNBParamList.paramarray[k][GNB_GNB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default eNB ID
|
||||
if (get_softmodem_params()->sa) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
uint32_t hash;
|
||||
hash = ngap_generate_gNB_id ();
|
||||
gnb_id = k + (hash & 0xFFFFFF8);
|
||||
@@ -2343,7 +2343,7 @@ int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i) {
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS;
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS;
|
||||
|
||||
if (get_softmodem_params()->sa) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
sprintf(aprefix,"%s.[%i].%s",GNB_CONFIG_STRING_GNB_LIST,k,GNB_CONFIG_STRING_SCTP_CONFIG);
|
||||
config_get(config_get_if(), SCTPParams, sizeofArray(SCTPParams), aprefix);
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[GNB_SCTP_INSTREAMS_IDX].uptr);
|
||||
|
||||
@@ -160,7 +160,7 @@ NR_UE_MAC_INST_t *nr_l2_init_ue(int nb_inst)
|
||||
mac->ue_id = j;
|
||||
nr_ue_init_mac(mac);
|
||||
nr_ue_mac_default_configs(mac);
|
||||
if (get_softmodem_params()->sa)
|
||||
if (IS_SA_MODE(get_softmodem_params()))
|
||||
ue_init_config_request(mac, get_softmodem_params()->numerology);
|
||||
}
|
||||
|
||||
|
||||
@@ -783,7 +783,7 @@ void nr_ue_get_rach(NR_UE_MAC_INST_t *mac, int CC_id, frame_t frame, uint8_t gNB
|
||||
ra->Msg3_size = size_sdu + sizeof(NR_MAC_SUBHEADER_SHORT) + sizeof(NR_MAC_SUBHEADER_SHORT);
|
||||
}
|
||||
|
||||
} else if (!get_softmodem_params()->sa) {
|
||||
} else if (!IS_SA_MODE(get_softmodem_params())) {
|
||||
uint8_t temp_pdu[16] = {0};
|
||||
size_sdu = nr_write_ce_ulsch_pdu(temp_pdu, mac, 0, &(mac->crnti), NULL, NULL, NULL);
|
||||
ra->Msg3_size = size_sdu;
|
||||
|
||||
@@ -3810,7 +3810,7 @@ int nr_write_ce_ulsch_pdu(uint8_t *mac_ce,
|
||||
pdu, mac_ce);
|
||||
}
|
||||
|
||||
if (crnti && (!get_softmodem_params()->sa && get_softmodem_params()->do_ra && mac->ra.ra_state != nrRA_SUCCEEDED)) {
|
||||
if (crnti && (!IS_SA_MODE(get_softmodem_params()) && get_softmodem_params()->do_ra && mac->ra.ra_state != nrRA_SUCCEEDED)) {
|
||||
LOG_D(NR_MAC, "In %s: generating C-RNTI MAC CE with C-RNTI %x\n", __FUNCTION__, (*crnti));
|
||||
|
||||
// MAC CE fixed subheader
|
||||
|
||||
@@ -437,7 +437,7 @@ static void config_common(gNB_MAC_INST *nrmac,
|
||||
+ (get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing.value,
|
||||
frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing)
|
||||
* i);
|
||||
if (get_softmodem_params()->sa) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
prach_fd_occasion->k1.value =
|
||||
NRRIV2PRBOFFSET(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE)
|
||||
+ rach_ConfigCommon->rach_ConfigGeneric.msg1_FrequencyStart
|
||||
@@ -751,7 +751,7 @@ void nr_fill_sched_osi(gNB_MAC_INST *nrmac, const struct NR_SetupRelease_PDCCH_C
|
||||
|
||||
void nr_mac_configure_sib1(gNB_MAC_INST *nrmac, const f1ap_plmn_t *plmn, uint64_t cellID, int tac)
|
||||
{
|
||||
AssertFatal(get_softmodem_params()->sa > 0, "error: SIB1 only applicable for SA\n");
|
||||
AssertFatal(IS_SA_MODE(get_softmodem_params()), "error: SIB1 only applicable for SA\n");
|
||||
|
||||
NR_COMMON_channels_t *cc = &nrmac->common_channels[0];
|
||||
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
||||
@@ -763,7 +763,7 @@ void nr_mac_configure_sib1(gNB_MAC_INST *nrmac, const f1ap_plmn_t *plmn, uint64_
|
||||
|
||||
void nr_mac_configure_sib19(gNB_MAC_INST *nrmac)
|
||||
{
|
||||
AssertFatal(get_softmodem_params()->sa > 0, "error: SIB19 only applicable for SA\n");
|
||||
AssertFatal(IS_SA_MODE(get_softmodem_params()), "error: SIB19 only applicable for SA\n");
|
||||
NR_COMMON_channels_t *cc = &nrmac->common_channels[0];
|
||||
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
||||
NR_BCCH_DL_SCH_Message_t *sib19 = get_SIB19_NR(scc);
|
||||
|
||||
@@ -221,7 +221,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_
|
||||
|
||||
// This schedules SIB1
|
||||
// SIB19 will be scheduled if ntn_Config_r17 is initialized
|
||||
if (get_softmodem_params()->sa == 1) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
schedule_nr_sib1(module_idP, frame, slot, &sched_info->DL_req, &sched_info->TX_req);
|
||||
if (cc->sib19)
|
||||
schedule_nr_sib19(module_idP, frame, slot, &sched_info->DL_req, &sched_info->TX_req, cc->sib19_bcch_length, cc->sib19_bcch_pdu);
|
||||
|
||||
@@ -2291,7 +2291,7 @@ void nr_clear_ra_proc(NR_RA_t *ra)
|
||||
NR_SCHED_ENSURE_LOCKED(&RC.nrmac[0]->sched_lock);
|
||||
memset(ra, 0, sizeof(*ra));
|
||||
ra->ra_state = nrRA_gNB_IDLE;
|
||||
if (get_softmodem_params()->sa) { // in SA, prefill with allowed preambles
|
||||
if (IS_SA_MODE(get_softmodem_params())) { // in SA, prefill with allowed preambles
|
||||
ra->preambles.num_preambles = MAX_NUM_NR_PRACH_PREAMBLES;
|
||||
for (int i = 0; i < MAX_NUM_NR_PRACH_PREAMBLES; i++)
|
||||
ra->preambles.preamble_list[i] = i;
|
||||
|
||||
@@ -187,7 +187,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP,
|
||||
const int prb_offset = offset_pointa >> scs;
|
||||
schedule_ssb(frameP, slotP, scc, dl_req, i_ssb, beam_index, ssbSubcarrierOffset, offset_pointa, mib_pdu);
|
||||
fill_ssb_vrb_map(cc, prb_offset, ssbSubcarrierOffset, ssb_start_symbol, CC_id, beam.idx);
|
||||
if (get_softmodem_params()->sa == 1) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
get_type0_PDCCH_CSS_config_parameters(&gNB->type0_PDCCH_CSS_config[i_ssb],
|
||||
frameP,
|
||||
mib,
|
||||
@@ -219,7 +219,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP,
|
||||
const int prb_offset = offset_pointa >> scs;
|
||||
schedule_ssb(frameP, slotP, scc, dl_req, i_ssb, beam_index, ssbSubcarrierOffset, offset_pointa, mib_pdu);
|
||||
fill_ssb_vrb_map(cc, prb_offset, ssbSubcarrierOffset, ssb_start_symbol, CC_id, beam.idx);
|
||||
if (get_softmodem_params()->sa == 1) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
get_type0_PDCCH_CSS_config_parameters(&gNB->type0_PDCCH_CSS_config[i_ssb],
|
||||
frameP,
|
||||
mib,
|
||||
@@ -251,7 +251,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP,
|
||||
const int prb_offset = offset_pointa >> (scs-2); // reference 60kHz
|
||||
schedule_ssb(frameP, slotP, scc, dl_req, i_ssb, beam_index, ssbSubcarrierOffset, offset_pointa, mib_pdu);
|
||||
fill_ssb_vrb_map(cc, prb_offset, ssbSubcarrierOffset >> (scs - 2), ssb_start_symbol, CC_id, beam.idx);
|
||||
if (get_softmodem_params()->sa == 1) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
get_type0_PDCCH_CSS_config_parameters(&gNB->type0_PDCCH_CSS_config[i_ssb],
|
||||
frameP,
|
||||
mib,
|
||||
|
||||
@@ -3004,7 +3004,7 @@ static void nr_mac_apply_cellgroup(gNB_MAC_INST *mac, NR_UE_info_t *UE, frame_t
|
||||
|
||||
reset_srs_stats(UE);
|
||||
|
||||
if (get_softmodem_params()->sa) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
// add all available DL,UL HARQ processes for this UE in SA
|
||||
create_dl_harq_list(sched_ctrl, &UE->sc_info);
|
||||
create_ul_harq_list(sched_ctrl, &UE->sc_info);
|
||||
|
||||
@@ -343,7 +343,7 @@ static bool is_my_dci(NR_UE_MAC_INST_t *mac, nfapi_nr_dl_dci_pdu_t *received_pdu
|
||||
(received_pdu->RNTI != mac->ra.ra_rnti || mac->ra.RA_RAPID_found))
|
||||
return false;
|
||||
}
|
||||
if (get_softmodem_params()->sa) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
if (mac->state == UE_NOT_SYNC)
|
||||
return false;
|
||||
if (received_pdu->RNTI == 0xFFFF)
|
||||
|
||||
@@ -1835,7 +1835,7 @@ NR_BCCH_BCH_Message_t *get_new_MIB_NR(const NR_ServingCellConfigCommon_t *scc)
|
||||
|
||||
AssertFatal(scc->ssbSubcarrierSpacing != NULL, "scc->ssbSubcarrierSpacing is null\n");
|
||||
int ssb_subcarrier_offset = 31; // default value for NSA
|
||||
if (get_softmodem_params()->sa) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
ssb_subcarrier_offset = get_ssb_subcarrier_offset(*scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB,
|
||||
scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA,
|
||||
*scc->ssbSubcarrierSpacing);
|
||||
|
||||
@@ -340,7 +340,7 @@ void rrc_gNB_process_f1_setup_req(f1ap_setup_req_t *req, sctp_assoc_t assoc_id)
|
||||
NR_MIB_t *mib = NULL;
|
||||
NR_SIB1_t *sib1 = NULL;
|
||||
|
||||
if (sys_info != NULL && sys_info->mib != NULL && !(sys_info->sib1 == NULL && get_softmodem_params()->sa)) {
|
||||
if (sys_info != NULL && sys_info->mib != NULL && !(sys_info->sib1 == NULL && IS_SA_MODE(get_softmodem_params()))) {
|
||||
if (!extract_sys_info(sys_info, &mib, &sib1)) {
|
||||
LOG_W(RRC, "rejecting DU ID %ld\n", req->gNB_DU_id);
|
||||
fail.cause = F1AP_CauseProtocol_semantic_error;
|
||||
@@ -491,7 +491,7 @@ void rrc_gNB_process_f1_du_configuration_update(f1ap_gnb_du_configuration_update
|
||||
|
||||
const f1ap_gnb_du_system_info_t *sys_info = conf_up->cell_to_modify[0].sys_info;
|
||||
|
||||
if (sys_info != NULL && sys_info->mib != NULL && !(sys_info->sib1 == NULL && get_softmodem_params()->sa)) {
|
||||
if (sys_info != NULL && sys_info->mib != NULL && !(sys_info->sib1 == NULL && IS_SA_MODE(get_softmodem_params()))) {
|
||||
// MIB is mandatory, so will be overwritten. SIB1 is optional, so will
|
||||
// only be overwritten if present in sys_info
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_MIB, du->mib);
|
||||
|
||||
@@ -96,7 +96,7 @@ NR_CG_Config_t *generate_CG_Config(const NR_RRCReconfiguration_t *reconfig, cons
|
||||
(enc_rval.encoded+7)>>3);
|
||||
|
||||
FILE *fd; // file to be generated for nr-ue
|
||||
if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra > 0 || get_softmodem_params()->sa == 1) {
|
||||
if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra > 0) {
|
||||
// This is for phytest only, emulate first X2 message if uecap.raw file is present
|
||||
LOG_I(RRC,"Dumping NR_RRCReconfiguration message (%jd bytes)\n",(enc_rval.encoded+7)>>3);
|
||||
for (int i=0; i<(enc_rval.encoded+7)>>3; i++) {
|
||||
@@ -121,7 +121,7 @@ NR_CG_Config_t *generate_CG_Config(const NR_RRCReconfiguration_t *reconfig, cons
|
||||
|
||||
|
||||
|
||||
if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra > 0 || get_softmodem_params()->sa == 1) {
|
||||
if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra > 0) {
|
||||
|
||||
LOG_I(RRC,"Dumping scg_RB_Config message (%jd bytes)\n",(enc_rval.encoded+7)>>3);
|
||||
for (int i=0; i<(enc_rval.encoded+7)>>3; i++) {
|
||||
|
||||
@@ -116,7 +116,7 @@ RB_PROTOTYPE(rrc_nr_ue_tree_s, rrc_gNB_ue_context_s, entries,
|
||||
|
||||
void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2ap_ENDC_sgnb_addition_req_t *m)
|
||||
{
|
||||
AssertFatal(!get_softmodem_params()->sa, "%s() cannot be called in SA mode, it is intrinsically for NSA\n", __func__);
|
||||
AssertFatal(!IS_SA_MODE(get_softmodem_params()), "%s() cannot be called in SA mode, it is intrinsically for NSA\n", __func__);
|
||||
// generate nr-Config-r15 containers for LTE RRC : inside message for X2 EN-DC (CG-Config Message from 38.331)
|
||||
const nr_mac_config_t *configuration = &RC.nrmac[0]->radio_config;
|
||||
MessageDef *msg;
|
||||
@@ -153,7 +153,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a
|
||||
}
|
||||
|
||||
// NR RRCReconfiguration
|
||||
if (get_softmodem_params()->phy_test == 1 || get_softmodem_params()->do_ra == 1 || get_softmodem_params()->sa == 1){
|
||||
if (get_softmodem_params()->phy_test == 1 || get_softmodem_params()->do_ra == 1) {
|
||||
UE->rb_config = get_default_rbconfig(10 /* EPS bearer ID */, 1 /* drb ID */, NR_CipheringAlgorithm_nea0, NR_SecurityConfig__keyToUse_master);
|
||||
} else {
|
||||
/* TODO: handle more than one bearer */
|
||||
|
||||
@@ -223,7 +223,7 @@ static void nr_rrc_ue_process_rrcReconfiguration(NR_UE_RRC_INST_t *rrc,
|
||||
|
||||
nr_rrc_cellgroup_configuration(rrc, cellGroupConfig);
|
||||
|
||||
AssertFatal(!get_softmodem_params()->sa, "secondaryCellGroup only used in NSA for now\n");
|
||||
AssertFatal(!IS_SA_MODE(get_softmodem_params()), "secondaryCellGroup only used in NSA for now\n");
|
||||
nr_rrc_mac_config_req_cg(rrc->ue_id, 0, cellGroupConfig, rrc->UECap.UE_NR_Capability);
|
||||
asn1cFreeStruc(asn_DEF_NR_CellGroupConfig, cellGroupConfig);
|
||||
}
|
||||
@@ -551,7 +551,7 @@ static void nr_rrc_ue_decode_NR_BCCH_BCH_Message(NR_UE_RRC_INST_t *rrc,
|
||||
}
|
||||
|
||||
int get_sib = 0;
|
||||
if (get_softmodem_params()->sa && bcch_message->message.present == NR_BCCH_BCH_MessageType_PR_mib
|
||||
if (IS_SA_MODE(get_softmodem_params()) && bcch_message->message.present == NR_BCCH_BCH_MessageType_PR_mib
|
||||
&& bcch_message->message.choice.mib->cellBarred == NR_MIB__cellBarred_notBarred && rrc->nrRrcState != RRC_STATE_DETACH_NR) {
|
||||
NR_UE_RRC_SI_INFO *SI_info = &rrc->perNB[gNB_index].SInfo;
|
||||
// to schedule MAC to get SI if required
|
||||
@@ -994,7 +994,7 @@ static void rrc_ue_generate_RRCSetupComplete(const NR_UE_RRC_INST_t *rrc, const
|
||||
const char *nas_msg;
|
||||
int nas_msg_length;
|
||||
|
||||
if (get_softmodem_params()->sa) {
|
||||
if (IS_SA_MODE(get_softmodem_params())) {
|
||||
as_nas_info_t initialNasMsg;
|
||||
nr_ue_nas_t *nas = get_ue_nas_info(rrc->ue_id);
|
||||
generateRegistrationRequest(&initialNasMsg, nas);
|
||||
|
||||
Reference in New Issue
Block a user