Commit 1b9f6745 authored by francescomani's avatar francescomani Committed by Jaroslava Fiedlerova

clean asn1_msg from mod_id

parent 26eda2f2
......@@ -242,10 +242,7 @@ uint8_t do_SIB23_NR(rrc_gNB_carrier_data_t *carrier)
return((enc_rval.encoded+7)/8);
}
//------------------------------------------------------------------------------
int do_RRCReject(uint8_t Mod_id,
uint8_t *const buffer)
//------------------------------------------------------------------------------
int do_RRCReject(uint8_t *const buffer)
{
asn_enc_rval_t enc_rval;
NR_DL_CCCH_Message_t dl_ccch_msg;
......@@ -877,8 +874,7 @@ uint8_t do_NR_RRCReconfigurationComplete(uint8_t *buffer, size_t buffer_size, co
return((enc_rval.encoded+7)/8);
}
uint8_t do_RRCSetupComplete(uint8_t Mod_id,
uint8_t *buffer,
uint8_t do_RRCSetupComplete(uint8_t *buffer,
size_t buffer_size,
const uint8_t Transaction_id,
uint8_t sel_plmn_id,
......@@ -886,7 +882,6 @@ uint8_t do_RRCSetupComplete(uint8_t Mod_id,
const char *dedicatedInfoNAS)
{
NR_UL_DCCH_Message_t ul_dcch_msg = {0};
ul_dcch_msg.message.present = NR_UL_DCCH_MessageType_PR_c1;
ul_dcch_msg.message.choice.c1 = CALLOC(1,sizeof(struct NR_UL_DCCH_MessageType__c1));
ul_dcch_msg.message.choice.c1->present = NR_UL_DCCH_MessageType__c1_PR_rrcSetupComplete;
......@@ -931,14 +926,11 @@ uint8_t do_RRCSetupComplete(uint8_t Mod_id,
return((enc_rval.encoded+7)/8);
}
//------------------------------------------------------------------------------
uint8_t do_NR_DLInformationTransfer(uint8_t Mod_id,
uint8_t *buffer,
uint8_t do_NR_DLInformationTransfer(uint8_t *buffer,
size_t buffer_len,
uint8_t transaction_id,
uint32_t pdu_length,
uint8_t *pdu_buffer)
//------------------------------------------------------------------------------
{
NR_DL_DCCH_Message_t dl_dcch_msg = {0};
dl_dcch_msg.message.present = NR_DL_DCCH_MessageType_PR_c1;
......@@ -987,7 +979,8 @@ uint8_t do_NR_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8
return encoded;
}
uint8_t do_RRCReestablishmentRequest(uint8_t Mod_id, uint8_t *buffer, uint16_t c_rnti) {
uint8_t do_RRCReestablishmentRequest(uint8_t *buffer, uint16_t c_rnti)
{
asn_enc_rval_t enc_rval;
NR_UL_CCCH_Message_t ul_ccch_msg;
NR_RRCReestablishmentRequest_t *rrcReestablishmentRequest;
......@@ -1195,7 +1188,8 @@ void free_defaultMeasConfig(NR_MeasConfig_t *mc)
ASN_STRUCT_FREE(asn_DEF_NR_MeasConfig, mc);
}
uint8_t do_NR_Paging(uint8_t Mod_id, uint8_t *buffer, uint32_t tmsi) {
uint8_t do_NR_Paging(uint8_t Mod_id, uint8_t *buffer, uint32_t tmsi)
{
LOG_D(NR_RRC, "[gNB %d] do_NR_Paging start\n", Mod_id);
NR_PCCH_Message_t pcch_msg;
pcch_msg.message.present = NR_PCCH_MessageType_PR_c1;
......
......@@ -57,8 +57,7 @@ int xer_sprint_NR(char *string, size_t string_size, struct asn_TYPE_descriptor_s
uint8_t do_SIB23_NR(rrc_gNB_carrier_data_t *carrier);
int do_RRCReject(uint8_t Mod_id,
uint8_t *const buffer);
int do_RRCReject(uint8_t *const buffer);
NR_RLC_BearerConfig_t *get_SRB_RLC_BearerConfig(
long channelId,
......@@ -109,8 +108,7 @@ int16_t do_RRCReconfiguration(const gNB_RRC_UE_t *UE,
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
NR_CellGroupConfig_t *cellGroupConfig);
uint8_t do_RRCSetupComplete(uint8_t Mod_id,
uint8_t *buffer,
uint8_t do_RRCSetupComplete(uint8_t *buffer,
size_t buffer_size,
const uint8_t Transaction_id,
uint8_t sel_plmn_id,
......@@ -123,8 +121,7 @@ uint8_t do_NR_RRCReconfigurationComplete_for_nsa(uint8_t *buffer, size_t buffer_
uint8_t do_NR_RRCReconfigurationComplete(uint8_t *buffer, size_t buffer_size, const uint8_t Transaction_id);
uint8_t do_NR_DLInformationTransfer(uint8_t Mod_id,
uint8_t *buffer,
uint8_t do_NR_DLInformationTransfer(uint8_t *buffer,
size_t buffer_len,
uint8_t transaction_id,
uint32_t pdu_length,
......@@ -134,7 +131,7 @@ uint8_t do_NR_ULInformationTransfer(uint8_t **buffer,
uint32_t pdu_length,
uint8_t *pdu_buffer);
uint8_t do_RRCReestablishmentRequest(uint8_t Mod_id, uint8_t *buffer, uint16_t c_rnti);
uint8_t do_RRCReestablishmentRequest(uint8_t *buffer, uint16_t c_rnti);
int do_RRCReestablishment(rrc_gNB_ue_context_t *const ue_context_pP,
uint8_t *const buffer,
......
......@@ -492,7 +492,7 @@ static void rrc_gNB_generate_RRCReject(module_id_t module_id, rrc_gNB_ue_context
gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
unsigned char buf[1024];
int size = do_RRCReject(module_id, buf);
int size = do_RRCReject(buf);
AssertFatal(size > 0, "do_RRCReject failed\n");
AssertFatal(size <= 1024, "memory corruption\n");
......
......@@ -623,8 +623,7 @@ int rrc_gNB_process_NGAP_DOWNLINK_NAS(MessageDef *msg_p, instance_t instance, mu
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, UE->rrc_ue_id, 0, 0);
/* Create message for PDCP (DLInformationTransfer_t) */
length = do_NR_DLInformationTransfer(instance,
buffer,
length = do_NR_DLInformationTransfer(buffer,
sizeof(buffer),
rrc_gNB_get_next_transaction_identifier(instance),
req->nas_pdu.length,
......
......@@ -865,7 +865,7 @@ static void rrc_ue_generate_RRCSetupComplete(instance_t instance, rnti_t rnti, c
nas_msg_length = sizeof(nr_nas_attach_req_imsi_dummy_NSA_case);
}
size = do_RRCSetupComplete(instance, buffer, sizeof(buffer), Transaction_id, sel_plmn_id, nas_msg_length, nas_msg);
size = do_RRCSetupComplete(buffer, sizeof(buffer), Transaction_id, sel_plmn_id, nas_msg_length, nas_msg);
LOG_I(NR_RRC, "[UE %ld][RAPROC] Logical Channel UL-DCCH (SRB1), Generating RRCSetupComplete (bytes%d)\n", instance, size);
int srb_id = 1; // RRC setup complete on SRB1
LOG_D(NR_RRC, "[RRC_UE %ld] PDCP_DATA_REQ/%d Bytes RRCSetupComplete ---> %d\n", instance, size, srb_id);
......
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