Commit 931cf0a8 authored by francescomani's avatar francescomani

more review fixes

parent c9b043eb
...@@ -618,7 +618,7 @@ void init_fep_thread(RU_t *ru, ...@@ -618,7 +618,7 @@ void init_fep_thread(RU_t *ru,
void kill_fep_thread(RU_t *ru) void kill_fep_thread(RU_t *ru)
{ {
RU_proc_t *proc = &ru->proc; RU_proc_t *proc = &ru->proc;
if (proc->pthread_fep[0] == 0) if (proc->pthread_fep == 0)
return; return;
pthread_mutex_lock( &proc->mutex_fep[0] ); pthread_mutex_lock( &proc->mutex_fep[0] );
proc->instance_cnt_fep[0] = 0; proc->instance_cnt_fep[0] = 0;
......
...@@ -213,7 +213,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP, ...@@ -213,7 +213,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
msi_pos++; msi_pos++;
mbms_mch_i=0; mbms_mch_i=0;
if(subframeP==0){ if (subframeP==0) {
x=0; x=0;
mbms_mch_i=0; mbms_mch_i=0;
} }
...@@ -459,7 +459,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP, ...@@ -459,7 +459,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
module_idP, CC_id, frameP, subframeP, i, j, module_idP, CC_id, frameP, subframeP, i, j,
cc->mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0], cc->mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0],
msi_pos); msi_pos);
if(subframeP==1){ if (subframeP==1) {
x=0; x=0;
mbms_mch_i=0; mbms_mch_i=0;
LOG_D(MAC,"MSP, frameP %d subframeP %d msi_pos(%d) mbms_mch_i %d\n",frameP, subframeP, msi_pos,mbms_mch_i); LOG_D(MAC,"MSP, frameP %d subframeP %d msi_pos(%d) mbms_mch_i %d\n",frameP, subframeP, msi_pos,mbms_mch_i);
...@@ -708,7 +708,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP, ...@@ -708,7 +708,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
uint16_t msi_control_element[29], *msi_ptr; uint16_t msi_control_element[29], *msi_ptr;
// MSI buffer pointer // MSI buffer pointer
char *buffer_pointer=NULL; char *buffer_pointer=NULL;
if (msi_flag == 1 && cc->mbms_SessionList[mbms_mch_i]) { if (msi_flag == 1 && cc->mbms_SessionList) {
// Create MSI here // Create MSI here
msi_ptr = &msi_control_element[0]; msi_ptr = &msi_control_element[0];
...@@ -868,7 +868,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP, ...@@ -868,7 +868,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
// there is MTCHs, loop if there are more than 1 // there is MTCHs, loop if there are more than 1
// BAd race condition: all this struct is filled by another thread, no mutex or any code to make it coherent // BAd race condition: all this struct is filled by another thread, no mutex or any code to make it coherent
if (mtch_flag == 1 && cc->mbms_SessionList[0] && cc->mbms_SessionList[0]->list.array[0]) { if (mtch_flag == 1 && cc->mbms_SessionList && cc->mbms_SessionList[0] && cc->mbms_SessionList[0]->list.array[0]) {
// Calculate TBS // Calculate TBS
// get MTCH data from RLC (like for DTCH) // get MTCH data from RLC (like for DTCH)
LOG_D(MAC, "[eNB %d] CC_id %d Frame %d subframeP %d: Schedule MTCH (area %d, sfAlloc %d)\n", module_idP, CC_id, frameP, subframeP, i, j); LOG_D(MAC, "[eNB %d] CC_id %d Frame %d subframeP %d: Schedule MTCH (area %d, sfAlloc %d)\n", module_idP, CC_id, frameP, subframeP, i, j);
......
...@@ -680,27 +680,8 @@ uint16_t get_NCS(uint8_t index, uint16_t format0, uint8_t restricted_set_config) ...@@ -680,27 +680,8 @@ uint16_t get_NCS(uint8_t index, uint16_t format0, uint8_t restricted_set_config)
} }
} }
//38.211 Table 6.3.3.2-1 //from 38.211 Table 6.3.3.2-1
// delta_f_RA_PRACH = 1 in the first 3 lines needs to be converted to 1.25 int16_t N_RA_RB[16] = {6, 3, 2, 24, 12, 6, 12, 6, 3, 24, 12, 6, 12, 6, 24, 12};
int16_t table_6_3_3_2_1[16][5] = {
//Length_RA, delta_f_RA_PRACH, delta_f_PUSCH, N_RA_RB, kbar
{ 839, 1, 15, 6, 7},
{ 839, 1, 30, 3, 1},
{ 839, 1, 60, 2, 133},
{ 839, 5, 15, 24, 12},
{ 839, 5, 30, 12, 10},
{ 839, 5, 60, 6, 7},
{ 139, 15, 15, 12, 2},
{ 139, 15, 30, 6, 2},
{ 139, 15, 60, 3, 2},
{ 139, 30, 15, 24, 2},
{ 139, 30, 30, 12, 2},
{ 139, 30, 60, 6, 2},
{ 139, 60, 60, 12, 2},
{ 139, 60, 120, 6, 2},
{ 139, 120, 60, 24, 2},
{ 139, 120, 120, 12, 2}
};
/* Function to get number of RBs required for prach occasion based on /* Function to get number of RBs required for prach occasion based on
* 38.211 Table 6.3.3.2-1 */ * 38.211 Table 6.3.3.2-1 */
...@@ -742,7 +723,7 @@ int16_t get_N_RA_RB (int delta_f_RA_PRACH,int delta_f_PUSCH) { ...@@ -742,7 +723,7 @@ int16_t get_N_RA_RB (int delta_f_RA_PRACH,int delta_f_PUSCH) {
break; break;
default : index = 10;/*30khz prach scs and 30khz pusch scs*/ default : index = 10;/*30khz prach scs and 30khz pusch scs*/
} }
return table_6_3_3_2_1[index][3]; return N_RA_RB[index];
} }
// Table 6.3.3.2-2: Random access configurations for FR1 and paired spectrum/supplementary uplink // Table 6.3.3.2-2: Random access configurations for FR1 and paired spectrum/supplementary uplink
// the column 5, (SFN_nbr is a bitmap where we set bit to '1' in the position of the subframe where the RACH can be sent. // the column 5, (SFN_nbr is a bitmap where we set bit to '1' in the position of the subframe where the RACH can be sent.
......
...@@ -1464,7 +1464,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -1464,7 +1464,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
//memset((*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310, 0, sizeof(BCCH_Config_v1310_t)); //memset((*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310, 0, sizeof(BCCH_Config_v1310_t));
//(*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310->modificationPeriodCoeff_v1310 = BCCH_Config_v1310__modificationPeriodCoeff_v1310_n64; //(*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310->modificationPeriodCoeff_v1310 = BCCH_Config_v1310__modificationPeriodCoeff_v1310_n64;
if (configuration->pcch_config_v1310[CC_id]) { if (configuration->pcch_config_v1310) {
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = CALLOC(1, sizeof(LTE_PCCH_Config_v1310_t)); (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = CALLOC(1, sizeof(LTE_PCCH_Config_v1310_t));
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->paging_narrowBands_r13 = configuration->paging_narrowbands_r13[CC_id]; (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->paging_narrowBands_r13 = configuration->paging_narrowbands_r13[CC_id];
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->mpdcch_NumRepetition_Paging_r13 = configuration->mpdcch_numrepetition_paging_r13[CC_id]; (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->mpdcch_NumRepetition_Paging_r13 = configuration->mpdcch_numrepetition_paging_r13[CC_id];
......
...@@ -1963,6 +1963,7 @@ rrc_ue_process_rrcConnectionReconfiguration( ...@@ -1963,6 +1963,7 @@ rrc_ue_process_rrcConnectionReconfiguration(
sizeof(msg)); sizeof(msg));
nsa_sendmsg_to_nrue(&msg, sizeof(msg), RRC_CONFIG_COMPLETE_REQ); nsa_sendmsg_to_nrue(&msg, sizeof(msg), RRC_CONFIG_COMPLETE_REQ);
free(msg.buffer);
LOG_A(RRC, "Sent RRC_CONFIG_COMPLETE_REQ to the NR UE\n"); LOG_A(RRC, "Sent RRC_CONFIG_COMPLETE_REQ to the NR UE\n");
} }
......
...@@ -3244,69 +3244,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t ...@@ -3244,69 +3244,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
quantityConfig = NULL; quantityConfig = NULL;
} }
//-----------------------------------------------------------------------------
int
rrc_eNB_generate_RRCConnectionReconfiguration_SCell(
const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
uint32_t dl_CarrierFreq_r10
)
//-----------------------------------------------------------------------------
{
uint8_t size;
uint8_t buffer[100];
uint8_t sCellIndexToAdd = 0; //one SCell so far
// uint8_t sCellIndexToAdd;
// sCellIndexToAdd = rrc_find_free_SCell_index(enb_mod_idP, ue_mod_idP, 1);
// if (RC.rrc[enb_mod_idP]->sCell_config[ue_mod_idP][sCellIndexToAdd] ) {
if (&ue_context_pP->ue_context.sCell_config[sCellIndexToAdd] != NULL) {
ue_context_pP->ue_context.sCell_config[sCellIndexToAdd].cellIdentification_r10->dl_CarrierFreq_r10 = dl_CarrierFreq_r10;
} else {
LOG_E(RRC,"Scell not configured!\n");
return(-1);
}
size = do_RRCConnectionReconfiguration(ctxt_pP,
buffer,
sizeof(buffer),
rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id),//Transaction_id,
(LTE_SRB_ToAddModList_t *)NULL,
(LTE_DRB_ToAddModList_t *)NULL,
(LTE_DRB_ToReleaseList_t *)NULL,
(struct LTE_SPS_Config *)NULL,
(struct LTE_PhysicalConfigDedicated *)NULL,
(LTE_MeasObjectToAddModList_t *)NULL,
(LTE_ReportConfigToAddModList_t *)NULL,
(LTE_QuantityConfig_t *)NULL,
(LTE_MeasIdToAddModList_t *)NULL,
(LTE_MAC_MainConfig_t *)NULL,
(LTE_MeasGapConfig_t *)NULL,
(LTE_MobilityControlInfo_t *)NULL,
(LTE_SecurityConfigHO_t *)NULL,
(struct LTE_MeasConfig__speedStatePars *)NULL,
(LTE_RSRP_Range_t *)NULL,
(LTE_C_RNTI_t *)NULL,
(struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *)NULL,
(LTE_SL_CommConfig_r12_t *)NULL,
(LTE_SL_DiscConfig_r12_t *)NULL,
ue_context_pP->ue_context.sCell_config
);
LOG_I(RRC,"[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate LTE_RRCConnectionReconfiguration (bytes %d, UE id %x)\n",
ctxt_pP->module_id,ctxt_pP->frame, size, ue_context_pP->ue_context.rnti);
rrc_data_req(
ctxt_pP,
DCCH,
rrc_eNB_mui++,
SDU_CONFIRM_NO,
size,
buffer,
PDCP_TRANSMISSION_MODE_CONTROL);
return(0);
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/** /**
* @fn :encode_CG_ConfigInfo * @fn :encode_CG_ConfigInfo
......
...@@ -743,37 +743,40 @@ int ngap_gNB_initial_ctxt_resp( ...@@ -743,37 +743,40 @@ int ngap_gNB_initial_ctxt_resp(
ie->value.present = NGAP_InitialContextSetupResponseIEs__value_PR_PDUSessionResourceFailedToSetupListCxtRes; ie->value.present = NGAP_InitialContextSetupResponseIEs__value_PR_PDUSessionResourceFailedToSetupListCxtRes;
for (i = 0; i < initial_ctxt_resp_p->nb_of_pdusessions_failed; i++) { for (i = 0; i < initial_ctxt_resp_p->nb_of_pdusessions_failed; i++) {
NGAP_PDUSessionResourceFailedToSetupItemCxtRes_t *item= calloc(1, sizeof *item); NGAP_PDUSessionResourceFailedToSetupItemCxtRes_t *item = calloc(1, sizeof *item);
NGAP_PDUSessionResourceSetupUnsuccessfulTransfer_t *pdusessionUnTransfer_p = calloc(1, sizeof *pdusessionUnTransfer_p); NGAP_PDUSessionResourceSetupUnsuccessfulTransfer_t *pdusessionUnTransfer_p = calloc(1, sizeof *pdusessionUnTransfer_p);
/* pDUSessionID */ /* pDUSessionID */
item->pDUSessionID = initial_ctxt_resp_p->pdusessions_failed[i].pdusession_id; item->pDUSessionID = initial_ctxt_resp_p->pdusessions_failed[i].pdusession_id;
/* cause */ /* cause */
switch(initial_ctxt_resp_p->pdusessions_failed[i].cause) {
pdusessionUnTransfer_p->cause.present = (NGAP_Cause_PR) initial_ctxt_resp_p->pdusessions_failed[i].cause; case NGAP_CAUSE_RADIO_NETWORK:
switch(pdusessionUnTransfer_p->cause.present) { pdusessionUnTransfer_p->cause.present = NGAP_Cause_PR_radioNetwork;
case NGAP_Cause_PR_radioNetwork:
pdusessionUnTransfer_p->cause.choice.radioNetwork = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; pdusessionUnTransfer_p->cause.choice.radioNetwork = initial_ctxt_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_transport: case NGAP_CAUSE_TRANSPORT:
pdusessionUnTransfer_p->cause.present = NGAP_Cause_PR_transport;
pdusessionUnTransfer_p->cause.choice.transport = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; pdusessionUnTransfer_p->cause.choice.transport = initial_ctxt_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_nas: case NGAP_CAUSE_NAS:
pdusessionUnTransfer_p->cause.present = NGAP_Cause_PR_nas;
pdusessionUnTransfer_p->cause.choice.nas = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; pdusessionUnTransfer_p->cause.choice.nas = initial_ctxt_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_protocol: case NGAP_CAUSE_PROTOCOL:
pdusessionUnTransfer_p->cause.present = NGAP_Cause_PR_protocol;
pdusessionUnTransfer_p->cause.choice.protocol = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; pdusessionUnTransfer_p->cause.choice.protocol = initial_ctxt_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_misc: case NGAP_CAUSE_MISC:
pdusessionUnTransfer_p->cause.present = NGAP_Cause_PR_misc;
pdusessionUnTransfer_p->cause.choice.misc = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; pdusessionUnTransfer_p->cause.choice.misc = initial_ctxt_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_NOTHING: case NGAP_CAUSE_NOTHING:
default: default:
break; break;
} }
...@@ -786,7 +789,6 @@ int ngap_gNB_initial_ctxt_resp( ...@@ -786,7 +789,6 @@ int ngap_gNB_initial_ctxt_resp(
item->pDUSessionResourceSetupUnsuccessfulTransfer.size = res.result.encoded; item->pDUSessionResourceSetupUnsuccessfulTransfer.size = res.result.encoded;
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupUnsuccessfulTransfer, pdusessionUnTransfer_p); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupUnsuccessfulTransfer, pdusessionUnTransfer_p);
asn1cSeqAdd(&ie->value.choice.PDUSessionResourceFailedToSetupListCxtRes.list, item); asn1cSeqAdd(&ie->value.choice.PDUSessionResourceFailedToSetupListCxtRes.list, item);
} }
...@@ -1047,29 +1049,33 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance, ...@@ -1047,29 +1049,33 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance,
item->pDUSessionID = pdusession_setup_resp_p->pdusessions_failed[i].pdusession_id; item->pDUSessionID = pdusession_setup_resp_p->pdusessions_failed[i].pdusession_id;
/* cause */ /* cause */
pdusessionUnTransfer_p->cause.present = (NGAP_Cause_PR) pdusession_setup_resp_p->pdusessions_failed[i].cause; switch(pdusession_setup_resp_p->pdusessions_failed[i].cause) {
switch(pdusessionUnTransfer_p->cause.present) { case NGAP_CAUSE_RADIO_NETWORK:
case NGAP_Cause_PR_radioNetwork: pdusessionUnTransfer_p->cause.present = NGAP_Cause_PR_radioNetwork;
pdusessionUnTransfer_p->cause.choice.radioNetwork = pdusession_setup_resp_p->pdusessions_failed[i].cause_value; pdusessionUnTransfer_p->cause.choice.radioNetwork = pdusession_setup_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_transport: case NGAP_CAUSE_TRANSPORT:
pdusessionUnTransfer_p->cause.present = NGAP_Cause_PR_transport;
pdusessionUnTransfer_p->cause.choice.transport = pdusession_setup_resp_p->pdusessions_failed[i].cause_value; pdusessionUnTransfer_p->cause.choice.transport = pdusession_setup_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_nas: case NGAP_CAUSE_NAS:
pdusessionUnTransfer_p->cause.present = NGAP_Cause_PR_nas;
pdusessionUnTransfer_p->cause.choice.nas = pdusession_setup_resp_p->pdusessions_failed[i].cause_value; pdusessionUnTransfer_p->cause.choice.nas = pdusession_setup_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_protocol: case NGAP_CAUSE_PROTOCOL:
pdusessionUnTransfer_p->cause.present = NGAP_Cause_PR_protocol;
pdusessionUnTransfer_p->cause.choice.protocol = pdusession_setup_resp_p->pdusessions_failed[i].cause_value; pdusessionUnTransfer_p->cause.choice.protocol = pdusession_setup_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_misc: case NGAP_CAUSE_MISC:
pdusessionUnTransfer_p->cause.present = NGAP_Cause_PR_misc;
pdusessionUnTransfer_p->cause.choice.misc = pdusession_setup_resp_p->pdusessions_failed[i].cause_value; pdusessionUnTransfer_p->cause.choice.misc = pdusession_setup_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_NOTHING: case NGAP_CAUSE_NOTHING:
default: default:
break; break;
} }
...@@ -1230,30 +1236,34 @@ int ngap_gNB_pdusession_modify_resp(instance_t instance, ...@@ -1230,30 +1236,34 @@ int ngap_gNB_pdusession_modify_resp(instance_t instance,
item->pDUSessionID = pdusession_modify_resp_p->pdusessions_failed[i].pdusession_id; item->pDUSessionID = pdusession_modify_resp_p->pdusessions_failed[i].pdusession_id;
pdusessionTransfer_p = (NGAP_PDUSessionResourceModifyUnsuccessfulTransfer_t *)calloc(1, sizeof(NGAP_PDUSessionResourceModifyUnsuccessfulTransfer_t)); pdusessionTransfer_p = (NGAP_PDUSessionResourceModifyUnsuccessfulTransfer_t *)calloc(1, sizeof(NGAP_PDUSessionResourceModifyUnsuccessfulTransfer_t));
pdusessionTransfer_p->cause.present = (NGAP_Cause_PR) pdusession_modify_resp_p->pdusessions_failed[i].cause;
switch(pdusessionTransfer_p->cause.present) { switch(pdusession_modify_resp_p->pdusessions_failed[i].cause) {
case NGAP_Cause_PR_radioNetwork: case NGAP_CAUSE_RADIO_NETWORK:
pdusessionTransfer_p->cause.present = NGAP_Cause_PR_radioNetwork;
pdusessionTransfer_p->cause.choice.radioNetwork = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; pdusessionTransfer_p->cause.choice.radioNetwork = pdusession_modify_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_transport: case NGAP_CAUSE_TRANSPORT:
pdusessionTransfer_p->cause.present = NGAP_Cause_PR_transport;
pdusessionTransfer_p->cause.choice.transport = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; pdusessionTransfer_p->cause.choice.transport = pdusession_modify_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_nas: case NGAP_CAUSE_NAS:
pdusessionTransfer_p->cause.present = NGAP_Cause_PR_nas;
pdusessionTransfer_p->cause.choice.nas = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; pdusessionTransfer_p->cause.choice.nas = pdusession_modify_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_protocol: case NGAP_CAUSE_PROTOCOL:
pdusessionTransfer_p->cause.present = NGAP_Cause_PR_protocol;
pdusessionTransfer_p->cause.choice.protocol = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; pdusessionTransfer_p->cause.choice.protocol = pdusession_modify_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_misc: case NGAP_CAUSE_MISC:
pdusessionTransfer_p->cause.present = NGAP_Cause_PR_misc;
pdusessionTransfer_p->cause.choice.misc = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; pdusessionTransfer_p->cause.choice.misc = pdusession_modify_resp_p->pdusessions_failed[i].cause_value;
break; break;
case NGAP_Cause_PR_NOTHING: case NGAP_CAUSE_NOTHING:
default: default:
break; break;
} }
......
...@@ -700,26 +700,30 @@ int s1ap_eNB_initial_ctxt_resp( ...@@ -700,26 +700,30 @@ int s1ap_eNB_initial_ctxt_resp(
item->criticality = S1AP_Criticality_ignore; item->criticality = S1AP_Criticality_ignore;
item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem; item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem;
item->value.choice.E_RABItem.e_RAB_ID = initial_ctxt_resp_p->e_rabs_failed[i].e_rab_id; item->value.choice.E_RABItem.e_RAB_ID = initial_ctxt_resp_p->e_rabs_failed[i].e_rab_id;
item->value.choice.E_RABItem.cause.present = (S1AP_Cause_PR) initial_ctxt_resp_p->e_rabs_failed[i].cause;
switch(item->value.choice.E_RABItem.cause.present) { switch(initial_ctxt_resp_p->e_rabs_failed[i].cause) {
case S1AP_Cause_PR_radioNetwork: case S1AP_CAUSE_RADIO_NETWORK:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_radioNetwork;
item->value.choice.E_RABItem.cause.choice.radioNetwork = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.radioNetwork = initial_ctxt_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_transport: case S1AP_CAUSE_TRANSPORT:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_transport;
item->value.choice.E_RABItem.cause.choice.transport = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.transport = initial_ctxt_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_nas: case S1AP_CAUSE_NAS:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_nas;
item->value.choice.E_RABItem.cause.choice.nas = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.nas = initial_ctxt_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_protocol: case S1AP_CAUSE_PROTOCOL:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_protocol;
item->value.choice.E_RABItem.cause.choice.protocol = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.protocol = initial_ctxt_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_misc: case S1AP_CAUSE_MISC:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_misc;
item->value.choice.E_RABItem.cause.choice.misc = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.misc = initial_ctxt_resp_p->e_rabs_failed[i].cause_value;
break; break;
...@@ -947,26 +951,30 @@ int s1ap_eNB_e_rab_setup_resp(instance_t instance, ...@@ -947,26 +951,30 @@ int s1ap_eNB_e_rab_setup_resp(instance_t instance,
item->criticality = S1AP_Criticality_ignore; item->criticality = S1AP_Criticality_ignore;
item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem; item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem;
item->value.choice.E_RABItem.e_RAB_ID = e_rab_setup_resp_p->e_rabs_failed[i].e_rab_id; item->value.choice.E_RABItem.e_RAB_ID = e_rab_setup_resp_p->e_rabs_failed[i].e_rab_id;
item->value.choice.E_RABItem.cause.present = (S1AP_Cause_PR) e_rab_setup_resp_p->e_rabs_failed[i].cause;
switch(item->value.choice.E_RABItem.cause.present) { switch(e_rab_setup_resp_p->e_rabs_failed[i].cause) {
case S1AP_Cause_PR_radioNetwork: case S1AP_CAUSE_RADIO_NETWORK:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_radioNetwork;
item->value.choice.E_RABItem.cause.choice.radioNetwork = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.radioNetwork = e_rab_setup_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_transport: case S1AP_CAUSE_TRANSPORT:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_transport;
item->value.choice.E_RABItem.cause.choice.transport = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.transport = e_rab_setup_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_nas: case S1AP_CAUSE_NAS:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_nas;
item->value.choice.E_RABItem.cause.choice.nas = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.nas = e_rab_setup_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_protocol: case S1AP_CAUSE_PROTOCOL:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_protocol;
item->value.choice.E_RABItem.cause.choice.protocol = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.protocol = e_rab_setup_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_misc: case S1AP_CAUSE_MISC:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_misc;
item->value.choice.E_RABItem.cause.choice.misc = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.misc = e_rab_setup_resp_p->e_rabs_failed[i].cause_value;
break; break;
...@@ -1107,26 +1115,30 @@ int s1ap_eNB_e_rab_modify_resp(instance_t instance, ...@@ -1107,26 +1115,30 @@ int s1ap_eNB_e_rab_modify_resp(instance_t instance,
item->criticality = S1AP_Criticality_ignore; item->criticality = S1AP_Criticality_ignore;
item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem; item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem;
item->value.choice.E_RABItem.e_RAB_ID = e_rab_modify_resp_p->e_rabs_failed[i].e_rab_id; item->value.choice.E_RABItem.e_RAB_ID = e_rab_modify_resp_p->e_rabs_failed[i].e_rab_id;
item->value.choice.E_RABItem.cause.present = (S1AP_Cause_PR) e_rab_modify_resp_p->e_rabs_failed[i].cause;
switch(item->value.choice.E_RABItem.cause.present) { switch(e_rab_modify_resp_p->e_rabs_failed[i].cause) {
case S1AP_Cause_PR_radioNetwork: case S1AP_CAUSE_RADIO_NETWORK:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_radioNetwork;
item->value.choice.E_RABItem.cause.choice.radioNetwork = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.radioNetwork = e_rab_modify_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_transport: case S1AP_CAUSE_TRANSPORT:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_transport;
item->value.choice.E_RABItem.cause.choice.transport = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.transport = e_rab_modify_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_nas: case S1AP_CAUSE_NAS:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_nas;
item->value.choice.E_RABItem.cause.choice.nas = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.nas = e_rab_modify_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_protocol: case S1AP_CAUSE_PROTOCOL:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_protocol;
item->value.choice.E_RABItem.cause.choice.protocol = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.protocol = e_rab_modify_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_misc: case S1AP_CAUSE_MISC:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_misc;
item->value.choice.E_RABItem.cause.choice.misc = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.misc = e_rab_modify_resp_p->e_rabs_failed[i].cause_value;
break; break;
...@@ -1138,7 +1150,6 @@ int s1ap_eNB_e_rab_modify_resp(instance_t instance, ...@@ -1138,7 +1150,6 @@ int s1ap_eNB_e_rab_modify_resp(instance_t instance,
S1AP_DEBUG("e_rab_modify_resp: failed e_rab ID %ld\n", item->value.choice.E_RABItem.e_RAB_ID); S1AP_DEBUG("e_rab_modify_resp: failed e_rab ID %ld\n", item->value.choice.E_RABItem.e_RAB_ID);
asn1cSeqAdd(&ie->value.choice.E_RABList.list, item); asn1cSeqAdd(&ie->value.choice.E_RABList.list, item);
} }
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
} }
...@@ -1249,42 +1260,41 @@ int s1ap_eNB_e_rab_release_resp(instance_t instance, ...@@ -1249,42 +1260,41 @@ int s1ap_eNB_e_rab_release_resp(instance_t instance,
item->criticality = S1AP_Criticality_ignore; item->criticality = S1AP_Criticality_ignore;
item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem; item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem;
item->value.choice.E_RABItem.e_RAB_ID = e_rab_release_resp_p->e_rabs_failed[i].e_rab_id; item->value.choice.E_RABItem.e_RAB_ID = e_rab_release_resp_p->e_rabs_failed[i].e_rab_id;
item->value.choice.E_RABItem.cause.present = (S1AP_Cause_PR) e_rab_release_resp_p->e_rabs_failed[i].cause;
switch(item->value.choice.E_RABItem.cause.present) { switch(e_rab_release_resp_p->e_rabs_failed[i].cause) {
case S1AP_Cause_PR_radioNetwork: case S1AP_CAUSE_RADIO_NETWORK:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_radioNetwork;
item->value.choice.E_RABItem.cause.choice.radioNetwork = e_rab_release_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.radioNetwork = e_rab_release_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_transport: case S1AP_CAUSE_TRANSPORT:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_transport;
item->value.choice.E_RABItem.cause.choice.transport = e_rab_release_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.transport = e_rab_release_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_nas: case S1AP_CAUSE_NAS:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_nas;
item->value.choice.E_RABItem.cause.choice.nas = e_rab_release_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.nas = e_rab_release_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_protocol: case S1AP_CAUSE_PROTOCOL:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_protocol;
item->value.choice.E_RABItem.cause.choice.protocol = e_rab_release_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.protocol = e_rab_release_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_misc: case S1AP_CAUSE_MISC:
item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_misc;
item->value.choice.E_RABItem.cause.choice.misc = e_rab_release_resp_p->e_rabs_failed[i].cause_value; item->value.choice.E_RABItem.cause.choice.misc = e_rab_release_resp_p->e_rabs_failed[i].cause_value;
break; break;
case S1AP_Cause_PR_NOTHING: case S1AP_Cause_PR_NOTHING:
default: default:
break; break;
} }
asn1cSeqAdd(&ie->value.choice.E_RABList.list, item); asn1cSeqAdd(&ie->value.choice.E_RABList.list, item);
} }
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
} }
if (s1ap_eNB_encode_pdu(&pdu, &buffer, &length) < 0) { if (s1ap_eNB_encode_pdu(&pdu, &buffer, &length) < 0) {
S1AP_ERROR("Failed to encode release response\n"); S1AP_ERROR("Failed to encode release response\n");
/* Encode procedure has failed... */ /* Encode procedure has failed... */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment