Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangjie
OpenXG-RAN
Commits
32b74d2f
Commit
32b74d2f
authored
Feb 25, 2021
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nr-softmodem compilation after merge with develop
parent
4d9ebf0a
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
49 additions
and
75 deletions
+49
-75
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
+5
-4
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
+4
-4
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.c
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.c
+2
-7
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.h
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.h
+1
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_srb.c
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_srb.c
+1
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_srb.h
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_srb.h
+1
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+6
-5
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+11
-22
openair2/RRC/NR/rrc_gNB_NGAP.c
openair2/RRC/NR/rrc_gNB_NGAP.c
+18
-30
No files found.
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
View file @
32b74d2f
...
...
@@ -20,7 +20,7 @@
*/
#include "nr_pdcp_entity.h"
#include "nr_pdcp_entity_srb.h"
#include "nr_pdcp_entity_drb_am.h"
#include "nr_pdcp_security_nea2.h"
...
...
@@ -28,7 +28,7 @@
nr_pdcp_entity_t
*
new_nr_pdcp_entity_srb
(
int
is_gnb
,
int
rb_id
,
void
(
*
deliver_sdu
)(
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_sdu
)(
const
protocol_ctxt_t
const
*
ctxt_pP
,
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
char
*
buf
,
int
size
),
void
*
deliver_sdu_data
,
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
...
...
@@ -38,7 +38,7 @@ nr_pdcp_entity_t *new_nr_pdcp_entity_srb(
nr_pdcp_entity_srb_t
*
ret
;
ret
=
calloc
(
1
,
sizeof
(
nr_pdcp_entity_
srb_
t
));
ret
=
calloc
(
1
,
sizeof
(
nr_pdcp_entity_t
));
if
(
ret
==
NULL
)
{
LOG_E
(
PDCP
,
"%s:%d:%s: out of memory
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
...
...
@@ -60,12 +60,13 @@ nr_pdcp_entity_t *new_nr_pdcp_entity_srb(
ret
->
common
.
maximum_nr_pdcp_sn
=
4095
;
ret
->
common
.
is_gnb
=
is_gnb
;
return
(
nr_pdcp_entity_t
*
)
ret
;
}
nr_pdcp_entity_t
*
new_nr_pdcp_entity_drb_am
(
int
is_gnb
,
int
rb_id
,
void
(
*
deliver_sdu
)(
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_sdu
)(
const
protocol_ctxt_t
const
*
ctxt_pP
,
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
char
*
buf
,
int
size
),
void
*
deliver_sdu_data
,
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
View file @
32b74d2f
...
...
@@ -27,14 +27,14 @@
typedef
struct
nr_pdcp_entity_t
{
/* functions provided by the PDCP module */
void
(
*
recv_pdu
)(
protocol_ctxt_
t
*
ctxt_pP
,
struct
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
);
void
(
*
recv_pdu
)(
const
protocol_ctxt_t
cons
t
*
ctxt_pP
,
struct
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
);
void
(
*
recv_sdu
)(
struct
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
,
int
sdu_id
);
void
(
*
delete
)(
struct
nr_pdcp_entity_t
*
entity
);
void
(
*
set_integrity_key
)(
struct
nr_pdcp_entity_t
*
entity
,
char
*
key
);
/* callbacks provided to the PDCP module */
void
(
*
deliver_sdu
)(
protocol_ctxt_
t
*
ctxt_pP
,
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_sdu
)(
const
protocol_ctxt_t
cons
t
*
ctxt_pP
,
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
char
*
buf
,
int
size
);
void
*
deliver_sdu_data
;
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
...
...
@@ -65,7 +65,7 @@ typedef struct nr_pdcp_entity_t {
nr_pdcp_entity_t
*
new_nr_pdcp_entity_srb
(
int
is_gnb
,
int
rb_id
,
void
(
*
deliver_sdu
)(
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_sdu
)(
const
protocol_ctxt_t
const
*
ctxt_pP
,
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
char
*
buf
,
int
size
),
void
*
deliver_sdu_data
,
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
...
...
@@ -74,7 +74,7 @@ nr_pdcp_entity_t *new_nr_pdcp_entity_srb(
nr_pdcp_entity_t
*
new_nr_pdcp_entity_drb_am
(
int
is_gnb
,
int
rb_id
,
void
(
*
deliver_sdu
)(
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_sdu
)(
const
protocol_ctxt_t
const
*
ctxt_pP
,
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
char
*
buf
,
int
size
),
void
*
deliver_sdu_data
,
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.c
View file @
32b74d2f
...
...
@@ -26,16 +26,12 @@
#include <string.h>
#include "common/utils/LOG/log.h"
void
nr_pdcp_entity_drb_am_recv_pdu
(
protocol_ctxt_
t
*
ctxt_pP
,
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
)
void
nr_pdcp_entity_drb_am_recv_pdu
(
const
protocol_ctxt_t
cons
t
*
ctxt_pP
,
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
)
{
nr_pdcp_entity_drb_am_t
*
entity
=
(
nr_pdcp_entity_drb_am_t
*
)
_entity
;
int
sn
;
if
(
size
<
3
)
abort
();
<<<<<<<
HEAD
if
(
!
(
buffer
[
0
]
&
0x80
))
{
printf
(
"%s:%d:%s: fatal
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
entity
->
common
.
deliver_sdu
(
ctxt_pP
,
entity
->
common
.
deliver_sdu_data
,
=======
if
(
!
(
buffer
[
0
]
&
0x80
))
LOG_E
(
PDCP
,
"%s:%d:%s: fatal
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
...
...
@@ -48,8 +44,7 @@ void nr_pdcp_entity_drb_am_recv_pdu( protocol_ctxt_t *ctxt_pP , nr_pdcp_entity_t
entity
->
common
.
cipher
(
entity
->
common
.
security_context
,
(
unsigned
char
*
)
buffer
+
3
,
size
-
3
,
entity
->
rb_id
,
sn
,
entity
->
common
.
is_gnb
?
0
:
1
);
entity
->
common
.
deliver_sdu
(
entity
->
common
.
deliver_sdu_data
,
>>>>>>>
origin
/
develop
entity
->
common
.
deliver_sdu
(
ctxt_pP
,
entity
->
common
.
deliver_sdu_data
,
(
nr_pdcp_entity_t
*
)
entity
,
buffer
+
3
,
size
-
3
);
}
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.h
View file @
32b74d2f
...
...
@@ -33,7 +33,7 @@ typedef struct {
int
discard_timer
;
/* unit: ms, -1 means infinity */
}
nr_pdcp_entity_drb_am_t
;
void
nr_pdcp_entity_drb_am_recv_pdu
(
protocol_ctxt_
t
*
ctxt_pP
,
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
);
void
nr_pdcp_entity_drb_am_recv_pdu
(
const
protocol_ctxt_t
cons
t
*
ctxt_pP
,
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
);
void
nr_pdcp_entity_drb_am_recv_sdu
(
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
,
int
sdu_id
);
void
nr_pdcp_entity_drb_am_set_integrity_key
(
nr_pdcp_entity_t
*
entity
,
char
*
key
);
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_srb.c
View file @
32b74d2f
...
...
@@ -25,7 +25,7 @@
#include <stdlib.h>
#include <string.h>
void
nr_pdcp_entity_srb_recv_pdu
(
protocol_ctxt_
t
*
ctxt_pP
,
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
)
void
nr_pdcp_entity_srb_recv_pdu
(
const
protocol_ctxt_t
cons
t
*
ctxt_pP
,
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
)
{
nr_pdcp_entity_srb_t
*
entity
=
(
nr_pdcp_entity_srb_t
*
)
_entity
;
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_srb.h
View file @
32b74d2f
...
...
@@ -29,7 +29,7 @@ typedef struct {
int
srb_id
;
}
nr_pdcp_entity_srb_t
;
void
nr_pdcp_entity_srb_recv_pdu
(
protocol_ctxt_
t
*
ctxt_pP
,
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
);
void
nr_pdcp_entity_srb_recv_pdu
(
const
protocol_ctxt_t
cons
t
*
ctxt_pP
,
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
);
void
nr_pdcp_entity_srb_recv_sdu
(
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
,
int
sdu_id
);
void
nr_pdcp_entity_srb_set_integrity_key
(
nr_pdcp_entity_t
*
_entity
,
char
*
key
);
void
nr_pdcp_entity_srb_delete
(
nr_pdcp_entity_t
*
_entity
);
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
32b74d2f
...
...
@@ -507,7 +507,7 @@ uint64_t pdcp_module_init(uint64_t _pdcp_optmask)
return
pdcp_optmask
;
}
static
void
deliver_sdu_drb
(
protocol_ctxt_
t
*
ctxt_pP
,
void
*
_ue
,
nr_pdcp_entity_t
*
entity
,
static
void
deliver_sdu_drb
(
const
protocol_ctxt_t
cons
t
*
ctxt_pP
,
void
*
_ue
,
nr_pdcp_entity_t
*
entity
,
char
*
buf
,
int
size
)
{
extern
int
nas_sock_fd
[];
...
...
@@ -605,7 +605,7 @@ rb_found:
}
static
int
ccch_or_dcch
=
0
;
static
void
deliver_sdu_srb
(
protocol_ctxt_
t
*
ctxt_pP
,
void
*
_ue
,
nr_pdcp_entity_t
*
entity
,
static
void
deliver_sdu_srb
(
const
protocol_ctxt_t
cons
t
*
ctxt_pP
,
void
*
_ue
,
nr_pdcp_entity_t
*
entity
,
char
*
buf
,
int
size
)
{
/* Implementation to be added */
...
...
@@ -789,6 +789,7 @@ boolean_t pdcp_data_ind(
}
if
(
rb
!=
NULL
)
{
rb
->
recv_pdu
(
ctxt_pP
,
rb
,
(
char
*
)
sdu_buffer
->
data
,
sdu_buffer_size
);
}
else
{
LOG_E
(
PDCP
,
"%s:%d:%s: fatal: no RB found (rb_id %ld, srb_flag %d)
\n
"
,
...
...
@@ -846,7 +847,7 @@ void pdcp_run(const protocol_ctxt_t *const ctxt_pP)
}
}
static
void
add_srb
(
int
rnti
,
struct
NR_SRB_ToAddMod
*
s
)
static
void
add_srb
(
int
is_gnb
,
int
rnti
,
struct
NR_SRB_ToAddMod
*
s
)
{
nr_pdcp_entity_t
*
pdcp_srb
;
nr_pdcp_ue_t
*
ue
;
...
...
@@ -867,7 +868,7 @@ static void add_srb(int rnti, struct NR_SRB_ToAddMod *s)
LOG_W
(
PDCP
,
"%s:%d:%s: warning SRB %d already exist for ue %d, do nothing
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
srb_id
,
rnti
);
}
else
{
pdcp_srb
=
new_nr_pdcp_entity_srb
(
srb_id
,
deliver_sdu_srb
,
ue
,
deliver_pdu_srb
,
ue
);
pdcp_srb
=
new_nr_pdcp_entity_srb
(
is_gnb
,
srb_id
,
deliver_sdu_srb
,
ue
,
deliver_pdu_srb
,
ue
);
nr_pdcp_ue_add_srb_pdcp_entity
(
ue
,
srb_id
,
pdcp_srb
);
LOG_I
(
PDCP
,
"%s:%d:%s: added srb %d to ue %d
\n
"
,
...
...
@@ -987,7 +988,7 @@ boolean_t nr_rrc_pdcp_config_asn1_req(
if
(
srb2add_list
!=
NULL
)
{
for
(
i
=
0
;
i
<
srb2add_list
->
list
.
count
;
i
++
)
{
add_srb
(
rnti
,
srb2add_list
->
list
.
array
[
i
]);
add_srb
(
ctxt_pP
->
enb_flag
,
rnti
,
srb2add_list
->
list
.
array
[
i
]);
}
}
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
32b74d2f
...
...
@@ -812,17 +812,6 @@ rrc_gNB_generate_defaultRRCReconfiguration(
ue_context_pP
->
ue_context
.
rnti
,
rrc_gNB_mui
,
size
);
#ifdef ITTI_SIM
MessageDef
*
message_p
;
uint8_t
*
message_buffer
;
message_buffer
=
itti_malloc
(
TASK_RRC_GNB
,
TASK_RRC_UE_SIM
,
size
);
memcpy
(
message_buffer
,
buffer
,
size
);
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
0
,
GNB_RRC_DCCH_DATA_IND
);
GNB_RRC_DCCH_DATA_IND
(
message_p
).
rbid
=
DCCH
;
GNB_RRC_DCCH_DATA_IND
(
message_p
).
sdu
=
message_buffer
;
GNB_RRC_DCCH_DATA_IND
(
message_p
).
size
=
size
;
itti_send_msg_to_task
(
TASK_RRC_UE_SIM
,
ctxt_pP
->
instance
,
message_p
);
#else
nr_rrc_data_req
(
ctxt_pP
,
DCCH
,
rrc_gNB_mui
++
,
...
...
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
32b74d2f
...
...
@@ -450,18 +450,6 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ(
/* TODO */
}
if
(
r_amf
->
plmn_Identity
->
mnc
.
list
.
count
>
0
)
{
/* Use first indicated PLMN MNC if it is defined */
NGAP_NAS_FIRST_REQ
(
message_p
).
ue_identity
.
guami
.
mnc
=
*
r_amf
->
plmn_Identity
->
mnc
.
list
.
array
[
selected_plmn_identity
];
LOG_I
(
NGAP
,
"[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MNC %u ue %x
\n
"
,
ctxt_pP
->
module_id
,
NGAP_NAS_FIRST_REQ
(
message_p
).
ue_identity
.
guami
.
mnc
,
ue_context_pP
->
ue_context
.
rnti
);
}
}
else
{
/* TODO */
}
/* amf_Identifier */
uint32_t
amf_Id
=
BIT_STRING_to_uint32
(
&
r_amf
->
amf_Identifier
);
NGAP_NAS_FIRST_REQ
(
message_p
).
ue_identity
.
guami
.
amf_region_id
=
amf_Id
>>
16
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment