Code format improvements in differences for develop

This commit is contained in:
rmagueta
2021-05-12 19:29:10 +01:00
parent ee6b77023f
commit 0ef6ef2b28
52 changed files with 225 additions and 279 deletions
-3
View File
@@ -404,7 +404,6 @@ void init_gNB_Tpool(int inst) {
if(opp_enabled == 1) threadCreate(&proc->process_stats_thread, process_stats_thread,(void *)gNB, "time_meas", -1, OAI_PRIORITY_RT_LOW); if(opp_enabled == 1) threadCreate(&proc->process_stats_thread, process_stats_thread,(void *)gNB, "time_meas", -1, OAI_PRIORITY_RT_LOW);
threadCreate(&proc->L1_stats_thread,nrL1_stats_thread,(void*)gNB,"L1_stats",-1,OAI_PRIORITY_RT_LOW); threadCreate(&proc->L1_stats_thread,nrL1_stats_thread,(void*)gNB,"L1_stats",-1,OAI_PRIORITY_RT_LOW);
} }
@@ -493,8 +492,6 @@ printf("after %p\n", gNB->common_vars.rxdataF[aa]);
} }
void init_gNB(int single_thread_flag,int wait_for_sync) { void init_gNB(int single_thread_flag,int wait_for_sync) {
int inst; int inst;
-4
View File
@@ -745,10 +745,6 @@ if(!IS_SOFTMODEM_NOS1)
// don't create if node doesn't connect to RRC/S1/GTP // don't create if node doesn't connect to RRC/S1/GTP
AssertFatal(create_gNB_tasks(1) == 0,"cannot create ITTI tasks\n"); AssertFatal(create_gNB_tasks(1) == 0,"cannot create ITTI tasks\n");
/* Start the agent. If it is turned off in the configuration, it won't start */ /* Start the agent. If it is turned off in the configuration, it won't start */
/* /*
RCconfig_nr_flexran(); RCconfig_nr_flexran();
+2
View File
@@ -715,11 +715,13 @@ void *UE_thread(void *arg) {
if (openair0_cfg[0].duplex_mode == duplex_mode_TDD) { if (openair0_cfg[0].duplex_mode == duplex_mode_TDD) {
uint8_t tdd_period = mac->phy_config.config_req.tdd_table.tdd_period_in_slots; uint8_t tdd_period = mac->phy_config.config_req.tdd_table.tdd_period_in_slots;
int nrofUplinkSlots = 0; int nrofUplinkSlots = 0;
if (mac->scc_SIB) if (mac->scc_SIB)
nrofUplinkSlots = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots; nrofUplinkSlots = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
else if (mac->scc) else if (mac->scc)
nrofUplinkSlots = mac->scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots; nrofUplinkSlots = mac->scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
uint8_t num_UL_slots = nrofUplinkSlots + (nrofUplinkSlots != 0); uint8_t num_UL_slots = nrofUplinkSlots + (nrofUplinkSlots != 0);
uint8_t first_tx_slot = tdd_period - num_UL_slots; uint8_t first_tx_slot = tdd_period - num_UL_slots;
+1
View File
@@ -183,6 +183,7 @@ struct timespec clock_difftime(struct timespec start, struct timespec end) {
void print_difftimes(void) { void print_difftimes(void) {
LOG_I(HW,"difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec); LOG_I(HW,"difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec);
} }
int create_tasks_nrue(uint32_t ue_nb) { int create_tasks_nrue(uint32_t ue_nb) {
LOG_D(NR_RRC, "%s(ue_nb:%d)\n", __FUNCTION__, ue_nb); LOG_D(NR_RRC, "%s(ue_nb:%d)\n", __FUNCTION__, ue_nb);
itti_wait_ready(1); itti_wait_ready(1);
-3
View File
@@ -256,9 +256,6 @@ void nr_fill_dci(PHY_VARS_gNB *gNB,
dlsch->rnti = pdcch_pdu_rel15->dci_pdu[i].RNTI; dlsch->rnti = pdcch_pdu_rel15->dci_pdu[i].RNTI;
// nr_fill_cce_list(gNB,0); // nr_fill_cce_list(gNB,0);
} }
} }
-2
View File
@@ -82,7 +82,6 @@ void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
s=lte_gold_generic(&x1, &x2, 1); s=lte_gold_generic(&x1, &x2, 1);
#if defined(__AVX2__) #if defined(__AVX2__)
for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++) { for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++) {
in32=_mm256_movemask_epi8(_mm256_slli_epi16(((__m256i*)in)[i],7)); in32=_mm256_movemask_epi8(_mm256_slli_epi16(((__m256i*)in)[i],7));
@@ -162,7 +161,6 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
uint32_t encoded_length = nb_re*Qm; uint32_t encoded_length = nb_re*Qm;
int16_t mod_dmrs[14][n_dmrs<<1] __attribute__ ((aligned(16))); int16_t mod_dmrs[14][n_dmrs<<1] __attribute__ ((aligned(16)));
/* PTRS */ /* PTRS */
uint16_t beta_ptrs = 1; uint16_t beta_ptrs = 1;
uint8_t ptrs_symbol = 0; uint8_t ptrs_symbol = 0;
+2 -4
View File
@@ -296,7 +296,8 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
for(i=0;i<nr_sequences;i++){ for(i=0;i<nr_sequences;i++){
for (l=0;l<pucch_pdu->nr_of_symbols;l++) { for (l=0;l<pucch_pdu->nr_of_symbols;l++) {
corr_re[l]=0;corr_im[l]=0; corr_re[l]=0;
corr_im[l]=0;
seq_index = (pucch_pdu->initial_cyclic_shift+ seq_index = (pucch_pdu->initial_cyclic_shift+
mcs[i]+ mcs[i]+
gNB->pucch0_lut.lut[cs_ind][slot][l+pucch_pdu->start_symbol_index])%12; gNB->pucch0_lut.lut[cs_ind][slot][l+pucch_pdu->start_symbol_index])%12;
@@ -346,7 +347,6 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
index=maxpos; index=maxpos;
// estimate CQI for MAC (from antenna port 0 only) // estimate CQI for MAC (from antenna port 0 only)
int max_n0 = uci_stats->pucch0_n00>uci_stats->pucch0_n01 ? uci_stats->pucch0_n00:uci_stats->pucch0_n01; int max_n0 = uci_stats->pucch0_n00>uci_stats->pucch0_n01 ? uci_stats->pucch0_n00:uci_stats->pucch0_n01;
int SNRtimes10 = dB_fixed_times10(signal_energy_nodc(&rxdataF[0][pucch_pdu->start_symbol_index*frame_parms->ofdm_symbol_size+re_offset[0]],12)) - (10*max_n0); int SNRtimes10 = dB_fixed_times10(signal_energy_nodc(&rxdataF[0][pucch_pdu->start_symbol_index*frame_parms->ofdm_symbol_size+re_offset[0]],12)) - (10*max_n0);
@@ -399,7 +399,6 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
uci_stats->pucch0_positive_SR++; uci_stats->pucch0_positive_SR++;
} }
uci_stats->pucch01_trials++; uci_stats->pucch01_trials++;
} }
else { else {
uci_pdu->harq = calloc(1,sizeof(*uci_pdu->harq)); uci_pdu->harq = calloc(1,sizeof(*uci_pdu->harq));
@@ -1643,7 +1642,6 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
} }
} }
void dump_uci_stats(FILE *fd,PHY_VARS_gNB *gNB,int frame) { void dump_uci_stats(FILE *fd,PHY_VARS_gNB *gNB,int frame) {
int strpos=0; int strpos=0;
@@ -701,7 +701,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_COMBINE_SEG, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_COMBINE_SEG, VCD_FUNCTION_OUT);
dlsch->last_iteration_cnt = ret; dlsch->last_iteration_cnt = ret;
// log_dump(PHY, harq_process->b, 60, LOG_DUMP_CHAR,"nrue pdsch rx frame %d %d: ", frame, nr_slot_rx );
return(ret); return(ret);
} }
@@ -164,7 +164,6 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
/////////// ///////////
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
//log_dump(PHY, harq_process_ul_ue->a, 16, LOG_DUMP_CHAR,"nrue pusch tx frame %d %d: ", frame, slot);
/////////////////////////ULSCH scrambling///////////////////////// /////////////////////////ULSCH scrambling/////////////////////////
/////////// ///////////
+3
View File
@@ -59,6 +59,7 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
uint8_t startingSymbolIndex, uint8_t startingSymbolIndex,
uint16_t startingPRB, uint16_t startingPRB,
uint16_t secondHopPRB); uint16_t secondHopPRB);
void nr_generate_pucch1(PHY_VARS_NR_UE *ue, void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
int32_t **txdataF, int32_t **txdataF,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
@@ -73,6 +74,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
uint16_t startingPRB_intraSlotHopping, uint16_t startingPRB_intraSlotHopping,
uint8_t timeDomainOCC, uint8_t timeDomainOCC,
uint8_t nr_bit); uint8_t nr_bit);
void nr_generate_pucch2(PHY_VARS_NR_UE *ue, void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
uint16_t crnti, uint16_t crnti,
uint32_t dmrs_scrambling_id, uint32_t dmrs_scrambling_id,
@@ -88,6 +90,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
uint8_t nrofPRB, uint8_t nrofPRB,
uint16_t startingPRB, uint16_t startingPRB,
uint8_t nr_bit); uint8_t nr_bit);
void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue, void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
uint16_t crnti, uint16_t crnti,
int32_t **txdataF, int32_t **txdataF,
+1 -2
View File
@@ -121,8 +121,7 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) {
max_preamble_delay[0], max_preamble_delay[0],
gNB->prach_energy_counter); gNB->prach_energy_counter);
if ((gNB->prach_energy_counter == 100) && if ((gNB->prach_energy_counter == 100) && (max_preamble_energy[0] > gNB->measurements.prach_I0+gNB->prach_thres)) {
(max_preamble_energy[0] > gNB->measurements.prach_I0+gNB->prach_thres)) {
LOG_I(PHY,"[gNB %d][RAPROC] Frame %d, slot %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d start symbol %u freq index %u\n", LOG_I(PHY,"[gNB %d][RAPROC] Frame %d, slot %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d start symbol %u freq index %u\n",
gNB->Mod_id, gNB->Mod_id,
@@ -259,7 +259,6 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
LOG_D(PHY, "ULSCH received ok \n"); LOG_D(PHY, "ULSCH received ok \n");
nr_fill_indication(gNB,ulsch_harq->frame, ulsch_harq->slot, rdata->ulsch_id, rdata->harq_pid, 0); nr_fill_indication(gNB,ulsch_harq->frame, ulsch_harq->slot, rdata->ulsch_id, rdata->harq_pid, 0);
//log_dump(PHY, ulsch_harq->b, 16, LOG_DUMP_CHAR,"gnb pusch rx frame %d %d: ", ulsch_harq->frame, ulsch_harq->slot);
} else { } else {
LOG_D(PHY,"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d) r %d\n", LOG_D(PHY,"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d) r %d\n",
gNB->Mod_id, ulsch_harq->frame, ulsch_harq->slot, gNB->Mod_id, ulsch_harq->frame, ulsch_harq->slot,
@@ -2062,7 +2062,6 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
} else { } else {
nr_prach = nr_ue_get_rach(prach_resources, &ue->prach_vars[0]->prach_pdu, mod_id, ue->CC_id, frame_tx, gNB_id, nr_slot_tx); nr_prach = nr_ue_get_rach(prach_resources, &ue->prach_vars[0]->prach_pdu, mod_id, ue->CC_id, frame_tx, gNB_id, nr_slot_tx);
LOG_D(PHY, "In %s:[%d.%d] getting PRACH resources : %d\n", __FUNCTION__, frame_tx, nr_slot_tx,nr_prach); LOG_D(PHY, "In %s:[%d.%d] getting PRACH resources : %d\n", __FUNCTION__, frame_tx, nr_slot_tx,nr_prach);
} }
+4 -9
View File
@@ -564,10 +564,8 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
int N_CS = initial_pucch_resource[initial_pucch_id].nb_CS_indexes; int N_CS = initial_pucch_resource[initial_pucch_id].nb_CS_indexes;
/* see TS 38213 Table 9.2.1-1: PUCCH resource sets before dedicated PUCCH resource configuration */ /* see TS 38213 Table 9.2.1-1: PUCCH resource sets before dedicated PUCCH resource configuration */
BWPsize = NRRIV2BW(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.genericParameters.locationAndBandwidth, BWPsize = NRRIV2BW(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
MAX_BWP_SIZE); BWPstart = NRRIV2PRBOFFSET(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
BWPstart = NRRIV2PRBOFFSET(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.genericParameters.locationAndBandwidth,
MAX_BWP_SIZE);
int RB_BWP_offset; int RB_BWP_offset;
if (initial_pucch_id == 15) { if (initial_pucch_id == 15) {
RB_BWP_offset =BWPsize/4; RB_BWP_offset =BWPsize/4;
@@ -602,8 +600,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
/* check that current configuration is supported */ /* check that current configuration is supported */
if (mac->cg && if (mac->cg &&
mac->cg->physicalCellGroupConfig && mac->cg->physicalCellGroupConfig &&
(mac->cg->physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH != NULL || (mac->cg->physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH != NULL || mac->cg->physicalCellGroupConfig->pdsch_HARQ_ACK_Codebook != 1)) {
mac->cg->physicalCellGroupConfig->pdsch_HARQ_ACK_Codebook != 1)) {
LOG_E(PHY,"PUCCH Unsupported cell group configuration : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME); LOG_E(PHY,"PUCCH Unsupported cell group configuration : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
return(FALSE); return(FALSE);
} }
@@ -683,9 +680,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
int O_CRC = 0; int O_CRC = 0;
nb_symbols = nb_symbols_total; /* by default, it can be reduced due to symbols reserved for dmrs */ nb_symbols = nb_symbols_total; /* by default, it can be reduced due to symbols reserved for dmrs */
pucch_resource = format>1 ? pucch_resource = format>1 ? mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.array[pucch_resource_id] : 0;
mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.array[pucch_resource_id]:
0;
switch(format) { switch(format) {
case pucch_format0_nr: case pucch_format0_nr:
+4 -11
View File
@@ -386,12 +386,10 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
} }
cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation; cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation;
F1AP_ProtocolExtensionContainer_154P112_t p_154P112_t; F1AP_ProtocolExtensionContainer_154P112_t p_154P112_t;
memset((void *)&p_154P112_t, 0, sizeof(F1AP_ProtocolExtensionContainer_154P112_t)); memset((void *)&p_154P112_t, 0, sizeof(F1AP_ProtocolExtensionContainer_154P112_t));
ASN_SEQUENCE_ADD(&p_154P112_t.list, ASN_SEQUENCE_ADD(&p_154P112_t.list, cells_to_be_activated_list_itemExtIEs);
cells_to_be_activated_list_itemExtIEs);
cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_154P112_t; cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_154P112_t;
free(gNB_CUSystemInformation); free(gNB_CUSystemInformation);
@@ -399,8 +397,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
} }
/* ADD */ /* ADD */
cells_to_be_activated_list_item_ies->value.choice.Cells_to_be_Activated_List_Item = cells_to_be_activated_list_item; cells_to_be_activated_list_item_ies->value.choice.Cells_to_be_Activated_List_Item = cells_to_be_activated_list_item;
ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Activated_List.list, ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Activated_List.list, cells_to_be_activated_list_item_ies);
cells_to_be_activated_list_item_ies);
} }
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
} }
@@ -571,9 +568,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
ie->criticality = F1AP_Criticality_reject; ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Activated_List; ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Activated_List;
for (i=0; for (i=0; i<f1ap_gnb_cu_configuration_update->num_cells_to_activate; i++) {
i<f1ap_gnb_cu_configuration_update->num_cells_to_activate;
i++) {
F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies;
cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemIEs_t)); cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemIEs_t));
@@ -833,8 +828,6 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
gnb_cu_tnl_association_to_update_item_ies); gnb_cu_tnl_association_to_update_item_ies);
} }
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
*/ */
/* /*
@@ -943,7 +936,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
return -1; return -1;
} }
printf("F1AP gNB-CU CONFIGURATION UPDATE : "); LOG_I(F1AP, "F1AP gNB-CU CONFIGURATION UPDATE : ");
for (int i=0;i<len;i++) printf("%02x ",buffer[i]); for (int i=0;i<len;i++) printf("%02x ",buffer[i]);
printf("\n"); printf("\n");
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data_from_du->assoc_id, buffer, len, 0); cu_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data_from_du->assoc_id, buffer, len, 0);
@@ -169,7 +169,6 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
} }
} }
} }
AssertFatal(rrc_inst>=0,"couldn't find an RRC instance for nr_cell %llu\n",(unsigned long long int)nr_cellid); AssertFatal(rrc_inst>=0,"couldn't find an RRC instance for nr_cell %llu\n",(unsigned long long int)nr_cellid);
int f1ap_uid = f1ap_add_ue(&f1ap_cu_inst[rrc_inst], rrc_inst, CC_id, 0, rnti); int f1ap_uid = f1ap_add_ue(&f1ap_cu_inst[rrc_inst], rrc_inst, CC_id, 0, rnti);
@@ -440,7 +440,6 @@ if (0) {
DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Scalar = 1L; DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Scalar = 1L;
DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Exponent = 6L; DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Exponent = 6L;
/* OPTIONAL */ /* OPTIONAL */
/* delayCritical */ /* delayCritical */
if (0) { if (0) {
@@ -583,6 +582,7 @@ if (0) {
/* packetErrorRate */ /* packetErrorRate */
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Scalar = 1L; flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Scalar = 1L;
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Exponent = 6L; flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Exponent = 6L;
/* OPTIONAL */ /* OPTIONAL */
/* delayCritical */ /* delayCritical */
if (0) { if (0) {
@@ -740,7 +740,6 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &servedPLMN_item->pLMN_Identity); MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &servedPLMN_item->pLMN_Identity);
ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, servedPLMN_item); ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, servedPLMN_item);
// // /* - CHOICE NR-MODE-Info */ // // /* - CHOICE NR-MODE-Info */
F1AP_NR_Mode_Info_t nR_Mode_Info; F1AP_NR_Mode_Info_t nR_Mode_Info;
@@ -903,8 +902,6 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &servedPLMN_item->pLMN_Identity); MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &servedPLMN_item->pLMN_Identity);
ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, servedPLMN_item); ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, servedPLMN_item);
// // /* - CHOICE NR-MODE-Info */ // // /* - CHOICE NR-MODE-Info */
F1AP_NR_Mode_Info_t nR_Mode_Info; F1AP_NR_Mode_Info_t nR_Mode_Info;
+1 -4
View File
@@ -883,13 +883,10 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
ie->id = F1AP_ProtocolIE_ID_id_DUtoCURRCContainer; ie->id = F1AP_ProtocolIE_ID_id_DUtoCURRCContainer;
ie->criticality = F1AP_Criticality_reject; ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_DUtoCURRCContainer; ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_DUtoCURRCContainer;
OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCContainer, OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCContainer, (char *)sdu2P, sdu2_lenP);
(char *)sdu2P,
sdu2_lenP);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
} }
/* encode */ /* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 INITIAL UL RRC MESSAGE TRANSFER\n"); LOG_E(F1AP, "Failed to encode F1 INITIAL UL RRC MESSAGE TRANSFER\n");
+1 -2
View File
@@ -191,8 +191,7 @@ void *F1AP_DU_task(void *arg) {
msg->rrc_container, msg->rrc_container,
msg->rrc_container_length, msg->rrc_container_length,
msg->du2cu_rrc_container, msg->du2cu_rrc_container,
msg->du2cu_rrc_container_length msg->du2cu_rrc_container_length);
);
break; break;
case F1AP_UL_RRC_MESSAGE: // to rrc case F1AP_UL_RRC_MESSAGE: // to rrc
-1
View File
@@ -181,7 +181,6 @@ void *gNB_app_task(void *args_p)
LOG_I(PHY, "%s() Task ready initialize structures\n", __FUNCTION__); LOG_I(PHY, "%s() Task ready initialize structures\n", __FUNCTION__);
if (RC.nb_nr_macrlc_inst>0) RCconfig_nr_macrlc(); if (RC.nb_nr_macrlc_inst>0) RCconfig_nr_macrlc();
LOG_I(PHY, "%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst); LOG_I(PHY, "%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst);
+3 -3
View File
@@ -134,7 +134,6 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
} }
} }
LOG_D(MAC,"system frame number(6 MSB bits): %d\n", mac->mib->systemFrameNumber.buf[0]); LOG_D(MAC,"system frame number(6 MSB bits): %d\n", mac->mib->systemFrameNumber.buf[0]);
LOG_D(MAC,"system frame number(with LSB): %d\n", (int)frame); LOG_D(MAC,"system frame number(with LSB): %d\n", (int)frame);
LOG_D(MAC,"subcarrier spacing (0=15or60, 1=30or120): %d\n", (int)mac->mib->subCarrierSpacingCommon); LOG_D(MAC,"subcarrier spacing (0=15or60, 1=30or120): %d\n", (int)mac->mib->subCarrierSpacingCommon);
@@ -419,7 +418,6 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac,
} }
LOG_D(NR_MAC,"start_symbol = %i\n", pusch_config_pdu->start_symbol_index); LOG_D(NR_MAC,"start_symbol = %i\n", pusch_config_pdu->start_symbol_index);
LOG_D(NR_MAC,"number_symbols = %i\n", pusch_config_pdu->nr_of_symbols); LOG_D(NR_MAC,"number_symbols = %i\n", pusch_config_pdu->nr_of_symbols);
} }
return 0; return 0;
} }
@@ -1230,9 +1228,11 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
//Identifier for DCI formats //Identifier for DCI formats
pos++; pos++;
dci_pdu_rel15->format_indicator = (*dci_pdu>>(dci_size-pos))&1; dci_pdu_rel15->format_indicator = (*dci_pdu>>(dci_size-pos))&1;
if (dci_pdu_rel15->format_indicator == 0)
//switch to DCI_0_0 //switch to DCI_0_0
if (dci_pdu_rel15->format_indicator == 0)
return 2+nr_extract_dci_info(mac, NR_UL_DCI_FORMAT_0_0, dci_size, rnti, dci_pdu, dci_pdu_rel15); return 2+nr_extract_dci_info(mac, NR_UL_DCI_FORMAT_0_0, dci_size, rnti, dci_pdu, dci_pdu_rel15);
#ifdef DEBUG_EXTRACT_DCI #ifdef DEBUG_EXTRACT_DCI
LOG_D(MAC,"Format indicator %d (%d bits) N_RB_BWP %d => %d (0x%lx)\n",dci_pdu_rel15->format_indicator,1,N_RB,dci_size-pos,*dci_pdu); LOG_D(MAC,"Format indicator %d (%d bits) N_RB_BWP %d => %d (0x%lx)\n",dci_pdu_rel15->format_indicator,1,N_RB,dci_size-pos,*dci_pdu);
#endif #endif
+3 -4
View File
@@ -620,8 +620,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
int target_ss; int target_ss;
bool valid_ptrs_setup = 0; bool valid_ptrs_setup = 0;
uint16_t n_RB_ULBWP; uint16_t n_RB_ULBWP;
if (mac->ULbwp[0] && if (mac->ULbwp[0] && mac->ULbwp[0]->bwp_Common) {
mac->ULbwp[0]->bwp_Common) {
n_RB_ULBWP = NRRIV2BW(mac->ULbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); n_RB_ULBWP = NRRIV2BW(mac->ULbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
pusch_config_pdu->bwp_start = NRRIV2PRBOFFSET(mac->ULbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); pusch_config_pdu->bwp_start = NRRIV2PRBOFFSET(mac->ULbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
} }
@@ -989,7 +988,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id], mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id],
ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator, ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator,
TBS_bytes, TBS_bytes,
ra->ra_state ); ra->ra_state);
if (ra->ra_state == WAIT_RAR && !ra->cfra){ if (ra->ra_state == WAIT_RAR && !ra->cfra){
memcpy(ulsch_input_buffer, mac->ulsch_pdu.payload, TBS_bytes); memcpy(ulsch_input_buffer, mac->ulsch_pdu.payload, TBS_bytes);
LOG_D(NR_MAC,"[RAPROC] Msg3 to be transmitted:\n"); LOG_D(NR_MAC,"[RAPROC] Msg3 to be transmitted:\n");
@@ -1088,6 +1087,7 @@ int nr_ue_pusch_scheduler(NR_UE_MAC_INST_t *mac,
int delta = 0; int delta = 0;
NR_BWP_Uplink_t *ubwp = mac->ULbwp[0]; NR_BWP_Uplink_t *ubwp = mac->ULbwp[0];
// Get the numerology to calculate the Tx frame and slot // Get the numerology to calculate the Tx frame and slot
int mu = ubwp ? int mu = ubwp ?
ubwp->bwp_Common->genericParameters.subcarrierSpacing : ubwp->bwp_Common->genericParameters.subcarrierSpacing :
@@ -1823,7 +1823,6 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s
ra->generate_nr_prach = GENERATE_IDLE; // Reset flag for PRACH generation ra->generate_nr_prach = GENERATE_IDLE; // Reset flag for PRACH generation
NR_TDD_UL_DL_ConfigCommon_t *tdd_config = scc==NULL ? scc_SIB->tdd_UL_DL_ConfigurationCommon : scc->tdd_UL_DL_ConfigurationCommon; NR_TDD_UL_DL_ConfigCommon_t *tdd_config = scc==NULL ? scc_SIB->tdd_UL_DL_ConfigurationCommon : scc->tdd_UL_DL_ConfigurationCommon;
if (is_nr_UL_slot(tdd_config, slotP, mac->frame_type)) { if (is_nr_UL_slot(tdd_config, slotP, mac->frame_type)) {
// WIP Need to get the proper selected ssb_idx // WIP Need to get the proper selected ssb_idx
@@ -1197,7 +1197,7 @@ bool nr_acknack_scheduling(int mod_id,
memset(pucch, 0, sizeof(*pucch)); memset(pucch, 0, sizeof(*pucch));
pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f; pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f;
pucch->ul_slot = (s + 1) % n_slots_frame; pucch->ul_slot = (s + 1) % n_slots_frame;
return nr_acknack_scheduling(mod_id, UE_id, frame, slot,pucch->r_pucch); return nr_acknack_scheduling(mod_id, UE_id, frame, slot, pucch->r_pucch);
} }
pucch->timing_indicator = i; pucch->timing_indicator = i;
@@ -566,6 +566,7 @@ void handle_nr_ul_harq(module_id_t mod_id,
add_tail_nr_list(&sched_ctrl->retrans_ul_harq, harq_pid); add_tail_nr_list(&sched_ctrl->retrans_ul_harq, harq_pid);
} }
} }
/* /*
* When data are received on PHY and transmitted to MAC * When data are received on PHY and transmitted to MAC
*/ */
@@ -662,7 +663,6 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
} }
} else if(sduP) { } else if(sduP) {
bool no_sig = true; bool no_sig = true;
for (int k = 0; k < sdu_lenP; k++) { for (int k = 0; k < sdu_lenP; k++) {
if(sduP[k]!=0) { if(sduP[k]!=0) {
-1
View File
@@ -80,7 +80,6 @@
#define NR_NB_RA_PROC_MAX 4 #define NR_NB_RA_PROC_MAX 4
#define MAX_NUM_OF_SSB 64 #define MAX_NUM_OF_SSB 64
/*! \brief NR_list_t is a "list" (of users, HARQ processes, slices, ...). /*! \brief NR_list_t is a "list" (of users, HARQ processes, slices, ...).
* Especially useful in the scheduler and to keep "classes" of users. */ * Especially useful in the scheduler and to keep "classes" of users. */
typedef struct { typedef struct {
+5 -7
View File
@@ -49,8 +49,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity,
return; return;
} }
if (entity->type != NR_PDCP_SRB && if (entity->type != NR_PDCP_SRB && !(buffer[0] & 0x80)) {
!(buffer[0] & 0x80)) {
LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__); LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
exit(1); exit(1);
} }
@@ -66,8 +65,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity,
header_size = 3; header_size = 3;
} }
/* SRBs always have MAC-I, even if integrity is not active */ /* SRBs always have MAC-I, even if integrity is not active */
if (entity->has_integrity if (entity->has_integrity || entity->type == NR_PDCP_SRB) {
|| entity->type == NR_PDCP_SRB) {
integrity_size = 4; integrity_size = 4;
} else { } else {
integrity_size = 0; integrity_size = 0;
@@ -182,8 +180,7 @@ static void nr_pdcp_entity_recv_sdu(nr_pdcp_entity_t *entity,
} }
/* SRBs always have MAC-I, even if integrity is not active */ /* SRBs always have MAC-I, even if integrity is not active */
if (entity->has_integrity if (entity->has_integrity || entity->type == NR_PDCP_SRB) {
|| entity->type == NR_PDCP_SRB) {
integrity_size = 4; integrity_size = 4;
} else { } else {
integrity_size = 0; integrity_size = 0;
@@ -196,8 +193,9 @@ static void nr_pdcp_entity_recv_sdu(nr_pdcp_entity_t *entity,
(unsigned char *)buf + header_size + size, (unsigned char *)buf + header_size + size,
(unsigned char *)buf, header_size + size, (unsigned char *)buf, header_size + size,
entity->rb_id, count, entity->is_gnb ? 1 : 0); entity->rb_id, count, entity->is_gnb ? 1 : 0);
// set MAC-I to 0 for SRBs with integrity not active
else if (integrity_size == 4) else if (integrity_size == 4)
/* set MAC-I to 0 for SRBs with integrity not active */
memset(buf + header_size + size, 0, 4); memset(buf + header_size + size, 0, 4);
if (entity->has_ciphering) if (entity->has_ciphering)
+2
View File
@@ -40,6 +40,7 @@ typedef struct nr_pdcp_entity_t {
void (*recv_sdu)(struct nr_pdcp_entity_t *entity, char *buffer, int size, void (*recv_sdu)(struct nr_pdcp_entity_t *entity, char *buffer, int size,
int sdu_id); int sdu_id);
void (*delete)(struct nr_pdcp_entity_t *entity); void (*delete)(struct nr_pdcp_entity_t *entity);
/* set_security: pass -1 to integrity_algorithm / ciphering_algorithm /* set_security: pass -1 to integrity_algorithm / ciphering_algorithm
* to keep the current algorithm * to keep the current algorithm
* pass NULL to integrity_key / ciphering_key * pass NULL to integrity_key / ciphering_key
@@ -50,6 +51,7 @@ typedef struct nr_pdcp_entity_t {
char *integrity_key, char *integrity_key,
int ciphering_algorithm, int ciphering_algorithm,
char *ciphering_key); char *ciphering_key);
void (*set_time)(struct nr_pdcp_entity_t *entity, uint64_t now); void (*set_time)(struct nr_pdcp_entity_t *entity, uint64_t now);
/* callbacks provided to the PDCP module */ /* callbacks provided to the PDCP module */
+2 -7
View File
@@ -960,7 +960,6 @@ boolean_t rrc_pdcp_config_asn1_req(
return 0; return 0;
} }
void nr_DRB_preconfiguration(uint16_t crnti) void nr_DRB_preconfiguration(uint16_t crnti)
{ {
@@ -1056,7 +1055,6 @@ void nr_DRB_preconfiguration(uint16_t crnti)
} }
uint64_t get_pdcp_optmask(void) uint64_t get_pdcp_optmask(void)
{ {
return pdcp_optmask; return pdcp_optmask;
@@ -1118,7 +1116,6 @@ void pdcp_config_set_security(
nr_pdcp_manager_unlock(nr_pdcp_ue_manager); nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
} }
static boolean_t pdcp_data_req_srb( static boolean_t pdcp_data_req_srb(
protocol_ctxt_t *ctxt_pP, protocol_ctxt_t *ctxt_pP,
const rb_id_t rb_id, const rb_id_t rb_id,
@@ -1227,12 +1224,10 @@ boolean_t pdcp_data_req(
) )
{ {
if (srb_flagP) { if (srb_flagP) {
return pdcp_data_req_srb(ctxt_pP, rb_id, muiP, confirmP, sdu_buffer_size, return pdcp_data_req_srb(ctxt_pP, rb_id, muiP, confirmP, sdu_buffer_size, sdu_buffer);
sdu_buffer);
} }
else{ else{
return pdcp_data_req_drb(ctxt_pP, rb_id, muiP, confirmP, sdu_buffer_size, return pdcp_data_req_drb(ctxt_pP, rb_id, muiP, confirmP, sdu_buffer_size, sdu_buffer);
sdu_buffer);
} }
} }
-1
View File
@@ -1042,4 +1042,3 @@ void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
mem_block_t *sdu_pP){ mem_block_t *sdu_pP){
} }
+1 -2
View File
@@ -318,8 +318,7 @@ mac_rrc_data_ind(
sduP, sduP,
sdu_lenP, sdu_lenP,
NULL, NULL,
0 0);
);
return(0); return(0);
} }
+1 -4
View File
@@ -44,10 +44,7 @@
#include "NR_MIB.h" #include "NR_MIB.h"
#include "NR_BCCH-BCH-Message.h" #include "NR_BCCH-BCH-Message.h"
#include "rrc_gNB_UE_context.h" #include "rrc_gNB_UE_context.h"
#include <openair2/RRC/NR/MESSAGES/asn1_msg.h> #include "openair2/RRC/NR/MESSAGES/asn1_msg.h"
#include "RRC/NR/MESSAGES/asn1_msg.h"
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
+1 -4
View File
@@ -1214,7 +1214,6 @@ void fill_initial_cellGroupConfig(rnti_t rnti,
//} //}
rlc_BearerConfig->rlc_Config = rlc_Config; rlc_BearerConfig->rlc_Config = rlc_Config;
//if (0) { //if (0) {
logicalChannelConfig = calloc(1, sizeof(NR_LogicalChannelConfig_t)); logicalChannelConfig = calloc(1, sizeof(NR_LogicalChannelConfig_t));
logicalChannelConfig->ul_SpecificParameters = calloc(1, sizeof(*logicalChannelConfig->ul_SpecificParameters)); logicalChannelConfig->ul_SpecificParameters = calloc(1, sizeof(*logicalChannelConfig->ul_SpecificParameters));
@@ -1432,7 +1431,6 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
LOG_D(NR_RRC,"RRCSetup Encoded %zd bits (%zd bytes)\n", LOG_D(NR_RRC,"RRCSetup Encoded %zd bits (%zd bytes)\n",
enc_rval.encoded,(enc_rval.encoded+7)/8); enc_rval.encoded,(enc_rval.encoded+7)/8);
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
uint8_t do_NR_SecurityModeCommand( uint8_t do_NR_SecurityModeCommand(
@@ -1636,8 +1634,7 @@ int16_t do_RRCReconfiguration(
NR_SecurityConfig_t *security_config, NR_SecurityConfig_t *security_config,
NR_SDAP_Config_t *sdap_config, NR_SDAP_Config_t *sdap_config,
NR_MeasConfig_t *meas_config, NR_MeasConfig_t *meas_config,
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
*dedicatedNAS_MessageList,
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig, NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
NR_CellGroupConfig_t *cellGroupConfig) NR_CellGroupConfig_t *cellGroupConfig)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
+3 -2
View File
@@ -104,6 +104,7 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
const uint8_t transaction_id, const uint8_t transaction_id,
OCTET_STRING_t *masterCellGroup_from_DU, OCTET_STRING_t *masterCellGroup_from_DU,
NR_ServingCellConfigCommon_t *scc); NR_ServingCellConfigCommon_t *scc);
uint8_t do_NR_SecurityModeCommand( uint8_t do_NR_SecurityModeCommand(
const protocol_ctxt_t *const ctxt_pP, const protocol_ctxt_t *const ctxt_pP,
uint8_t *const buffer, uint8_t *const buffer,
@@ -117,6 +118,7 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
uint8_t do_NR_RRCRelease(uint8_t *buffer, uint8_t do_NR_RRCRelease(uint8_t *buffer,
uint8_t Transaction_id); uint8_t Transaction_id);
int16_t do_RRCReconfiguration( int16_t do_RRCReconfiguration(
const protocol_ctxt_t *const ctxt_pP, const protocol_ctxt_t *const ctxt_pP,
uint8_t *buffer, uint8_t *buffer,
@@ -127,8 +129,7 @@ int16_t do_RRCReconfiguration(
NR_SecurityConfig_t *security_config, NR_SecurityConfig_t *security_config,
NR_SDAP_Config_t *sdap_config, NR_SDAP_Config_t *sdap_config,
NR_MeasConfig_t *meas_config, NR_MeasConfig_t *meas_config,
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
*dedicatedNAS_MessageList,
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig, NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
NR_CellGroupConfig_t *cellGroupConfig); NR_CellGroupConfig_t *cellGroupConfig);
+2 -2
View File
@@ -801,8 +801,8 @@ rrc_gNB_generate_defaultRRCReconfiguration(
memset(buffer, 0, RRC_BUF_SIZE); memset(buffer, 0, RRC_BUF_SIZE);
size = do_RRCReconfiguration(ctxt_pP, buffer, size = do_RRCReconfiguration(ctxt_pP, buffer,
xid, xid,
NULL,//*SRB_configList2, NULL, //*SRB_configList2,
NULL,//*DRB_configList, NULL, //*DRB_configList,
NULL, NULL,
NULL, NULL,
NULL, NULL,
-2
View File
@@ -490,7 +490,6 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ(
itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, message_p); itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, message_p);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
int int
rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ( rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(
@@ -736,7 +735,6 @@ rrc_gNB_process_NGAP_DOWNLINK_NAS(
struct rrc_gNB_ue_context_s *ue_context_p = NULL; struct rrc_gNB_ue_context_s *ue_context_p = NULL;
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
memset(&ctxt, 0, sizeof(protocol_ctxt_t)); memset(&ctxt, 0, sizeof(protocol_ctxt_t));
ue_initial_id = NGAP_DOWNLINK_NAS (msg_p).ue_initial_id; ue_initial_id = NGAP_DOWNLINK_NAS (msg_p).ue_initial_id;
gNB_ue_ngap_id = NGAP_DOWNLINK_NAS (msg_p).gNB_ue_ngap_id; gNB_ue_ngap_id = NGAP_DOWNLINK_NAS (msg_p).gNB_ue_ngap_id;
ue_context_p = rrc_gNB_get_ue_context_from_ngap_ids(instance, ue_initial_id, gNB_ue_ngap_id); ue_context_p = rrc_gNB_get_ue_context_from_ngap_ids(instance, ue_initial_id, gNB_ue_ngap_id);
+1 -2
View File
@@ -585,7 +585,6 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(
return 0; return 0;
} }
const char siWindowLength[10][5] = {"5s", "10s", "20s", "40s", "80s", "160s", "320s", "640s", "1280s","ERR"};// {"1ms","2ms","5ms","10ms","15ms","20ms","40ms","80ms","ERR"}; const char siWindowLength[10][5] = {"5s", "10s", "20s", "40s", "80s", "160s", "320s", "640s", "1280s","ERR"};// {"1ms","2ms","5ms","10ms","15ms","20ms","40ms","80ms","ERR"};
const short siWindowLength_int[9] = {5,10,20,40,80,160,320,640,1280};//{1,2,5,10,15,20,40,80}; const short siWindowLength_int[9] = {5,10,20,40,80,160,320,640,1280};//{1,2,5,10,15,20,40,80};
@@ -1266,7 +1265,6 @@ nr_rrc_ue_process_masterCellGroup(
// NSA procedures // NSA procedures
} }
if( cellGroupConfig->rlc_BearerToReleaseList != NULL){ if( cellGroupConfig->rlc_BearerToReleaseList != NULL){
//TODO (perform RLC bearer release as specified in 5.3.5.5.3) //TODO (perform RLC bearer release as specified in 5.3.5.5.3)
} }
@@ -1354,6 +1352,7 @@ static void rrc_ue_generate_RRCSetupComplete(
for (int i=0;i<size;i++) printf("%02x ",buffer[i]); for (int i=0;i<size;i++) printf("%02x ",buffer[i]);
printf("\n"); printf("\n");
// ctxt_pP_local.rnti = ctxt_pP->rnti; // ctxt_pP_local.rnti = ctxt_pP->rnti;
rrc_data_req_ue( rrc_data_req_ue(
ctxt_pP, ctxt_pP,
+1 -1
View File
@@ -404,7 +404,7 @@ int create_tasks_nrue(uint32_t ue_nb) {
return -1; return -1;
} }
printf("create TASK_NAS_NRUE\n"); LOG_I(NR_RRC,"create TASK_NAS_NRUE\n");
if (itti_create_task (TASK_NAS_NRUE, nas_nrue_task, NULL) < 0) { if (itti_create_task (TASK_NAS_NRUE, nas_nrue_task, NULL) < 0) {
LOG_E(NR_RRC, "Create task for NAS UE failed\n"); LOG_E(NR_RRC, "Create task for NAS UE failed\n");
return -1; return -1;
-1
View File
@@ -47,7 +47,6 @@ uint8_t k[16] = {0x51, 0x22, 0x25, 0x02, 0x14,0xc3, 0x3e, 0x72, 0x3a, 0x5d, 0xd5
// OPC: 981d464c7c52eb6e5036234984ad0bcf // OPC: 981d464c7c52eb6e5036234984ad0bcf
const uint8_t opc[16] = {0x98, 0x1d, 0x46, 0x4c,0x7c,0x52,0xeb, 0x6e, 0x50, 0x36, 0x23, 0x49, 0x84, 0xad, 0x0b, 0xcf};*/ const uint8_t opc[16] = {0x98, 0x1d, 0x46, 0x4c,0x7c,0x52,0xeb, 0x6e, 0x50, 0x36, 0x23, 0x49, 0x84, 0xad, 0x0b, 0xcf};*/
char netName[] = "5G:mnc099.mcc208.3gppnetwork.org"; char netName[] = "5G:mnc099.mcc208.3gppnetwork.org";
char imsi[] = "2089900007487"; //"208990100001100"; char imsi[] = "2089900007487"; //"208990100001100";
// USIM_API_K: fe c8 6b a6 eb 70 7e d0 89 05 75 7b 1b b4 4b 8f // USIM_API_K: fe c8 6b a6 eb 70 7e d0 89 05 75 7b 1b b4 4b 8f
-2
View File
@@ -121,10 +121,8 @@ static int gtpv1uCreateAndSendMsg(int h, uint32_t peerIp, uint16_t peerPort, te
msgHdr->version=1; msgHdr->version=1;
msgHdr->msgType=GTP_GPDU; msgHdr->msgType=GTP_GPDU;
msgHdr->msgLength=htons(msgLen); msgHdr->msgLength=htons(msgLen);
if ( seqNumFlag || extHdrFlag || npduNumFlag) if ( seqNumFlag || extHdrFlag || npduNumFlag)
msgHdr->msgLength+=4; msgHdr->msgLength+=4;
msgHdr->teid=htonl(teid); msgHdr->teid=htonl(teid);
if(seqNumFlag || extHdrFlag || npduNumFlag) { if(seqNumFlag || extHdrFlag || npduNumFlag) {