nr pdcp: improve readability of integrity checking

Introduce the structure nr_pdcp_integrity_data_t and adapt code to use it.

Note: in nr_pdcp_sdu_t we keep the 'count' variable (which is also present
in nr_pdcp_integrity_data_t). They represent the same value, but 'count'
in nr_pdcp_integrity_data_t is to be specifically used for integrity while
the other one has other uses, so it's better to keep it.
This commit is contained in:
Cedric Roux
2024-04-03 08:28:15 +02:00
parent 0f9b335951
commit a323195aed
9 changed files with 86 additions and 88 deletions
+7 -7
View File
@@ -88,18 +88,18 @@ typedef struct NRRrcDcchDataReq_s {
uint8_t gNB_index;
} NRRrcDcchDataReq;
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_integrity_data.h"
typedef struct NRRrcDcchDataInd_s {
uint32_t frame;
uint8_t dcch_index;
uint32_t sdu_size;
uint8_t *sdu_p;
uint16_t rnti;
uint8_t module_id;
uint8_t gNB_index; // LG: needed in UE
/* these three variables are needed for RRC to check integrity of the PDCP SDU */
uint32_t mac;
uint32_t header;
uint32_t count;
uint16_t rnti;
uint8_t module_id;
uint8_t gNB_index; // LG: needed in UE
/* 'msg_integrity' is needed for RRC to check integrity of the PDCP SDU */
nr_pdcp_integrity_data_t msg_integrity;
} NRRrcDcchDataInd;
typedef struct RrcPcchDataReq_s {