Code clean up and minor correction in RA for SA
This commit is contained in:
@@ -541,6 +541,8 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
|
||||
sdu_lcids[0] = lcid;
|
||||
|
||||
// initialisation by RRC
|
||||
|
||||
// TODO: To be removed after RA procedures fully implemented
|
||||
if(get_softmodem_params()->do_ra) {
|
||||
nr_rrc_ue_generate_RRCSetupRequest(mod_id,gNB_id);
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ void mac_top_init_gNB(void)
|
||||
// These should be out of here later
|
||||
pdcp_layer_init();
|
||||
|
||||
if(IS_SOFTMODEM_NOS1 && !get_softmodem_params()->do_ra)
|
||||
if(IS_SOFTMODEM_NOS1 && !(get_softmodem_params()->do_ra || get_softmodem_params()->sa) )
|
||||
nr_DRB_preconfiguration(0x1234);
|
||||
|
||||
rrc_init_nr_global_param();
|
||||
|
||||
@@ -255,7 +255,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
|
||||
1024);
|
||||
X2AP_ENDC_SGNB_ADDITION_REQ_ACK(msg).rrc_buffer_size = (enc_rval.encoded+7)>>3;
|
||||
itti_send_msg_to_task(TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(0), msg); //Check right id instead of hardcoding
|
||||
} else if (get_softmodem_params()->do_ra) {
|
||||
} else if (get_softmodem_params()->do_ra || get_softmodem_params()->sa) {
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, rrc->module_id, GNB_FLAG_YES, ue_context_p->ue_id_rnti, 0, 0,rrc->module_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
||||
secondaryCellGroup->cellGroupId = scg_id;
|
||||
NR_RLC_BearerConfig_t *RLC_BearerConfig = calloc(1,sizeof(*RLC_BearerConfig));
|
||||
nr_rlc_bearer_init(RLC_BearerConfig);
|
||||
if (get_softmodem_params()->do_ra)
|
||||
if (get_softmodem_params()->do_ra || get_softmodem_params()->sa)
|
||||
nr_drb_config(RLC_BearerConfig->rlc_Config, NR_RLC_Config_PR_um_Bi_Directional);
|
||||
else
|
||||
nr_drb_config(RLC_BearerConfig->rlc_Config, NR_RLC_Config_PR_am);
|
||||
|
||||
@@ -75,10 +75,10 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP,
|
||||
//NR_UE_rrc_inst[Mod_idP].Info[gNB_id].T300_active = 1;
|
||||
//NR_UE_rrc_inst[Mod_idP].Info[gNB_id].T300_cnt = 0;
|
||||
|
||||
LOG_D(RRC, "nr_mac_rrc_data_req_ue: Payload size = %i\n", NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size);
|
||||
LOG_D(NR_RRC, "nr_mac_rrc_data_req_ue: Payload size = %i\n", NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size);
|
||||
memcpy(buffer_pP, (uint8_t*)NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.Payload, NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size);
|
||||
for(int i = 0; i<NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size; i++) {
|
||||
LOG_D(RRC,"(%i): %i\n", i, buffer_pP[i]);
|
||||
LOG_D(NR_RRC,"(%i): %i\n", i, buffer_pP[i]);
|
||||
}
|
||||
|
||||
return NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size;
|
||||
|
||||
@@ -1102,6 +1102,7 @@ int8_t nr_rrc_ue_generate_ra_msg(module_id_t module_id, uint8_t gNB_index) {
|
||||
|
||||
switch(NR_UE_rrc_inst[module_id].ra_trigger){
|
||||
case INITIAL_ACCESS_FROM_RRC_IDLE:
|
||||
// After SIB1 is received, prepare RRCConnectionRequest
|
||||
nr_rrc_ue_generate_RRCSetupRequest(module_id,gNB_index);
|
||||
break;
|
||||
case RRC_CONNECTION_REESTABLISHMENT:
|
||||
@@ -1192,10 +1193,7 @@ int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(
|
||||
}
|
||||
LOG_I(NR_RRC, "SIB1 decoded\n");
|
||||
|
||||
// TODO: prepare RRCConnectionRequest
|
||||
// After SIB1 is received, prepare RRCConnectionRequest
|
||||
|
||||
// FIXME: fix condition for the RA trigger
|
||||
// FIXME: improve condition for the RA trigger
|
||||
// Check for on-demand not broadcasted SI
|
||||
check_requested_SI_List(module_id, NR_UE_rrc_inst[module_id].requested_SI_List, *sib1);
|
||||
if( nr_rrc_get_state(module_id) == RRC_STATE_IDLE_NR ) {
|
||||
|
||||
@@ -75,17 +75,12 @@ gNBs =
|
||||
initialDLBWPk0_2 = 0;
|
||||
initialDLBWPmappingType_2 = 0;
|
||||
#this is SS=1,L=12
|
||||
initialDLBWPstartSymbolAndLength_2 = 95;
|
||||
initialDLBWPstartSymbolAndLength_2 = 54;
|
||||
|
||||
initialDLBWPk0_3 = 0;
|
||||
initialDLBWPmappingType_3 = 0;
|
||||
#this is SS=2,L=7
|
||||
initialDLBWPstartSymbolAndLength_3 = 86;
|
||||
|
||||
initialDLBWPk0_4 = 0;
|
||||
initialDLBWPmappingType_4 = 0;
|
||||
#this is SS=2,L=5
|
||||
initialDLBWPstartSymbolAndLength_4 = 58;
|
||||
#this is SS=1,L=5
|
||||
initialDLBWPstartSymbolAndLength_3 = 57;
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
|
||||
Reference in New Issue
Block a user