NR RRC - RRCReestablishment - Apply clang format

parent 3cf3a42b
...@@ -295,7 +295,7 @@ typedef struct drb_s { ...@@ -295,7 +295,7 @@ typedef struct drb_s {
int pdcp_SN_SizeDL; int pdcp_SN_SizeDL;
int t_Reordering; int t_Reordering;
int integrityProtection; int integrityProtection;
struct headerCompression_s{ struct headerCompression_s {
int NotUsed; int NotUsed;
int present; int present;
} headerCompression; } headerCompression;
......
This diff is collapsed.
...@@ -47,19 +47,19 @@ void generateDRB(gNB_RRC_UE_t *ue, ...@@ -47,19 +47,19 @@ void generateDRB(gNB_RRC_UE_t *ue,
int qos_flow_index; int qos_flow_index;
if (ue->established_drbs[drb_id - 1].status == DRB_INACTIVE) { if (ue->established_drbs[drb_id - 1].status == DRB_INACTIVE) {
/* DRB Management */ /* DRB Management */
ue->established_drbs[drb_id - 1].drb_id = drb_id; ue->established_drbs[drb_id - 1].drb_id = drb_id;
ue->established_drbs[drb_id - 1].reestablishPDCP = -1; ue->established_drbs[drb_id - 1].reestablishPDCP = -1;
ue->established_drbs[drb_id - 1].recoverPDCP = -1; ue->established_drbs[drb_id - 1].recoverPDCP = -1;
for (i = 0; i < NGAP_MAX_DRBS_PER_UE; i++) { for (i = 0; i < NGAP_MAX_DRBS_PER_UE; i++) {
if ((ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.pdusession_id == 0 || if ((ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.pdusession_id == 0
ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.pdusession_id == pduSession->param.pdusession_id) && || ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.pdusession_id == pduSession->param.pdusession_id)
ue->established_drbs[drb_id - 1].defaultDRBid == 0) { && ue->established_drbs[drb_id - 1].defaultDRBid == 0) {
ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.defaultDRB = true; ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.defaultDRB = true;
ue->established_drbs[drb_id - 1].defaultDRBid = drb_id; ue->established_drbs[drb_id - 1].defaultDRBid = drb_id;
} }
} }
/* SDAP Configuration */ /* SDAP Configuration */
ue->established_drbs[drb_id - 1].cnAssociation.present = NR_DRB_ToAddMod__cnAssociation_PR_sdap_Config; ue->established_drbs[drb_id - 1].cnAssociation.present = NR_DRB_ToAddMod__cnAssociation_PR_sdap_Config;
ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.pdusession_id = pduSession->param.pdusession_id; ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.pdusession_id = pduSession->param.pdusession_id;
if (enable_sdap) { if (enable_sdap) {
ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.sdap_HeaderDL = NR_SDAP_Config__sdap_HeaderDL_present; ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.sdap_HeaderDL = NR_SDAP_Config__sdap_HeaderDL_present;
...@@ -68,19 +68,19 @@ void generateDRB(gNB_RRC_UE_t *ue, ...@@ -68,19 +68,19 @@ void generateDRB(gNB_RRC_UE_t *ue,
ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.sdap_HeaderDL = NR_SDAP_Config__sdap_HeaderDL_absent; ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.sdap_HeaderDL = NR_SDAP_Config__sdap_HeaderDL_absent;
ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.sdap_HeaderUL = NR_SDAP_Config__sdap_HeaderUL_absent; ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.sdap_HeaderUL = NR_SDAP_Config__sdap_HeaderUL_absent;
} }
for (qos_flow_index = 0; qos_flow_index < pduSession->param.nb_qos; qos_flow_index++) for (qos_flow_index = 0; qos_flow_index < pduSession->param.nb_qos; qos_flow_index++) {
{ ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.mappedQoS_FlowsToAdd[qos_flow_index] =
ue->established_drbs[drb_id - 1].cnAssociation.sdap_config.mappedQoS_FlowsToAdd[qos_flow_index] = pduSession->param.qos[qos_flow_index].qfi; pduSession->param.qos[qos_flow_index].qfi;
if(pduSession->param.qos[qos_flow_index].fiveQI > 5) if (pduSession->param.qos[qos_flow_index].fiveQI > 5)
ue->established_drbs[drb_id - 1].status = DRB_ACTIVE_NONGBR; ue->established_drbs[drb_id - 1].status = DRB_ACTIVE_NONGBR;
else else
ue->established_drbs[drb_id - 1].status = DRB_ACTIVE; ue->established_drbs[drb_id - 1].status = DRB_ACTIVE;
} }
/* PDCP Configuration */ /* PDCP Configuration */
ue->established_drbs[drb_id - 1].pdcp_config.discardTimer = NR_PDCP_Config__drb__discardTimer_infinity; ue->established_drbs[drb_id - 1].pdcp_config.discardTimer = NR_PDCP_Config__drb__discardTimer_infinity;
ue->established_drbs[drb_id - 1].pdcp_config.pdcp_SN_SizeDL = NR_PDCP_Config__drb__pdcp_SN_SizeDL_len18bits; ue->established_drbs[drb_id - 1].pdcp_config.pdcp_SN_SizeDL = NR_PDCP_Config__drb__pdcp_SN_SizeDL_len18bits;
ue->established_drbs[drb_id - 1].pdcp_config.pdcp_SN_SizeUL = NR_PDCP_Config__drb__pdcp_SN_SizeUL_len18bits; ue->established_drbs[drb_id - 1].pdcp_config.pdcp_SN_SizeUL = NR_PDCP_Config__drb__pdcp_SN_SizeUL_len18bits;
ue->established_drbs[drb_id - 1].pdcp_config.t_Reordering = NR_PDCP_Config__t_Reordering_ms100; ue->established_drbs[drb_id - 1].pdcp_config.t_Reordering = NR_PDCP_Config__t_Reordering_ms100;
ue->established_drbs[drb_id - 1].pdcp_config.headerCompression.present = NR_PDCP_Config__drb__headerCompression_PR_notUsed; ue->established_drbs[drb_id - 1].pdcp_config.headerCompression.present = NR_PDCP_Config__drb__headerCompression_PR_notUsed;
ue->established_drbs[drb_id - 1].pdcp_config.headerCompression.NotUsed = 0; ue->established_drbs[drb_id - 1].pdcp_config.headerCompression.NotUsed = 0;
if (do_drb_integrity) if (do_drb_integrity)
...@@ -91,7 +91,6 @@ void generateDRB(gNB_RRC_UE_t *ue, ...@@ -91,7 +91,6 @@ void generateDRB(gNB_RRC_UE_t *ue,
ue->established_drbs[drb_id - 1].pdcp_config.ext1.cipheringDisabled = 1; ue->established_drbs[drb_id - 1].pdcp_config.ext1.cipheringDisabled = 1;
else else
ue->established_drbs[drb_id - 1].pdcp_config.ext1.cipheringDisabled = NR_PDCP_Config__ext1__cipheringDisabled_true; ue->established_drbs[drb_id - 1].pdcp_config.ext1.cipheringDisabled = NR_PDCP_Config__ext1__cipheringDisabled_true;
} }
} }
...@@ -106,17 +105,16 @@ NR_DRB_ToAddMod_t *generateDRB_ASN1(drb_t drb_asn1) ...@@ -106,17 +105,16 @@ NR_DRB_ToAddMod_t *generateDRB_ASN1(drb_t drb_asn1)
asn1cCalloc(pdcpConfig->drb, drb); asn1cCalloc(pdcpConfig->drb, drb);
DRB_config->drb_Identity = drb_asn1.drb_id; DRB_config->drb_Identity = drb_asn1.drb_id;
association->present = drb_asn1.cnAssociation.present; association->present = drb_asn1.cnAssociation.present;
/* SDAP Configuration */ /* SDAP Configuration */
SDAP_config->pdu_Session = drb_asn1.cnAssociation.sdap_config.pdusession_id; SDAP_config->pdu_Session = drb_asn1.cnAssociation.sdap_config.pdusession_id;
SDAP_config->sdap_HeaderDL = drb_asn1.cnAssociation.sdap_config.sdap_HeaderDL; SDAP_config->sdap_HeaderDL = drb_asn1.cnAssociation.sdap_config.sdap_HeaderDL;
SDAP_config->sdap_HeaderUL = drb_asn1.cnAssociation.sdap_config.sdap_HeaderUL; SDAP_config->sdap_HeaderUL = drb_asn1.cnAssociation.sdap_config.sdap_HeaderUL;
SDAP_config->defaultDRB = drb_asn1.cnAssociation.sdap_config.defaultDRB; SDAP_config->defaultDRB = drb_asn1.cnAssociation.sdap_config.defaultDRB;
for (int qos_flow_index = 0; qos_flow_index < QOSFLOW_MAX_VALUE; qos_flow_index++) for (int qos_flow_index = 0; qos_flow_index < QOSFLOW_MAX_VALUE; qos_flow_index++) {
{ if (drb_asn1.cnAssociation.sdap_config.mappedQoS_FlowsToAdd[qos_flow_index] != 0) {
if(drb_asn1.cnAssociation.sdap_config.mappedQoS_FlowsToAdd[qos_flow_index] != 0) {
asn1cSequenceAdd(sdapFlows->list, NR_QFI_t, qfi); asn1cSequenceAdd(sdapFlows->list, NR_QFI_t, qfi);
*qfi = drb_asn1.cnAssociation.sdap_config.mappedQoS_FlowsToAdd[qos_flow_index]; *qfi = drb_asn1.cnAssociation.sdap_config.mappedQoS_FlowsToAdd[qos_flow_index];
} }
...@@ -130,7 +128,7 @@ NR_DRB_ToAddMod_t *generateDRB_ASN1(drb_t drb_asn1) ...@@ -130,7 +128,7 @@ NR_DRB_ToAddMod_t *generateDRB_ASN1(drb_t drb_asn1)
asn1cCallocOne(drb->pdcp_SN_SizeDL, drb_asn1.pdcp_config.pdcp_SN_SizeDL); asn1cCallocOne(drb->pdcp_SN_SizeDL, drb_asn1.pdcp_config.pdcp_SN_SizeDL);
asn1cCallocOne(pdcpConfig->t_Reordering, drb_asn1.pdcp_config.t_Reordering); asn1cCallocOne(pdcpConfig->t_Reordering, drb_asn1.pdcp_config.t_Reordering);
drb->headerCompression.present = drb_asn1.pdcp_config.headerCompression.present; drb->headerCompression.present = drb_asn1.pdcp_config.headerCompression.present;
drb->headerCompression.choice.notUsed = drb_asn1.pdcp_config.headerCompression.NotUsed; drb->headerCompression.choice.notUsed = drb_asn1.pdcp_config.headerCompression.NotUsed;
if (!drb_asn1.pdcp_config.integrityProtection) { if (!drb_asn1.pdcp_config.integrityProtection) {
......
...@@ -35,19 +35,24 @@ ...@@ -35,19 +35,24 @@
#define GBR_FLOW (1) #define GBR_FLOW (1)
#define NONGBR_FLOW (0) #define NONGBR_FLOW (0)
/// @brief Generates an ASN1 DRB-ToAddMod, from the established_drbs in gNB_RRC_UE_t. /// @brief Generates an ASN1 DRB-ToAddMod, from the established_drbs in gNB_RRC_UE_t.
/// @param drb_t drb_asn1 /// @param drb_t drb_asn1
/// @return Returns the ASN1 DRB-ToAddMod structs. /// @return Returns the ASN1 DRB-ToAddMod structs.
NR_DRB_ToAddMod_t *generateDRB_ASN1(drb_t drb_asn1); NR_DRB_ToAddMod_t *generateDRB_ASN1(drb_t drb_asn1);
/// @brief Creates and stores a DRB in the gNB_RRC_UE_t struct, it doesn't create the actual entity, /// @brief Creates and stores a DRB in the gNB_RRC_UE_t struct, it doesn't create the actual entity,
/// to create the actual entity use the generateDRB_ASN1. /// to create the actual entity use the generateDRB_ASN1.
/// @param ue The gNB_RRC_UE_t struct that holds information for the UEs /// @param ue The gNB_RRC_UE_t struct that holds information for the UEs
/// @param drb_id The Data Radio Bearer Identity to be created for the established DRB. /// @param drb_id The Data Radio Bearer Identity to be created for the established DRB.
/// @param pduSession The PDU Session that the DRB is created for. /// @param pduSession The PDU Session that the DRB is created for.
/// @param enable_sdap If true the SDAP header will be added to the packet, else it will not add or search for SDAP header. /// @param enable_sdap If true the SDAP header will be added to the packet, else it will not add or search for SDAP header.
/// @param do_drb_integrity /// @param do_drb_integrity
/// @param do_drb_ciphering /// @param do_drb_ciphering
void generateDRB(gNB_RRC_UE_t *ue, uint8_t drb_id, rrc_pdu_session_param_t *pduSession, bool enable_sdap, int do_drb_integrity, int do_drb_ciphering); void generateDRB(gNB_RRC_UE_t *ue,
uint8_t drb_id,
rrc_pdu_session_param_t *pduSession,
bool enable_sdap,
int do_drb_integrity,
int do_drb_ciphering);
uint8_t next_available_drb(gNB_RRC_UE_t *ue, rrc_pdu_session_param_t *pdusession, bool is_gbr); uint8_t next_available_drb(gNB_RRC_UE_t *ue, rrc_pdu_session_param_t *pdusession, bool is_gbr);
bool drb_is_active(gNB_RRC_UE_t *ue, uint8_t drb_id); bool drb_is_active(gNB_RRC_UE_t *ue, uint8_t drb_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