Code format improvements in differences for develop
This commit is contained in:
@@ -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);
|
||||
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) {
|
||||
|
||||
int inst;
|
||||
|
||||
+1
-1
@@ -1979,7 +1979,7 @@ void RCconfig_RU(void)
|
||||
}
|
||||
else {
|
||||
LOG_I(PHY,"Setting time source to internal\n");
|
||||
RC.ru[j]->openair0_cfg.time_source = internal;
|
||||
RC.ru[j]->openair0_cfg.time_source = internal;
|
||||
}
|
||||
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) {
|
||||
|
||||
@@ -745,10 +745,6 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
// don't create if node doesn't connect to RRC/S1/GTP
|
||||
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 */
|
||||
/*
|
||||
RCconfig_nr_flexran();
|
||||
|
||||
+4
-2
@@ -715,11 +715,13 @@ void *UE_thread(void *arg) {
|
||||
if (openair0_cfg[0].duplex_mode == duplex_mode_TDD) {
|
||||
|
||||
uint8_t tdd_period = mac->phy_config.config_req.tdd_table.tdd_period_in_slots;
|
||||
|
||||
int nrofUplinkSlots = 0;
|
||||
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)
|
||||
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 first_tx_slot = tdd_period - num_UL_slots;
|
||||
|
||||
|
||||
@@ -183,6 +183,7 @@ struct timespec clock_difftime(struct timespec start, struct timespec end) {
|
||||
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);
|
||||
}
|
||||
|
||||
int create_tasks_nrue(uint32_t ue_nb) {
|
||||
LOG_D(NR_RRC, "%s(ue_nb:%d)\n", __FUNCTION__, ue_nb);
|
||||
itti_wait_ready(1);
|
||||
|
||||
@@ -255,10 +255,7 @@ void nr_fill_dci(PHY_VARS_gNB *gNB,
|
||||
dlsch->harq_mask |= (1<<harq_pid);
|
||||
dlsch->rnti = pdcch_pdu_rel15->dci_pdu[i].RNTI;
|
||||
|
||||
// nr_fill_cce_list(gNB,0);
|
||||
|
||||
|
||||
|
||||
// nr_fill_cce_list(gNB,0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -82,7 +82,6 @@ void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
|
||||
|
||||
s=lte_gold_generic(&x1, &x2, 1);
|
||||
|
||||
|
||||
#if defined(__AVX2__)
|
||||
for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++) {
|
||||
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;
|
||||
int16_t mod_dmrs[14][n_dmrs<<1] __attribute__ ((aligned(16)));
|
||||
|
||||
|
||||
/* PTRS */
|
||||
uint16_t beta_ptrs = 1;
|
||||
uint8_t ptrs_symbol = 0;
|
||||
|
||||
@@ -296,7 +296,8 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
||||
|
||||
for(i=0;i<nr_sequences;i++){
|
||||
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+
|
||||
mcs[i]+
|
||||
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;
|
||||
|
||||
|
||||
// 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 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->pucch01_trials++;
|
||||
|
||||
}
|
||||
else {
|
||||
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) {
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -218,12 +218,12 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
|
||||
k *= 2;
|
||||
|
||||
LOG_I(PHY, "PRACH [UE %d] in slot %d, placing PRACH in position %d, msg1 frequency start %d (k1 %d), preamble_offset %d, first_nonzero_root_idx %d\n", Mod_id,
|
||||
slot,
|
||||
k,
|
||||
n_ra_prb,
|
||||
nrUE_config->prach_config.num_prach_fd_occasions_list[fd_occasion].k1,
|
||||
preamble_offset,
|
||||
first_nonzero_root_idx);
|
||||
slot,
|
||||
k,
|
||||
n_ra_prb,
|
||||
nrUE_config->prach_config.num_prach_fd_occasions_list[fd_occasion].k1,
|
||||
preamble_offset,
|
||||
first_nonzero_root_idx);
|
||||
|
||||
Xu = (int16_t*)ue->X_u[preamble_offset-first_nonzero_root_idx];
|
||||
|
||||
|
||||
@@ -164,8 +164,7 @@ 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/////////////////////////
|
||||
///////////
|
||||
|
||||
@@ -365,7 +364,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
|
||||
// TODO: performance improvement, we can skip the modulation of DMRS symbols outside the bandwidth part
|
||||
// Perform this on gold sequence, not required when SC FDMA operation is done,
|
||||
LOG_D(PHY,"DMRS in symbol %d\n",l);
|
||||
LOG_D(PHY,"DMRS in symbol %d\n",l);
|
||||
nr_modulation(pusch_dmrs[l][0], n_dmrs*2, DMRS_MOD_ORDER, mod_dmrs); // currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
|
||||
|
||||
} else {
|
||||
|
||||
@@ -54,11 +54,12 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
|
||||
int16_t amp,
|
||||
int nr_slot_tx,
|
||||
uint8_t m0,
|
||||
uint8_t mcs,
|
||||
uint8_t mcs,
|
||||
uint8_t nrofSymbols,
|
||||
uint8_t startingSymbolIndex,
|
||||
uint16_t startingPRB,
|
||||
uint16_t secondHopPRB);
|
||||
uint16_t secondHopPRB);
|
||||
|
||||
void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
|
||||
int32_t **txdataF,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
@@ -73,10 +74,11 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
|
||||
uint16_t startingPRB_intraSlotHopping,
|
||||
uint8_t timeDomainOCC,
|
||||
uint8_t nr_bit);
|
||||
|
||||
void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
|
||||
uint16_t crnti,
|
||||
uint32_t dmrs_scrambling_id,
|
||||
uint32_t data_scrambling_id,
|
||||
uint32_t dmrs_scrambling_id,
|
||||
uint32_t data_scrambling_id,
|
||||
int32_t **txdataF,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
PUCCH_CONFIG_DEDICATED *pucch_config_dedicated,
|
||||
@@ -88,6 +90,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
|
||||
uint8_t nrofPRB,
|
||||
uint16_t startingPRB,
|
||||
uint8_t nr_bit);
|
||||
|
||||
void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
|
||||
uint16_t crnti,
|
||||
int32_t **txdataF,
|
||||
|
||||
@@ -121,8 +121,7 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) {
|
||||
max_preamble_delay[0],
|
||||
gNB->prach_energy_counter);
|
||||
|
||||
if ((gNB->prach_energy_counter == 100) &&
|
||||
(max_preamble_energy[0] > gNB->measurements.prach_I0+gNB->prach_thres)) {
|
||||
if ((gNB->prach_energy_counter == 100) && (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",
|
||||
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");
|
||||
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 {
|
||||
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,
|
||||
|
||||
@@ -274,7 +274,7 @@ int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config){
|
||||
if(phy_config != NULL) {
|
||||
memcpy(nrUE_config,&phy_config->config_req,sizeof(fapi_nr_config_request_t));
|
||||
if (PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->UE_mode[0] == NOT_SYNCHED)
|
||||
PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->UE_mode[0] = PRACH;
|
||||
PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->UE_mode[0] = PRACH;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2062,7 +2062,6 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
|
||||
|
||||
} 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);
|
||||
LOG_D(PHY, "In %s:[%d.%d] getting PRACH resources : %d\n", __FUNCTION__, frame_tx, nr_slot_tx,nr_prach);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
/* 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,
|
||||
MAX_BWP_SIZE);
|
||||
BWPstart = NRRIV2PRBOFFSET(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.genericParameters.locationAndBandwidth,
|
||||
MAX_BWP_SIZE);
|
||||
BWPsize = NRRIV2BW(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;
|
||||
if (initial_pucch_id == 15) {
|
||||
RB_BWP_offset =BWPsize/4;
|
||||
@@ -601,9 +599,8 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
|
||||
else if ((pucch_resource_set != MAX_NB_OF_PUCCH_RESOURCE_SETS) && (pucch_resource_id != MAX_NB_OF_PUCCH_RESOURCES)) {
|
||||
/* check that current configuration is supported */
|
||||
if (mac->cg &&
|
||||
mac->cg->physicalCellGroupConfig &&
|
||||
(mac->cg->physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH != NULL ||
|
||||
mac->cg->physicalCellGroupConfig->pdsch_HARQ_ACK_Codebook != 1)) {
|
||||
mac->cg->physicalCellGroupConfig &&
|
||||
(mac->cg->physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH != NULL || 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);
|
||||
return(FALSE);
|
||||
}
|
||||
@@ -618,17 +615,17 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
|
||||
}
|
||||
NR_PUCCH_Config_t *pucch_Config;
|
||||
if (bwp_id>0 &&
|
||||
mac->ULbwp[bwp_id-1] &&
|
||||
mac->ULbwp[bwp_id-1]->bwp_Dedicated &&
|
||||
mac->ULbwp[bwp_id-1] &&
|
||||
mac->ULbwp[bwp_id-1]->bwp_Dedicated &&
|
||||
mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config &&
|
||||
mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup)
|
||||
pucch_Config = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup;
|
||||
else if (bwp_id==0 &&
|
||||
mac->cg &&
|
||||
mac->cg->spCellConfig &&
|
||||
mac->cg->spCellConfig->spCellConfigDedicated &&
|
||||
mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig &&
|
||||
mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP &&
|
||||
mac->cg &&
|
||||
mac->cg->spCellConfig &&
|
||||
mac->cg->spCellConfig->spCellConfigDedicated &&
|
||||
mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig &&
|
||||
mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP &&
|
||||
mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config &&
|
||||
mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup) {
|
||||
pucch_Config = mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup;
|
||||
@@ -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;
|
||||
|
||||
nb_symbols = nb_symbols_total; /* by default, it can be reduced due to symbols reserved for dmrs */
|
||||
pucch_resource = format>1 ?
|
||||
mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.array[pucch_resource_id]:
|
||||
0;
|
||||
pucch_resource = format>1 ? mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.array[pucch_resource_id] : 0;
|
||||
|
||||
switch(format) {
|
||||
case pucch_format0_nr:
|
||||
@@ -864,13 +859,13 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
|
||||
case pucch_format0_nr:
|
||||
{
|
||||
int pucch_GroupHopping = mac->ULbwp[bwp_id-1] ?
|
||||
mac->ULbwp[bwp_id-1]->bwp_Common->pucch_ConfigCommon->choice.setup->pucch_GroupHopping:
|
||||
mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pucch_ConfigCommon->choice.setup->pucch_GroupHopping;
|
||||
mac->ULbwp[bwp_id-1]->bwp_Common->pucch_ConfigCommon->choice.setup->pucch_GroupHopping:
|
||||
mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pucch_ConfigCommon->choice.setup->pucch_GroupHopping;
|
||||
int hoppingId = mac->ULbwp[bwp_id-1] ?
|
||||
mac->ULbwp[bwp_id-1]->bwp_Common->pucch_ConfigCommon->choice.setup->hoppingId[0]:
|
||||
(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pucch_ConfigCommon->choice.setup->hoppingId?
|
||||
mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pucch_ConfigCommon->choice.setup->hoppingId[0]:
|
||||
mac->physCellId);
|
||||
mac->ULbwp[bwp_id-1]->bwp_Common->pucch_ConfigCommon->choice.setup->hoppingId[0]:
|
||||
(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pucch_ConfigCommon->choice.setup->hoppingId?
|
||||
mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pucch_ConfigCommon->choice.setup->hoppingId[0]:
|
||||
mac->physCellId);
|
||||
nr_generate_pucch0(ue,ue->common_vars.txdataF,
|
||||
&ue->frame_parms,
|
||||
pucch_GroupHopping,
|
||||
@@ -1319,7 +1314,7 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
|
||||
current_resource_id = r_PUCCH;
|
||||
}
|
||||
else {
|
||||
current_resource_id = resourceSetToAddModList->list.array[pucch_resource_set_id]->resourceList.list.array[pucch_resource_indicator][0];
|
||||
current_resource_id = resourceSetToAddModList->list.array[pucch_resource_set_id]->resourceList.list.array[pucch_resource_indicator][0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -349,58 +349,55 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
|
||||
/* optional */
|
||||
/* - nRPCI */
|
||||
if (1) {
|
||||
cells_to_be_activated_list_item.nRPCI = (F1AP_NRPCI_t *)calloc(1, sizeof(F1AP_NRPCI_t));
|
||||
*cells_to_be_activated_list_item.nRPCI = f1ap_setup_resp->cells_to_activate[i].nrpci; // int 0..1007
|
||||
cells_to_be_activated_list_item.nRPCI = (F1AP_NRPCI_t *)calloc(1, sizeof(F1AP_NRPCI_t));
|
||||
*cells_to_be_activated_list_item.nRPCI = f1ap_setup_resp->cells_to_activate[i].nrpci; // int 0..1007
|
||||
}
|
||||
|
||||
/* optional */
|
||||
/* - gNB-CU System Information */
|
||||
if (1) {
|
||||
/* 3.1.2 gNB-CUSystem Information */
|
||||
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *cells_to_be_activated_list_itemExtIEs;
|
||||
cells_to_be_activated_list_itemExtIEs = (F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemExtIEs_t));
|
||||
cells_to_be_activated_list_itemExtIEs->id = F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation;
|
||||
cells_to_be_activated_list_itemExtIEs->criticality = F1AP_Criticality_reject;
|
||||
cells_to_be_activated_list_itemExtIEs->extensionValue.present = F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation;
|
||||
|
||||
F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t));
|
||||
//LOG_I(F1AP, "%s() SI %d size %d: ", __func__, i, f1ap_setup_resp->SI_container_length[i][0]);
|
||||
//for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++)
|
||||
// printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]);
|
||||
//printf("\n");
|
||||
|
||||
// for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ?
|
||||
for (int sIBtype=2;sIBtype<21;sIBtype++) {
|
||||
if (f1ap_setup_resp->cells_to_activate[i].SI_container[sIBtype]!=NULL) {
|
||||
AssertFatal(sIBtype < 6 || sIBtype == 9, "Illegal SI type %d\n",sIBtype);
|
||||
F1AP_SibtypetobeupdatedListItem_t *sib_item = calloc(1,sizeof(*sib_item));
|
||||
memset((void*)sib_item,0,sizeof(*sib_item));
|
||||
sib_item->sIBtype = sIBtype;
|
||||
OCTET_STRING_fromBuf(&sib_item->sIBmessage,
|
||||
(const char*)f1ap_setup_resp->cells_to_activate[i].SI_container[sIBtype],
|
||||
f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]);
|
||||
|
||||
LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]);
|
||||
ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item);
|
||||
}
|
||||
}
|
||||
cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation;
|
||||
|
||||
|
||||
F1AP_ProtocolExtensionContainer_154P112_t p_154P112_t;
|
||||
memset((void *)&p_154P112_t, 0, sizeof(F1AP_ProtocolExtensionContainer_154P112_t));
|
||||
|
||||
ASN_SEQUENCE_ADD(&p_154P112_t.list,
|
||||
cells_to_be_activated_list_itemExtIEs);
|
||||
cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_154P112_t;
|
||||
|
||||
free(gNB_CUSystemInformation);
|
||||
gNB_CUSystemInformation = NULL;
|
||||
/* 3.1.2 gNB-CUSystem Information */
|
||||
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *cells_to_be_activated_list_itemExtIEs;
|
||||
cells_to_be_activated_list_itemExtIEs = (F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemExtIEs_t));
|
||||
cells_to_be_activated_list_itemExtIEs->id = F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation;
|
||||
cells_to_be_activated_list_itemExtIEs->criticality = F1AP_Criticality_reject;
|
||||
cells_to_be_activated_list_itemExtIEs->extensionValue.present = F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation;
|
||||
|
||||
F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t));
|
||||
//LOG_I(F1AP, "%s() SI %d size %d: ", __func__, i, f1ap_setup_resp->SI_container_length[i][0]);
|
||||
//for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++)
|
||||
// printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]);
|
||||
//printf("\n");
|
||||
|
||||
// for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ?
|
||||
for (int sIBtype=2;sIBtype<21;sIBtype++) {
|
||||
if (f1ap_setup_resp->cells_to_activate[i].SI_container[sIBtype]!=NULL) {
|
||||
AssertFatal(sIBtype < 6 || sIBtype == 9, "Illegal SI type %d\n",sIBtype);
|
||||
F1AP_SibtypetobeupdatedListItem_t *sib_item = calloc(1,sizeof(*sib_item));
|
||||
memset((void*)sib_item,0,sizeof(*sib_item));
|
||||
sib_item->sIBtype = sIBtype;
|
||||
OCTET_STRING_fromBuf(&sib_item->sIBmessage,
|
||||
(const char*)f1ap_setup_resp->cells_to_activate[i].SI_container[sIBtype],
|
||||
f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]);
|
||||
|
||||
LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]);
|
||||
ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item);
|
||||
}
|
||||
}
|
||||
cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation;
|
||||
|
||||
F1AP_ProtocolExtensionContainer_154P112_t p_154P112_t;
|
||||
memset((void *)&p_154P112_t, 0, sizeof(F1AP_ProtocolExtensionContainer_154P112_t));
|
||||
|
||||
ASN_SEQUENCE_ADD(&p_154P112_t.list, cells_to_be_activated_list_itemExtIEs);
|
||||
cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_154P112_t;
|
||||
|
||||
free(gNB_CUSystemInformation);
|
||||
gNB_CUSystemInformation = NULL;
|
||||
}
|
||||
/* ADD */
|
||||
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,
|
||||
cells_to_be_activated_list_item_ies);
|
||||
ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Activated_List.list, cells_to_be_activated_list_item_ies);
|
||||
}
|
||||
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->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Activated_List;
|
||||
|
||||
for (i=0;
|
||||
i<f1ap_gnb_cu_configuration_update->num_cells_to_activate;
|
||||
i++) {
|
||||
for (i=0; 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;
|
||||
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);
|
||||
}
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -942,8 +935,8 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
LOG_E(F1AP, "Failed to encode F1 gNB-CU CONFIGURATION UPDATE\n");
|
||||
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]);
|
||||
printf("\n");
|
||||
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);
|
||||
|
||||
int f1ap_uid = f1ap_add_ue(&f1ap_cu_inst[rrc_inst], rrc_inst, CC_id, 0, rnti);
|
||||
@@ -344,7 +343,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
|
||||
F1AP_ULRRCMessageTransfer_t *container;
|
||||
F1AP_ULRRCMessageTransferIEs_t *ie;
|
||||
|
||||
|
||||
uint64_t cu_ue_f1ap_id;
|
||||
uint64_t du_ue_f1ap_id;
|
||||
uint64_t srb_id;
|
||||
|
||||
@@ -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_Exponent = 6L;
|
||||
|
||||
|
||||
/* OPTIONAL */
|
||||
/* delayCritical */
|
||||
if (0) {
|
||||
@@ -582,8 +581,9 @@ if (0) {
|
||||
|
||||
/* 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_Exponent = 6L;
|
||||
/* OPTIONAL */
|
||||
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Exponent = 6L;
|
||||
|
||||
/* OPTIONAL */
|
||||
/* delayCritical */
|
||||
if (0) {
|
||||
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->delayCritical = (long *)calloc(1, sizeof(long));
|
||||
|
||||
@@ -195,11 +195,11 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
served_cell_information.nRPCI = f1ap_du_data->nr_pci[i]; // int 0..1007
|
||||
|
||||
/* - fiveGS_TAC */
|
||||
uint8_t fiveGS_TAC[3];
|
||||
served_cell_information.fiveGS_TAC=calloc(1,sizeof(*served_cell_information.fiveGS_TAC));
|
||||
fiveGS_TAC[0] = ((uint8_t*)&f1ap_du_data->tac[i])[2];
|
||||
fiveGS_TAC[1] = ((uint8_t*)&f1ap_du_data->tac[i])[1];
|
||||
fiveGS_TAC[2] = ((uint8_t*)&f1ap_du_data->tac[i])[0];
|
||||
uint8_t fiveGS_TAC[3];
|
||||
served_cell_information.fiveGS_TAC=calloc(1,sizeof(*served_cell_information.fiveGS_TAC));
|
||||
fiveGS_TAC[0] = ((uint8_t*)&f1ap_du_data->tac[i])[2];
|
||||
fiveGS_TAC[1] = ((uint8_t*)&f1ap_du_data->tac[i])[1];
|
||||
fiveGS_TAC[2] = ((uint8_t*)&f1ap_du_data->tac[i])[0];
|
||||
OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC,
|
||||
(const char *)fiveGS_TAC,
|
||||
3);
|
||||
@@ -719,10 +719,10 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
served_cell_information.nRPCI = f1ap_setup_req->nr_pci[i]; // int 0..1007
|
||||
|
||||
/* - fiveGS_TAC */
|
||||
uint8_t fiveGS_TAC[3];
|
||||
fiveGS_TAC[0] = ((uint8_t*)&f1ap_setup_req->tac[i])[2];
|
||||
fiveGS_TAC[1] = ((uint8_t*)&f1ap_setup_req->tac[i])[1];
|
||||
fiveGS_TAC[2] = ((uint8_t*)&f1ap_setup_req->tac[i])[0];
|
||||
uint8_t fiveGS_TAC[3];
|
||||
fiveGS_TAC[0] = ((uint8_t*)&f1ap_setup_req->tac[i])[2];
|
||||
fiveGS_TAC[1] = ((uint8_t*)&f1ap_setup_req->tac[i])[1];
|
||||
fiveGS_TAC[2] = ((uint8_t*)&f1ap_setup_req->tac[i])[0];
|
||||
OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC,
|
||||
(const char *)fiveGS_TAC,
|
||||
3);
|
||||
@@ -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);
|
||||
ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, servedPLMN_item);
|
||||
|
||||
|
||||
// // /* - CHOICE NR-MODE-Info */
|
||||
F1AP_NR_Mode_Info_t nR_Mode_Info;
|
||||
|
||||
@@ -885,7 +884,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
served_cell_information.nRPCI = f1ap_setup_req->nr_pci[i]; // int 0..1007
|
||||
|
||||
/* - fiveGS_TAC */
|
||||
served_cell_information.fiveGS_TAC=calloc(1,sizeof(*served_cell_information.fiveGS_TAC));
|
||||
served_cell_information.fiveGS_TAC=calloc(1,sizeof(*served_cell_information.fiveGS_TAC));
|
||||
OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC,
|
||||
(const char *) &f1ap_setup_req->tac[i],
|
||||
3);
|
||||
@@ -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);
|
||||
ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, servedPLMN_item);
|
||||
|
||||
|
||||
|
||||
// // /* - CHOICE NR-MODE-Info */
|
||||
F1AP_NR_Mode_Info_t nR_Mode_Info;
|
||||
|
||||
|
||||
@@ -479,36 +479,36 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
DRB2LCHAN[i] = (uint8_t) * DRB_configList->list.array[i]->logicalChannelIdentity;
|
||||
}
|
||||
|
||||
rrc_mac_config_req_eNB(
|
||||
ctxt.module_id,
|
||||
0,0,0,0,0,0,
|
||||
0,
|
||||
ue_context_p->ue_context.rnti,
|
||||
(LTE_BCCH_BCH_Message_t *) NULL,
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
|
||||
physicalConfigDedicated,
|
||||
(LTE_SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
(LTE_MeasObjectToAddMod_t **) NULL,
|
||||
mac_MainConfig,
|
||||
DRB2LCHAN[i],
|
||||
DRB_configList->list.array[i]->logicalChannelConfig,
|
||||
measGapConfig,
|
||||
(LTE_TDD_Config_t *) NULL,
|
||||
NULL,
|
||||
(LTE_SchedulingInfoList_t *) NULL,
|
||||
0, NULL, NULL, (LTE_MBSFN_SubframeConfigList_t *) NULL
|
||||
, 0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL,
|
||||
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
rrc_mac_config_req_eNB(
|
||||
ctxt.module_id,
|
||||
0,0,0,0,0,0,
|
||||
0,
|
||||
ue_context_p->ue_context.rnti,
|
||||
(LTE_BCCH_BCH_Message_t *) NULL,
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
|
||||
physicalConfigDedicated,
|
||||
(LTE_SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
(LTE_MeasObjectToAddMod_t **) NULL,
|
||||
mac_MainConfig,
|
||||
DRB2LCHAN[i],
|
||||
DRB_configList->list.array[i]->logicalChannelConfig,
|
||||
measGapConfig,
|
||||
(LTE_TDD_Config_t *) NULL,
|
||||
NULL,
|
||||
(LTE_SchedulingInfoList_t *) NULL,
|
||||
0, NULL, NULL, (LTE_MBSFN_SubframeConfigList_t *) NULL
|
||||
, 0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL,
|
||||
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
}
|
||||
|
||||
} else { // remove LCHAN from MAC/PHY
|
||||
@@ -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->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_DUtoCURRCContainer;
|
||||
OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCContainer,
|
||||
(char *)sdu2P,
|
||||
sdu2_lenP);
|
||||
OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCContainer, (char *)sdu2P, sdu2_lenP);
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
}
|
||||
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
LOG_E(F1AP, "Failed to encode F1 INITIAL UL RRC MESSAGE TRANSFER\n");
|
||||
|
||||
@@ -50,7 +50,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
|
||||
rnti_t rntiP,
|
||||
const uint8_t *sduP,
|
||||
sdu_size_t sdu_lenP,
|
||||
const uint8_t *sdu2P,
|
||||
sdu_size_t sdu2_lenP);
|
||||
const uint8_t *sdu2P,
|
||||
sdu_size_t sdu2_lenP);
|
||||
|
||||
#endif /* F1AP_DU_RRC_MESSAGE_TRANSFER_H_ */
|
||||
|
||||
@@ -160,13 +160,13 @@ void *F1AP_DU_task(void *arg) {
|
||||
&F1AP_SETUP_REQ(received_msg));
|
||||
break;
|
||||
case F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE:
|
||||
DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(received_msg));
|
||||
break;
|
||||
break;
|
||||
case F1AP_GNB_CU_CONFIGURATION_UPDATE_FAILURE:
|
||||
DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
|
||||
&F1AP_GNB_CU_CONFIGURATION_UPDATE_FAILURE(received_msg));
|
||||
break;
|
||||
break;
|
||||
|
||||
case SCTP_NEW_ASSOCIATION_RESP:
|
||||
// 1. store the respon
|
||||
@@ -190,9 +190,8 @@ void *F1AP_DU_task(void *arg) {
|
||||
DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(0,0,0,msg->crnti,
|
||||
msg->rrc_container,
|
||||
msg->rrc_container_length,
|
||||
msg->du2cu_rrc_container,
|
||||
msg->du2cu_rrc_container_length
|
||||
);
|
||||
msg->du2cu_rrc_container,
|
||||
msg->du2cu_rrc_container_length);
|
||||
break;
|
||||
|
||||
case F1AP_UL_RRC_MESSAGE: // to rrc
|
||||
|
||||
@@ -176,12 +176,11 @@ void *gNB_app_task(void *args_p)
|
||||
/* for no gcc warnings */
|
||||
(void)instance;
|
||||
|
||||
int cell_to_activate = 0;
|
||||
int cell_to_activate = 0;
|
||||
itti_mark_task_ready (TASK_GNB_APP);
|
||||
|
||||
LOG_I(PHY, "%s() Task ready initialize structures\n", __FUNCTION__);
|
||||
|
||||
|
||||
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);
|
||||
|
||||
@@ -2906,7 +2906,7 @@ int is_nr_DL_slot(NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon,slo
|
||||
|
||||
if (tdd_UL_DL_ConfigurationCommon->pattern2) {
|
||||
if (tdd_UL_DL_ConfigurationCommon->pattern2->ext1 &&
|
||||
tdd_UL_DL_ConfigurationCommon->pattern2->ext1->dl_UL_TransmissionPeriodicity_v1530)
|
||||
tdd_UL_DL_ConfigurationCommon->pattern2->ext1->dl_UL_TransmissionPeriodicity_v1530)
|
||||
period2 = 3000+*tdd_UL_DL_ConfigurationCommon->pattern2->ext1->dl_UL_TransmissionPeriodicity_v1530;
|
||||
else
|
||||
period2 = tdd_period_to_num[tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity];
|
||||
@@ -2938,7 +2938,7 @@ int is_nr_UL_slot(NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon, sl
|
||||
|
||||
if (tdd_UL_DL_ConfigurationCommon->pattern2) {
|
||||
if (tdd_UL_DL_ConfigurationCommon->pattern2->ext1 &&
|
||||
tdd_UL_DL_ConfigurationCommon->pattern2->ext1->dl_UL_TransmissionPeriodicity_v1530)
|
||||
tdd_UL_DL_ConfigurationCommon->pattern2->ext1->dl_UL_TransmissionPeriodicity_v1530)
|
||||
period2 = 3000+*tdd_UL_DL_ConfigurationCommon->pattern2->ext1->dl_UL_TransmissionPeriodicity_v1530;
|
||||
else
|
||||
period2 = tdd_period_to_num[tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity];
|
||||
|
||||
@@ -57,8 +57,8 @@ uint16_t nr_dci_size(const NR_BWP_UplinkCommon_t *initialULBWP,
|
||||
const NR_CellGroupConfig_t *cg,
|
||||
dci_pdu_rel15_t *dci_pdu,
|
||||
nr_dci_format_t format,
|
||||
nr_rnti_type_t rnti_type,
|
||||
uint16_t N_RB,
|
||||
nr_rnti_type_t rnti_type,
|
||||
uint16_t N_RB,
|
||||
int bwp_id);
|
||||
|
||||
void find_aggregation_candidates(uint8_t *aggregation_level,
|
||||
|
||||
@@ -173,12 +173,12 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
|
||||
|
||||
for (i=0; i<5; i++) {
|
||||
if (i==scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing) {
|
||||
cfg->carrier_config.dl_grid_size[i] = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth;
|
||||
cfg->carrier_config.dl_k0[i] = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->offsetToCarrier;
|
||||
cfg->carrier_config.dl_grid_size[i] = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth;
|
||||
cfg->carrier_config.dl_k0[i] = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->offsetToCarrier;
|
||||
}
|
||||
else {
|
||||
cfg->carrier_config.dl_grid_size[i] = 0;
|
||||
cfg->carrier_config.dl_k0[i] = 0;
|
||||
cfg->carrier_config.dl_grid_size[i] = 0;
|
||||
cfg->carrier_config.dl_k0[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -315,7 +315,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
|
||||
NR_ServingCellConfigCommon_t *scc;
|
||||
NR_ServingCellConfigCommonSIB_t *scc_SIB;
|
||||
NR_ServingCellConfigCommonSIB_t *scc_SIB;
|
||||
NR_CellGroupConfig_t *cg;
|
||||
int servCellIndex;
|
||||
NR_CSI_ReportConfig_t *csirc;
|
||||
|
||||
@@ -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(with LSB): %d\n", (int)frame);
|
||||
LOG_D(MAC,"subcarrier spacing (0=15or60, 1=30or120): %d\n", (int)mac->mib->subCarrierSpacingCommon);
|
||||
@@ -375,10 +374,10 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac,
|
||||
if(pusch_config_pdu != NULL){
|
||||
NR_PUSCH_TimeDomainResourceAllocationList_t *pusch_TimeDomainAllocationList = NULL;
|
||||
if (mac->ULbwp[0] &&
|
||||
mac->ULbwp[0]->bwp_Dedicated &&
|
||||
mac->ULbwp[0]->bwp_Dedicated->pusch_Config &&
|
||||
mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup &&
|
||||
mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->pusch_TimeDomainAllocationList) {
|
||||
mac->ULbwp[0]->bwp_Dedicated &&
|
||||
mac->ULbwp[0]->bwp_Dedicated->pusch_Config &&
|
||||
mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup &&
|
||||
mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->pusch_TimeDomainAllocationList) {
|
||||
pusch_TimeDomainAllocationList = mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->pusch_TimeDomainAllocationList->choice.setup;
|
||||
}
|
||||
else if (mac->ULbwp[0] &&
|
||||
@@ -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,"number_symbols = %i\n", pusch_config_pdu->nr_of_symbols);
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -672,9 +670,9 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
}
|
||||
/* dmrs symbol positions*/
|
||||
dlsch_config_pdu_1_0->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config,
|
||||
mac->mib->dmrs_TypeA_Position,
|
||||
dlsch_config_pdu_1_0->number_symbols,
|
||||
dlsch_config_pdu_1_0->start_symbol);
|
||||
mac->mib->dmrs_TypeA_Position,
|
||||
dlsch_config_pdu_1_0->number_symbols,
|
||||
dlsch_config_pdu_1_0->start_symbol);
|
||||
dlsch_config_pdu_1_0->dmrsConfigType = (mac->DLbwp[0] != NULL) ? (mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1) : 0;
|
||||
/* number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214 version 15.9.0 Release 15 */
|
||||
if (dlsch_config_pdu_1_0->number_symbols == 2)
|
||||
@@ -1230,9 +1228,11 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
|
||||
//Identifier for DCI formats
|
||||
pos++;
|
||||
dci_pdu_rel15->format_indicator = (*dci_pdu>>(dci_size-pos))&1;
|
||||
|
||||
//switch to DCI_0_0
|
||||
if (dci_pdu_rel15->format_indicator == 0)
|
||||
//switch to DCI_0_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
|
||||
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
|
||||
|
||||
@@ -620,8 +620,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
|
||||
int target_ss;
|
||||
bool valid_ptrs_setup = 0;
|
||||
uint16_t n_RB_ULBWP;
|
||||
if (mac->ULbwp[0] &&
|
||||
mac->ULbwp[0]->bwp_Common) {
|
||||
if (mac->ULbwp[0] && mac->ULbwp[0]->bwp_Common) {
|
||||
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);
|
||||
}
|
||||
@@ -770,11 +769,11 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
|
||||
|
||||
/* PTRS */
|
||||
if (mac->ULbwp[0] &&
|
||||
mac->ULbwp[0]->bwp_Dedicated &&
|
||||
mac->ULbwp[0]->bwp_Dedicated->pusch_Config &&
|
||||
mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup &&
|
||||
mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB &&
|
||||
mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS) {
|
||||
mac->ULbwp[0]->bwp_Dedicated &&
|
||||
mac->ULbwp[0]->bwp_Dedicated->pusch_Config &&
|
||||
mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup &&
|
||||
mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB &&
|
||||
mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS) {
|
||||
if (pusch_config_pdu->transform_precoding == transform_precoder_disabled) {
|
||||
nfapi_nr_ue_ptrs_ports_t ptrs_ports_list;
|
||||
pusch_config_pdu->pusch_ptrs.ptrs_ports_list = &ptrs_ports_list;
|
||||
@@ -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],
|
||||
ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator,
|
||||
TBS_bytes,
|
||||
ra->ra_state );
|
||||
ra->ra_state);
|
||||
if (ra->ra_state == WAIT_RAR && !ra->cfra){
|
||||
memcpy(ulsch_input_buffer, mac->ulsch_pdu.payload, TBS_bytes);
|
||||
LOG_D(NR_MAC,"[RAPROC] Msg3 to be transmitted:\n");
|
||||
@@ -998,7 +997,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
}
|
||||
LOG_D(NR_MAC,"Flipping NDI for harq_id %d (Msg3)\n",ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator);
|
||||
mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator;
|
||||
mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = 0;
|
||||
mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = 0;
|
||||
} else {
|
||||
|
||||
if ( (mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator ||
|
||||
@@ -1088,6 +1087,7 @@ int nr_ue_pusch_scheduler(NR_UE_MAC_INST_t *mac,
|
||||
|
||||
int delta = 0;
|
||||
NR_BWP_Uplink_t *ubwp = mac->ULbwp[0];
|
||||
|
||||
// Get the numerology to calculate the Tx frame and slot
|
||||
int mu = ubwp ?
|
||||
ubwp->bwp_Common->genericParameters.subcarrierSpacing :
|
||||
@@ -1619,7 +1619,7 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac) {
|
||||
for (ssb_idx=0; ssb_idx<MAX_NB_SSB; ssb_idx++) {
|
||||
uint8_t nb_mapped_ro_in_association_period=0; // Reset the nb of mapped ROs for the new SSB index
|
||||
|
||||
LOG_D(NR_MAC,"Checking ssb_idx %d => %d\n",
|
||||
LOG_D(NR_MAC,"Checking ssb_idx %d => %d\n",
|
||||
ssb_idx,ssb_list.tx_ssb[ssb_idx].transmitted);
|
||||
|
||||
// Map only the transmitted ssb_idx
|
||||
@@ -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
|
||||
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)) {
|
||||
|
||||
// WIP Need to get the proper selected ssb_idx
|
||||
|
||||
@@ -481,7 +481,7 @@ void nr_csi_meas_reporting(int Mod_idP,
|
||||
const NR_CellGroupConfig_t *CellGroup = UE_info->CellGroup[UE_id];
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
if (!CellGroup || !CellGroup->spCellConfig || !CellGroup->spCellConfig->spCellConfigDedicated ||
|
||||
!CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig) continue;
|
||||
!CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig) continue;
|
||||
const NR_CSI_MeasConfig_t *csi_measconfig = CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup;
|
||||
AssertFatal(csi_measconfig->csi_ReportConfigToAddModList->list.count > 0,
|
||||
"NO CSI report configuration available");
|
||||
@@ -1197,7 +1197,7 @@ bool nr_acknack_scheduling(int mod_id,
|
||||
memset(pucch, 0, sizeof(*pucch));
|
||||
pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f;
|
||||
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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 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) {
|
||||
|
||||
|
||||
bool no_sig = true;
|
||||
for (int k = 0; k < sdu_lenP; k++) {
|
||||
if(sduP[k]!=0) {
|
||||
|
||||
@@ -80,7 +80,6 @@
|
||||
#define NR_NB_RA_PROC_MAX 4
|
||||
#define MAX_NUM_OF_SSB 64
|
||||
|
||||
|
||||
/*! \brief NR_list_t is a "list" (of users, HARQ processes, slices, ...).
|
||||
* Especially useful in the scheduler and to keep "classes" of users. */
|
||||
typedef struct {
|
||||
|
||||
@@ -49,8 +49,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity,
|
||||
return;
|
||||
}
|
||||
|
||||
if (entity->type != NR_PDCP_SRB &&
|
||||
!(buffer[0] & 0x80)) {
|
||||
if (entity->type != NR_PDCP_SRB && !(buffer[0] & 0x80)) {
|
||||
LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
@@ -66,8 +65,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity,
|
||||
header_size = 3;
|
||||
}
|
||||
/* SRBs always have MAC-I, even if integrity is not active */
|
||||
if (entity->has_integrity
|
||||
|| entity->type == NR_PDCP_SRB) {
|
||||
if (entity->has_integrity || entity->type == NR_PDCP_SRB) {
|
||||
integrity_size = 4;
|
||||
} else {
|
||||
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 */
|
||||
if (entity->has_integrity
|
||||
|| entity->type == NR_PDCP_SRB) {
|
||||
if (entity->has_integrity || entity->type == NR_PDCP_SRB) {
|
||||
integrity_size = 4;
|
||||
} else {
|
||||
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,
|
||||
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)
|
||||
/* set MAC-I to 0 for SRBs with integrity not active */
|
||||
memset(buf + header_size + size, 0, 4);
|
||||
|
||||
if (entity->has_ciphering)
|
||||
|
||||
@@ -40,6 +40,7 @@ typedef struct nr_pdcp_entity_t {
|
||||
void (*recv_sdu)(struct nr_pdcp_entity_t *entity, char *buffer, int size,
|
||||
int sdu_id);
|
||||
void (*delete)(struct nr_pdcp_entity_t *entity);
|
||||
|
||||
/* set_security: pass -1 to integrity_algorithm / ciphering_algorithm
|
||||
* to keep the current algorithm
|
||||
* pass NULL to integrity_key / ciphering_key
|
||||
@@ -50,6 +51,7 @@ typedef struct nr_pdcp_entity_t {
|
||||
char *integrity_key,
|
||||
int ciphering_algorithm,
|
||||
char *ciphering_key);
|
||||
|
||||
void (*set_time)(struct nr_pdcp_entity_t *entity, uint64_t now);
|
||||
|
||||
/* callbacks provided to the PDCP module */
|
||||
|
||||
@@ -960,7 +960,6 @@ boolean_t rrc_pdcp_config_asn1_req(
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void nr_DRB_preconfiguration(uint16_t crnti)
|
||||
{
|
||||
|
||||
@@ -1056,7 +1055,6 @@ void nr_DRB_preconfiguration(uint16_t crnti)
|
||||
|
||||
}
|
||||
|
||||
|
||||
uint64_t get_pdcp_optmask(void)
|
||||
{
|
||||
return pdcp_optmask;
|
||||
@@ -1118,7 +1116,6 @@ void pdcp_config_set_security(
|
||||
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
||||
}
|
||||
|
||||
|
||||
static boolean_t pdcp_data_req_srb(
|
||||
protocol_ctxt_t *ctxt_pP,
|
||||
const rb_id_t rb_id,
|
||||
@@ -1227,12 +1224,10 @@ boolean_t pdcp_data_req(
|
||||
)
|
||||
{
|
||||
if (srb_flagP) {
|
||||
return pdcp_data_req_srb(ctxt_pP, rb_id, muiP, confirmP, sdu_buffer_size,
|
||||
sdu_buffer);
|
||||
return pdcp_data_req_srb(ctxt_pP, rb_id, muiP, confirmP, sdu_buffer_size, sdu_buffer);
|
||||
}
|
||||
else{
|
||||
return pdcp_data_req_drb(ctxt_pP, rb_id, muiP, confirmP, sdu_buffer_size,
|
||||
sdu_buffer);
|
||||
return pdcp_data_req_drb(ctxt_pP, rb_id, muiP, confirmP, sdu_buffer_size, sdu_buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,4 +46,4 @@ void nr_rlc_bearer_init(NR_RLC_BearerConfig_t *RLC_BearerConfig, NR_RLC_BearerCo
|
||||
|
||||
void nr_drb_config(struct NR_RLC_Config *rlc_Config, NR_RLC_Config_PR rlc_config_pr);
|
||||
|
||||
void nr_rlc_bearer_init_ul_spec(struct NR_LogicalChannelConfig *mac_LogicalChannelConfig);
|
||||
void nr_rlc_bearer_init_ul_spec(struct NR_LogicalChannelConfig *mac_LogicalChannelConfig);
|
||||
@@ -1041,5 +1041,4 @@ void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -60,7 +60,7 @@ int handle_bcch_bch(module_id_t module_id, int cc_id,
|
||||
ssb_length, // Lssb = 64 is not support
|
||||
ssb_index,
|
||||
pduP,
|
||||
ssb_start_subcarrier,
|
||||
ssb_start_subcarrier,
|
||||
cell_id);
|
||||
|
||||
}
|
||||
|
||||
@@ -318,8 +318,7 @@ mac_rrc_data_ind(
|
||||
sduP,
|
||||
sdu_lenP,
|
||||
NULL,
|
||||
0
|
||||
);
|
||||
0);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,10 +44,7 @@
|
||||
#include "NR_MIB.h"
|
||||
#include "NR_BCCH-BCH-Message.h"
|
||||
#include "rrc_gNB_UE_context.h"
|
||||
#include <openair2/RRC/NR/MESSAGES/asn1_msg.h>
|
||||
|
||||
|
||||
#include "RRC/NR/MESSAGES/asn1_msg.h"
|
||||
#include "openair2/RRC/NR/MESSAGES/asn1_msg.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -364,4 +361,4 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP,
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -1214,7 +1214,6 @@ void fill_initial_cellGroupConfig(rnti_t rnti,
|
||||
//}
|
||||
rlc_BearerConfig->rlc_Config = rlc_Config;
|
||||
|
||||
|
||||
//if (0) {
|
||||
logicalChannelConfig = calloc(1, sizeof(NR_LogicalChannelConfig_t));
|
||||
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",
|
||||
enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
return((enc_rval.encoded+7)/8);
|
||||
|
||||
}
|
||||
|
||||
uint8_t do_NR_SecurityModeCommand(
|
||||
@@ -1636,8 +1634,7 @@ int16_t do_RRCReconfiguration(
|
||||
NR_SecurityConfig_t *security_config,
|
||||
NR_SDAP_Config_t *sdap_config,
|
||||
NR_MeasConfig_t *meas_config,
|
||||
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
|
||||
*dedicatedNAS_MessageList,
|
||||
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
|
||||
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
|
||||
NR_CellGroupConfig_t *cellGroupConfig)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -102,8 +102,9 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGr
|
||||
uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
uint8_t *const buffer,
|
||||
const uint8_t transaction_id,
|
||||
OCTET_STRING_t *masterCellGroup_from_DU,
|
||||
NR_ServingCellConfigCommon_t *scc);
|
||||
OCTET_STRING_t *masterCellGroup_from_DU,
|
||||
NR_ServingCellConfigCommon_t *scc);
|
||||
|
||||
uint8_t do_NR_SecurityModeCommand(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
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 Transaction_id);
|
||||
|
||||
int16_t do_RRCReconfiguration(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
uint8_t *buffer,
|
||||
@@ -127,8 +129,7 @@ int16_t do_RRCReconfiguration(
|
||||
NR_SecurityConfig_t *security_config,
|
||||
NR_SDAP_Config_t *sdap_config,
|
||||
NR_MeasConfig_t *meas_config,
|
||||
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
|
||||
*dedicatedNAS_MessageList,
|
||||
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
|
||||
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
|
||||
NR_CellGroupConfig_t *cellGroupConfig);
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
||||
const uint8_t *buffer,
|
||||
int buffer_length,
|
||||
OCTET_STRING_t *du_to_cu_rrc_container,
|
||||
const int CC_id);
|
||||
const int CC_id);
|
||||
|
||||
void
|
||||
rrc_gNB_generate_dedicatedRRCReconfiguration_release(
|
||||
|
||||
@@ -801,8 +801,8 @@ rrc_gNB_generate_defaultRRCReconfiguration(
|
||||
memset(buffer, 0, RRC_BUF_SIZE);
|
||||
size = do_RRCReconfiguration(ctxt_pP, buffer,
|
||||
xid,
|
||||
NULL,//*SRB_configList2,
|
||||
NULL,//*DRB_configList,
|
||||
NULL, //*SRB_configList2,
|
||||
NULL, //*DRB_configList,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -1736,7 +1736,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
|
||||
int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
||||
const uint8_t *buffer,
|
||||
int buffer_length,
|
||||
OCTET_STRING_t *du_to_cu_rrc_container,
|
||||
OCTET_STRING_t *du_to_cu_rrc_container,
|
||||
const int CC_id)
|
||||
{
|
||||
module_id_t Idx;
|
||||
@@ -1861,9 +1861,9 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
||||
LOG_E(RRC, "%s:%d:%s: rrc_gNB_get_next_free_ue_context returned NULL\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
}
|
||||
|
||||
if (ue_context_p != NULL) {
|
||||
ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence = TRUE;
|
||||
ue_context_p->ue_context.ng_5G_S_TMSI_Part1 = s_tmsi_part1;
|
||||
if (ue_context_p != NULL) {
|
||||
ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence = TRUE;
|
||||
ue_context_p->ue_context.ng_5G_S_TMSI_Part1 = s_tmsi_part1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -490,7 +490,6 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ(
|
||||
itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, message_p);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
int
|
||||
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;
|
||||
protocol_ctxt_t ctxt;
|
||||
memset(&ctxt, 0, sizeof(protocol_ctxt_t));
|
||||
|
||||
ue_initial_id = NGAP_DOWNLINK_NAS (msg_p).ue_initial_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);
|
||||
|
||||
@@ -133,7 +133,7 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP,
|
||||
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_I(NR_RRC,"(%i): %i\n", i, buffer_pP[i]);
|
||||
printf("%02x ",buffer_pP[i]);
|
||||
printf("%02x ",buffer_pP[i]);
|
||||
}
|
||||
printf("\n");
|
||||
return NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size;
|
||||
|
||||
+17
-18
@@ -572,12 +572,12 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
// link to rrc instance
|
||||
// link to rrc instance
|
||||
SEQUENCE_free( &asn_DEF_NR_MIB, (void *)NR_UE_rrc_inst[module_id].mib, 1 );
|
||||
NR_UE_rrc_inst[module_id].mib = bcch_message->message.choice.mib;
|
||||
//memcpy( (void *)mib,
|
||||
// (void *)&bcch_message->message.choice.mib,
|
||||
// sizeof(NR_MIB_t) );
|
||||
//memcpy( (void *)mib,
|
||||
// (void *)&bcch_message->message.choice.mib,
|
||||
// sizeof(NR_MIB_t) );
|
||||
|
||||
nr_rrc_mac_config_req_ue( 0, 0, 0, NR_UE_rrc_inst[module_id].mib, NULL, NULL, NULL);
|
||||
}
|
||||
@@ -585,7 +585,6 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(
|
||||
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 short siWindowLength_int[9] = {5,10,20,40,80,160,320,640,1280};//{1,2,5,10,15,20,40,80};
|
||||
|
||||
@@ -1177,7 +1176,7 @@ int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(
|
||||
if(sib1 != NULL){
|
||||
SEQUENCE_free(&asn_DEF_NR_SIB1, (void *)sib1, 1 );
|
||||
}
|
||||
NR_UE_rrc_inst[module_id].Info[gNB_index].SIStatus|=1;
|
||||
NR_UE_rrc_inst[module_id].Info[gNB_index].SIStatus|=1;
|
||||
sib1 = bcch_message->message.choice.c1->choice.systemInformationBlockType1;
|
||||
if (*(int64_t*)sib1 != 1) {
|
||||
NR_UE_rrc_inst[module_id].sib1[gNB_index] = sib1;
|
||||
@@ -1186,21 +1185,21 @@ int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(
|
||||
}
|
||||
LOG_I(NR_RRC, "SIB1 decoded\n");
|
||||
|
||||
/// dump_SIB1();
|
||||
/// dump_SIB1();
|
||||
// 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 ) {
|
||||
NR_UE_rrc_inst[module_id].ra_trigger = INITIAL_ACCESS_FROM_RRC_IDLE;
|
||||
// TODO: remove flag after full RA procedures implemented
|
||||
// get_softmodem_params()->do_ra = 1;
|
||||
LOG_I(PHY,"Setting state to NR_RRC_SI_RECEIVED\n");
|
||||
nr_rrc_set_state (module_id, NR_RRC_SI_RECEIVED);
|
||||
// get_softmodem_params()->do_ra = 1;
|
||||
LOG_I(PHY,"Setting state to NR_RRC_SI_RECEIVED\n");
|
||||
nr_rrc_set_state (module_id, NR_RRC_SI_RECEIVED);
|
||||
}
|
||||
// take ServingCellConfigCommon and configure L1/L2
|
||||
NR_UE_rrc_inst[module_id].servingCellConfigCommonSIB = sib1->servingCellConfigCommon;
|
||||
nr_rrc_mac_config_req_ue(module_id,0,0,NULL,sib1->servingCellConfigCommon,NULL,NULL);
|
||||
nr_rrc_ue_generate_ra_msg(module_id,gNB_index);
|
||||
// take ServingCellConfigCommon and configure L1/L2
|
||||
NR_UE_rrc_inst[module_id].servingCellConfigCommonSIB = sib1->servingCellConfigCommon;
|
||||
nr_rrc_mac_config_req_ue(module_id,0,0,NULL,sib1->servingCellConfigCommon,NULL,NULL);
|
||||
nr_rrc_ue_generate_ra_msg(module_id,gNB_index);
|
||||
} else {
|
||||
LOG_E(NR_RRC, "SIB1 not decoded\n");
|
||||
}
|
||||
@@ -1265,7 +1264,6 @@ nr_rrc_ue_process_masterCellGroup(
|
||||
//TODO (resume all suspended radio bearers and resume SCG transmission for all radio bearers, if suspended)
|
||||
// NSA procedures
|
||||
}
|
||||
|
||||
|
||||
if( cellGroupConfig->rlc_BearerToReleaseList != NULL){
|
||||
//TODO (perform RLC bearer release as specified in 5.3.5.5.3)
|
||||
@@ -1285,14 +1283,14 @@ nr_rrc_ue_process_masterCellGroup(
|
||||
|
||||
if( cellGroupConfig->spCellConfig != NULL){
|
||||
if (NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config &&
|
||||
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig) {
|
||||
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig) {
|
||||
memcpy(NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig,cellGroupConfig->spCellConfig,
|
||||
sizeof(struct NR_SpCellConfig));
|
||||
} else {
|
||||
if (NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config)
|
||||
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig = cellGroupConfig->spCellConfig;
|
||||
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig = cellGroupConfig->spCellConfig;
|
||||
else
|
||||
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config = cellGroupConfig;
|
||||
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config = cellGroupConfig;
|
||||
}
|
||||
LOG_I(RRC,"Sending CellGroupConfig to MAC\n");
|
||||
nr_rrc_mac_config_req_ue(ctxt_pP->module_id,0,0,NULL,NULL,cellGroupConfig,NULL);
|
||||
@@ -1354,6 +1352,7 @@ static void rrc_ue_generate_RRCSetupComplete(
|
||||
|
||||
for (int i=0;i<size;i++) printf("%02x ",buffer[i]);
|
||||
printf("\n");
|
||||
|
||||
// ctxt_pP_local.rnti = ctxt_pP->rnti;
|
||||
rrc_data_req_ue(
|
||||
ctxt_pP,
|
||||
|
||||
@@ -404,7 +404,7 @@ int create_tasks_nrue(uint32_t ue_nb) {
|
||||
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) {
|
||||
LOG_E(NR_RRC, "Create task for NAS UE failed\n");
|
||||
return -1;
|
||||
|
||||
@@ -47,7 +47,6 @@ uint8_t k[16] = {0x51, 0x22, 0x25, 0x02, 0x14,0xc3, 0x3e, 0x72, 0x3a, 0x5d, 0xd5
|
||||
// OPC: 981d464c7c52eb6e5036234984ad0bcf
|
||||
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 imsi[] = "2089900007487"; //"208990100001100";
|
||||
// USIM_API_K: fe c8 6b a6 eb 70 7e d0 89 05 75 7b 1b b4 4b 8f
|
||||
|
||||
@@ -121,10 +121,8 @@ static int gtpv1uCreateAndSendMsg(int h, uint32_t peerIp, uint16_t peerPort, te
|
||||
msgHdr->version=1;
|
||||
msgHdr->msgType=GTP_GPDU;
|
||||
msgHdr->msgLength=htons(msgLen);
|
||||
|
||||
if ( seqNumFlag || extHdrFlag || npduNumFlag)
|
||||
msgHdr->msgLength+=4;
|
||||
|
||||
msgHdr->teid=htonl(teid);
|
||||
|
||||
if(seqNumFlag || extHdrFlag || npduNumFlag) {
|
||||
@@ -814,8 +812,8 @@ void gtpv1uReceiver(int h) {
|
||||
void *ocp_gtpv1uTask(void *args) {
|
||||
while(1) {
|
||||
/* Trying to fetch a message from the message queue.
|
||||
If the queue is empty, this function will block till a
|
||||
message is sent to the task.
|
||||
If the queue is empty, this function will block till a
|
||||
message is sent to the task.
|
||||
*/
|
||||
MessageDef *message_p = NULL;
|
||||
itti_receive_msg(OCP_GTPV1_U, &message_p);
|
||||
|
||||
Reference in New Issue
Block a user