Commit 6995eef8 authored by francescomani's avatar francescomani

moving initialization of msg3 frame and slot

parent d99099f3
...@@ -42,7 +42,7 @@ void nr_gold_pbch(PHY_VARS_NR_UE* ue) ...@@ -42,7 +42,7 @@ void nr_gold_pbch(PHY_VARS_NR_UE* ue)
x2 = (1<<11) * (i_ssb2 + 1) * ((Nid>>2) + 1) + (1<<6) * (i_ssb2 + 1) + (Nid&3); x2 = (1<<11) * (i_ssb2 + 1) * ((Nid>>2) + 1) + (1<<6) * (i_ssb2 + 1) + (Nid&3);
x2 = x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31); x2 = x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
for (n=0; n<NR_PBCH_DMRS_LENGTH_DWORD; n++) { for (n=0; n<NR_PBCH_DMRS_LENGTH_DWORD; n++) {
ue->nr_gold_pbch[n_hf][l][n] = lte_gold_generic(&x1, &x2, reset); ue->nr_gold_pbch[n_hf][l][n] = lte_gold_generic(&x1, &x2, reset);
reset = 0; reset = 0;
} }
......
...@@ -421,6 +421,8 @@ int nr_rrc_mac_config_req_ue( ...@@ -421,6 +421,8 @@ int nr_rrc_mac_config_req_ue(
mac->scg = cell_group_config; mac->scg = cell_group_config;
mac->servCellIndex = *cell_group_config->spCellConfig->servCellIndex; mac->servCellIndex = *cell_group_config->spCellConfig->servCellIndex;
config_control_ue(mac); config_control_ue(mac);
mac->msg3_frame = -1; // initialize to an invalid value
mac->msg3_slot = -1;
if (cell_group_config->spCellConfig->reconfigurationWithSync) { if (cell_group_config->spCellConfig->reconfigurationWithSync) {
mac->rach_ConfigDedicated = cell_group_config->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink; mac->rach_ConfigDedicated = cell_group_config->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink;
mac->scc = cell_group_config->spCellConfig->reconfigurationWithSync->spCellConfigCommon; mac->scc = cell_group_config->spCellConfig->reconfigurationWithSync->spCellConfigCommon;
......
...@@ -52,7 +52,6 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst) ...@@ -52,7 +52,6 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst)
nr_ue_mac_inst = (NR_UE_MAC_INST_t *)calloc(sizeof(NR_UE_MAC_INST_t),NB_NR_UE_MAC_INST); nr_ue_mac_inst = (NR_UE_MAC_INST_t *)calloc(sizeof(NR_UE_MAC_INST_t),NB_NR_UE_MAC_INST);
if (rrc_inst) { if (rrc_inst) {
nr_rrc_mac_config_req_ue(0,0,0,NULL,rrc_inst->cell_group_config); nr_rrc_mac_config_req_ue(0,0,0,NULL,rrc_inst->cell_group_config);
if (IS_SOFTMODEM_NOS1){ if (IS_SOFTMODEM_NOS1){
AssertFatal(rlc_module_init(0) == 0, "%s: Could not initialize RLC layer\n", __FUNCTION__); AssertFatal(rlc_module_init(0) == 0, "%s: Could not initialize RLC layer\n", __FUNCTION__);
pdcp_layer_init(); pdcp_layer_init();
......
...@@ -499,8 +499,6 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, ...@@ -499,8 +499,6 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
mac->RA_PREAMBLE_TRANSMISSION_COUNTER = 1; mac->RA_PREAMBLE_TRANSMISSION_COUNTER = 1;
mac->RA_PREAMBLE_POWER_RAMPING_COUNTER = 1; mac->RA_PREAMBLE_POWER_RAMPING_COUNTER = 1;
mac->RA_Msg3_size = size_sdu + sizeof(NR_MAC_SUBHEADER_SHORT) + sizeof(NR_MAC_SUBHEADER_SHORT); mac->RA_Msg3_size = size_sdu + sizeof(NR_MAC_SUBHEADER_SHORT) + sizeof(NR_MAC_SUBHEADER_SHORT);
mac->msg3_frame = -1; // initialize to an invalid value
mac->msg3_slot = -1;
mac->RA_prachMaskIndex = 0; mac->RA_prachMaskIndex = 0;
// todo: add the backoff condition here // todo: add the backoff condition here
mac->RA_backoff_cnt = 0; mac->RA_backoff_cnt = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment