Commit 66650cd5 authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'NR_SA_F1AP_5GRECORDS' of...

Merge branch 'NR_SA_F1AP_5GRECORDS' of https://gitlab.eurecom.fr/oai/openairinterface5g into NR_SA_F1AP_5GRECORDS
parents fdc91e79 a9603c8a
...@@ -63,6 +63,7 @@ void nr_pdcp_integrity_nia2_integrity(void *integrity_context, ...@@ -63,6 +63,7 @@ void nr_pdcp_integrity_nia2_integrity(void *integrity_context,
* (which is identical to 128-NIA2, see 33.501 D.3.1.3) */ * (which is identical to 128-NIA2, see 33.501 D.3.1.3) */
compute_t(t, count, bearer, direction); compute_t(t, count, bearer, direction);
CMAC_Init(ctx, NULL, 0, NULL, NULL);
CMAC_Update(ctx, t, 8); CMAC_Update(ctx, t, 8);
CMAC_Update(ctx, buffer, length); CMAC_Update(ctx, buffer, length);
CMAC_Final(ctx, mac, &maclen); CMAC_Final(ctx, mac, &maclen);
......
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
#include "NR_RRCReconfigurationComplete-IEs.h" #include "NR_RRCReconfigurationComplete-IEs.h"
#include "NR_DLInformationTransfer.h" #include "NR_DLInformationTransfer.h"
#include "NR_RRCReestablishmentRequest.h" #include "NR_RRCReestablishmentRequest.h"
#include "NR_UE-CapabilityRequestFilterNR.h"
#include "PHY/defs_nr_common.h" #include "PHY/defs_nr_common.h"
#if defined(NR_Rel16) #if defined(NR_Rel16)
#include "NR_SCS-SpecificCarrier.h" #include "NR_SCS-SpecificCarrier.h"
...@@ -1076,7 +1077,8 @@ void fill_initial_SpCellConfig(rnti_t rnti, ...@@ -1076,7 +1077,8 @@ void fill_initial_SpCellConfig(rnti_t rnti,
ASN_SEQUENCE_ADD(&bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList->list, ASN_SEQUENCE_ADD(&bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList->list,
ss2); ss2);
SpCellConfig->spCellConfigDedicated->tag_Id=0;
} }
void fill_initial_cellGroupConfig(rnti_t rnti, void fill_initial_cellGroupConfig(rnti_t rnti,
...@@ -1127,6 +1129,10 @@ void fill_initial_cellGroupConfig(rnti_t rnti, ...@@ -1127,6 +1129,10 @@ void fill_initial_cellGroupConfig(rnti_t rnti,
logicalChannelGroup = CALLOC(1, sizeof(long)); logicalChannelGroup = CALLOC(1, sizeof(long));
*logicalChannelGroup = 0; *logicalChannelGroup = 0;
logicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = logicalChannelGroup; logicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = logicalChannelGroup;
logicalChannelConfig->ul_SpecificParameters->schedulingRequestID = CALLOC(1, sizeof(*logicalChannelConfig->ul_SpecificParameters->schedulingRequestID));
*logicalChannelConfig->ul_SpecificParameters->schedulingRequestID = 0;
logicalChannelConfig->ul_SpecificParameters->logicalChannelSR_Mask = 0;
logicalChannelConfig->ul_SpecificParameters->logicalChannelSR_DelayTimerApplied = 0;
//} //}
rlc_BearerConfig->mac_LogicalChannelConfig = logicalChannelConfig; rlc_BearerConfig->mac_LogicalChannelConfig = logicalChannelConfig;
...@@ -1135,11 +1141,27 @@ void fill_initial_cellGroupConfig(rnti_t rnti, ...@@ -1135,11 +1141,27 @@ void fill_initial_cellGroupConfig(rnti_t rnti,
cellGroupConfig->rlc_BearerToReleaseList = NULL; cellGroupConfig->rlc_BearerToReleaseList = NULL;
/* mac CellGroup Config */ /* mac CellGroup Config */
if (0) { if (1) {
mac_CellGroupConfig = calloc(1, sizeof(NR_MAC_CellGroupConfig_t)); mac_CellGroupConfig = calloc(1, sizeof(*mac_CellGroupConfig));
mac_CellGroupConfig->schedulingRequestConfig = calloc(1, sizeof(*mac_CellGroupConfig->schedulingRequestConfig));
mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList = CALLOC(1,sizeof(*mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList));
struct NR_SchedulingRequestToAddMod *schedulingrequestlist;
schedulingrequestlist = CALLOC(1,sizeof(*schedulingrequestlist));
schedulingrequestlist->schedulingRequestId = 0;
schedulingrequestlist->sr_ProhibitTimer = CALLOC(1,sizeof(*schedulingrequestlist->sr_ProhibitTimer));
*(schedulingrequestlist->sr_ProhibitTimer) = 0;
schedulingrequestlist->sr_TransMax = 0;
ASN_SEQUENCE_ADD(&(mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList->list),schedulingrequestlist);
mac_CellGroupConfig->bsr_Config = calloc(1, sizeof(*mac_CellGroupConfig->bsr_Config)); mac_CellGroupConfig->bsr_Config = calloc(1, sizeof(*mac_CellGroupConfig->bsr_Config));
mac_CellGroupConfig->bsr_Config->periodicBSR_Timer = NR_BSR_Config__periodicBSR_Timer_sf10; mac_CellGroupConfig->bsr_Config->periodicBSR_Timer = NR_BSR_Config__periodicBSR_Timer_sf10;
mac_CellGroupConfig->bsr_Config->retxBSR_Timer = NR_BSR_Config__retxBSR_Timer_sf80; mac_CellGroupConfig->bsr_Config->retxBSR_Timer = NR_BSR_Config__retxBSR_Timer_sf80;
mac_CellGroupConfig->tag_Config = calloc(1, sizeof(*mac_CellGroupConfig->tag_Config));
mac_CellGroupConfig->tag_Config->tag_ToReleaseList = NULL;
mac_CellGroupConfig->tag_Config->tag_ToAddModList = calloc(1,sizeof(*mac_CellGroupConfig->tag_Config->tag_ToAddModList));
struct NR_TAG *tag=calloc(1,sizeof(*tag));
tag->tag_Id = 0;
tag->timeAlignmentTimer = NR_TimeAlignmentTimer_infinity;
ASN_SEQUENCE_ADD(&mac_CellGroupConfig->tag_Config->tag_ToAddModList->list,tag);
mac_CellGroupConfig->phr_Config = calloc(1, sizeof(*mac_CellGroupConfig->phr_Config)); mac_CellGroupConfig->phr_Config = calloc(1, sizeof(*mac_CellGroupConfig->phr_Config));
mac_CellGroupConfig->phr_Config->present = NR_SetupRelease_PHR_Config_PR_setup; mac_CellGroupConfig->phr_Config->present = NR_SetupRelease_PHR_Config_PR_setup;
mac_CellGroupConfig->phr_Config->choice.setup = calloc(1, sizeof(*mac_CellGroupConfig->phr_Config->choice.setup)); mac_CellGroupConfig->phr_Config->choice.setup = calloc(1, sizeof(*mac_CellGroupConfig->phr_Config->choice.setup));
...@@ -1243,7 +1265,7 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, ...@@ -1243,7 +1265,7 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
NULL, NULL,
(void *)cellGroupConfig, (void *)cellGroupConfig,
masterCellGroup_buf, masterCellGroup_buf,
100); 1000);
if(enc_rval.encoded == -1) { if(enc_rval.encoded == -1) {
LOG_E(NR_RRC, "ASN1 message CellGroupConfig encoding failed (%s, %lu)!\n", LOG_E(NR_RRC, "ASN1 message CellGroupConfig encoding failed (%s, %lu)!\n",
...@@ -1264,7 +1286,7 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, ...@@ -1264,7 +1286,7 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
NULL, NULL,
(void *)&dl_ccch_msg, (void *)&dl_ccch_msg,
buffer, buffer,
100); 1000);
if(enc_rval.encoded == -1) { if(enc_rval.encoded == -1) {
LOG_E(NR_RRC, "[gNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n", LOG_E(NR_RRC, "[gNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
...@@ -1346,6 +1368,11 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP, ...@@ -1346,6 +1368,11 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
const uint8_t Transaction_id) const uint8_t Transaction_id)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
NR_UE_CapabilityRequestFilterNR_t *sa_band_filter;
NR_FreqBandList_t *sa_band_list;
NR_FreqBandInformation_t *sa_band_info;
NR_FreqBandInformationNR_t *sa_band_infoNR;
NR_DL_DCCH_Message_t dl_dcch_msg; NR_DL_DCCH_Message_t dl_dcch_msg;
NR_UE_CapabilityRAT_Request_t *ue_capabilityrat_request; NR_UE_CapabilityRAT_Request_t *ue_capabilityrat_request;
...@@ -1362,6 +1389,35 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP, ...@@ -1362,6 +1389,35 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
memset(ue_capabilityrat_request,0,sizeof(NR_UE_CapabilityRAT_Request_t)); memset(ue_capabilityrat_request,0,sizeof(NR_UE_CapabilityRAT_Request_t));
ue_capabilityrat_request->rat_Type = NR_RAT_Type_nr; ue_capabilityrat_request->rat_Type = NR_RAT_Type_nr;
sa_band_infoNR = (NR_FreqBandInformationNR_t*)calloc(1,sizeof(NR_FreqBandInformationNR_t));
sa_band_infoNR->bandNR = 78;
sa_band_info = (NR_FreqBandInformation_t*)calloc(1,sizeof(NR_FreqBandInformation_t));
sa_band_info->present = NR_FreqBandInformation_PR_bandInformationNR;
sa_band_info->choice.bandInformationNR = sa_band_infoNR;
sa_band_list = (NR_FreqBandList_t *)calloc(1, sizeof(NR_FreqBandList_t));
ASN_SEQUENCE_ADD(&sa_band_list->list, sa_band_info);
sa_band_filter = (NR_UE_CapabilityRequestFilterNR_t*)calloc(1,sizeof(NR_UE_CapabilityRequestFilterNR_t));
sa_band_filter->frequencyBandListFilter = sa_band_list;
OCTET_STRING_t req_freq;
unsigned char req_freq_buf[1024];
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_UE_CapabilityRequestFilterNR,
NULL,
(void *)sa_band_filter,
req_freq_buf,
1024);
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout, &asn_DEF_NR_UE_CapabilityRequestFilterNR, (void *)sa_band_filter);
}
req_freq.buf = req_freq_buf;
req_freq.size = (enc_rval.encoded+7)/8;
ue_capabilityrat_request->capabilityRequestFilter = &req_freq;
ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1->choice.ueCapabilityEnquiry->criticalExtensions.choice.ueCapabilityEnquiry->ue_CapabilityRAT_RequestList.list, ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1->choice.ueCapabilityEnquiry->criticalExtensions.choice.ueCapabilityEnquiry->ue_CapabilityRAT_RequestList.list,
ue_capabilityrat_request); ue_capabilityrat_request);
...@@ -1508,7 +1564,7 @@ uint16_t do_RRCReconfiguration( ...@@ -1508,7 +1564,7 @@ uint16_t do_RRCReconfiguration(
NULL, NULL,
(void *)&dl_dcch_msg, (void *)&dl_dcch_msg,
buffer, buffer,
100); 1000);
if(enc_rval.encoded == -1) { if(enc_rval.encoded == -1) {
LOG_I(NR_RRC, "[gNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n", LOG_I(NR_RRC, "[gNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
......
...@@ -193,3 +193,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release( ...@@ -193,3 +193,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
uint8_t xid, uint8_t xid,
uint32_t nas_length, uint32_t nas_length,
uint8_t *nas_buffer); uint8_t *nas_buffer);
void
rrc_gNB_generate_dedicatedRRCReconfiguration(
const protocol_ctxt_t *const ctxt_pP,
rrc_gNB_ue_context_t *ue_context_pP);
This diff is collapsed.
...@@ -1062,8 +1062,9 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ( ...@@ -1062,8 +1062,9 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
ue_context_p->ue_context.setup_pdu_sessions += nb_pdusessions_tosetup; ue_context_p->ue_context.setup_pdu_sessions += nb_pdusessions_tosetup;
// TEST // TEST
ue_context_p->ue_context.pdusession[0].status = PDU_SESSION_STATUS_DONE; // ue_context_p->ue_context.pdusession[0].status = PDU_SESSION_STATUS_DONE;
rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(&ctxt, ue_context_p, 0); // rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(&ctxt, ue_context_p, 0);
rrc_gNB_generate_dedicatedRRCReconfiguration(&ctxt, ue_context_p);
return(0); return(0);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment