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
spbro
OpenXG-RAN
Commits
9c00f4b7
Commit
9c00f4b7
authored
Jan 12, 2018
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update RRC_UE to support PC5-S
parent
952ec555
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
143 additions
and
39 deletions
+143
-39
openair2/LAYER2/MAC/config.c
openair2/LAYER2/MAC/config.c
+10
-1
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+2
-1
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+13
-10
openair2/RRC/LITE/defs.h
openair2/RRC/LITE/defs.h
+15
-1
openair2/RRC/LITE/rrc_UE.c
openair2/RRC/LITE/rrc_UE.c
+103
-26
No files found.
openair2/LAYER2/MAC/config.c
View file @
9c00f4b7
...
...
@@ -1049,7 +1049,8 @@ rrc_mac_config_req_ue(
#endif
#if defined(Rel14)
,
uint32_t
*
sourceL2Id
,
uint32_t
*
groupL2Id
uint32_t
*
groupL2Id
,
uint32_t
*
destinationL2Id
#endif
)
...
...
@@ -1369,12 +1370,20 @@ rrc_mac_config_req_ue(
// Panos: Call to the phy_config_request_ue() function of the interface to copy the UE_PHY_Config_t interface
// configuration to the PHY common and dedicated configuration originating from RRC.
//for D2D
#if defined(Rel10) || defined(Rel14)
if
(
sourceL2Id
&&
groupL2Id
)
{
UE_mac_inst
[
Mod_idP
].
sourceL2Id
=
*
sourceL2Id
;
UE_mac_inst
[
Mod_idP
].
groupL2Id
=
*
groupL2Id
;
}
else
if
(
sourceL2Id
)
{
//reset groupL2Id
UE_mac_inst
[
Mod_idP
].
groupL2Id
=
0x00000000
;
}
if
(
sourceL2Id
&&
destinationL2Id
)
{
UE_mac_inst
[
Mod_idP
].
sourceL2Id
=
*
sourceL2Id
;
UE_mac_inst
[
Mod_idP
].
destinationL2Id
=
*
destinationL2Id
;
}
#endif
return
(
0
);
...
...
openair2/LAYER2/MAC/proto.h
View file @
9c00f4b7
...
...
@@ -932,7 +932,8 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
#if defined(Rel14)
,
uint32_t
*
sourceL2Id
,
uint32_t
*
groupL2Id
uint32_t
*
groupL2Id
,
uint32_t
*
destinationL2Id
#endif
);
...
...
openair2/LAYER2/MAC/ue_procedures.c
View file @
9c00f4b7
...
...
@@ -2740,6 +2740,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
UE_MAC_INST
*
ue
=
&
UE_mac_inst
[
module_idP
];
int
rvtab
[
4
]
=
{
0
,
2
,
3
,
1
};
int
sdu_length
;
uint32_t
destL2Id
;
//groupL2Id/destinationL2Id
// Note: this is hard-coded for now for the default SL configuration (4 SF PSCCH, 36 SF PSSCH)
SLSCH_t
*
slsch
=
&
UE_mac_inst
[
module_idP
].
slsch
;
...
...
@@ -2776,11 +2777,13 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
int
req
;
if
(
ue
->
slsch_lcid
==
10
)
{
if
(
TBS
<=
rlc_status
.
bytes_in_buffer
)
req
=
TBS
;
else
req
=
rlc_status
.
bytes_in_buffer
;
if
(
TBS
<=
rlc_status
.
bytes_in_buffer
)
req
=
TBS
;
else
req
=
rlc_status
.
bytes_in_buffer
;
destL2Id
=
ue
->
destinationL2Id
;
}
else
if
(
ue
->
slsch_lcid
==
3
){
if
(
TBS
<=
rlc_status_data
.
bytes_in_buffer
)
req
=
TBS
;
else
req
=
rlc_status_data
.
bytes_in_buffer
;
destL2Id
=
ue
->
groupL2Id
;
}
if
(
req
>
0
)
{
...
...
@@ -2800,8 +2803,8 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
if
(
sdu_length
>
0
)
{
LOG_I
(
MAC
,
"SFN.SF %d.%d : got %d bytes from Sidelink buffer (%d requested)
\n
"
,
frameP
,
subframeP
,
sdu_length
,
req
);
LOG_I
(
MAC
,
"sourceL2Id:
%d
\n
"
,
ue
->
sourceL2Id
);
LOG_I
(
MAC
,
"groupL2Id
: %d
\n
"
,
ue
->
group
L2Id
);
LOG_I
(
MAC
,
"sourceL2Id:
0x%08x
\n
"
,
ue
->
sourceL2Id
);
LOG_I
(
MAC
,
"groupL2Id
/destinationL2Id: 0x%08x
\n
"
,
dest
L2Id
);
slsch
->
payload
=
(
unsigned
char
*
)
ue
->
slsch_pdu
.
payload
;
if
(
sdu_length
<
128
)
{
...
...
@@ -2814,9 +2817,9 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
shorth
->
SRC07
=
(
ue
->
sourceL2Id
>>
16
)
&
0x000000ff
;
shorth
->
SRC815
=
(
ue
->
sourceL2Id
>>
8
)
&
0x000000ff
;
shorth
->
SRC1623
=
ue
->
sourceL2Id
&
0x000000ff
;
shorth
->
DST07
=
(
ue
->
group
L2Id
>>
16
)
&
0x000000ff
;
shorth
->
DST815
=
(
ue
->
group
L2Id
>>
8
)
&
0x000000ff
;
shorth
->
DST1623
=
ue
->
group
L2Id
&
0x000000ff
;
shorth
->
DST07
=
(
dest
L2Id
>>
16
)
&
0x000000ff
;
shorth
->
DST815
=
(
dest
L2Id
>>
8
)
&
0x000000ff
;
shorth
->
DST1623
=
dest
L2Id
&
0x000000ff
;
shorth
->
V
=
0x1
;
}
...
...
@@ -2830,9 +2833,9 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
longh
->
SRC07
=
(
ue
->
sourceL2Id
>>
16
)
&
0x000000ff
;
longh
->
SRC815
=
(
ue
->
sourceL2Id
>>
8
)
&
0x000000ff
;
longh
->
SRC1623
=
ue
->
sourceL2Id
&
0x000000ff
;
longh
->
DST07
=
(
ue
->
group
L2Id
>>
16
)
&
0x000000ff
;
longh
->
DST815
=
(
ue
->
group
L2Id
>>
8
)
&
0x000000ff
;
longh
->
DST1623
=
ue
->
group
L2Id
&
0x000000ff
;
longh
->
DST07
=
(
dest
L2Id
>>
16
)
&
0x000000ff
;
longh
->
DST815
=
(
dest
L2Id
>>
8
)
&
0x000000ff
;
longh
->
DST1623
=
dest
L2Id
&
0x000000ff
;
longh
->
V
=
0x1
;
}
...
...
openair2/RRC/LITE/defs.h
View file @
9c00f4b7
...
...
@@ -85,6 +85,9 @@
#define DIRECT_COMMUNICATION_ESTABLISH_RSP 6
#define GROUP_COMMUNICATION_RELEASE_REQ 7
#define GROUP_COMMUNICATION_RELEASE_RSP 8
#define PC5S_ESTABLISH_REQ 9
#define PC5S_ESTABLISH_RSP 10
typedef
enum
{
UE_STATE_OFF_NETWORK
,
...
...
@@ -116,6 +119,16 @@ struct DirectCommunicationEstablishReq {
uint32_t
pppp
;
};
struct
PC5SEstablishReq
{
uint32_t
sourceL2Id
;
uint32_t
destinationL2Id
;
};
struct
PC5SEstablishRsp
{
uint32_t
sourceL2Id
;
uint32_t
destinationL2Id
;
uint8_t
status
;
};
struct
sidelink_ctrl_element
{
unsigned
short
type
;
...
...
@@ -127,7 +140,8 @@ struct sidelink_ctrl_element {
SL_UE_STATE_t
ue_state
;
//struct GroupCommunicationReleaseReq group_comm_release_req;
int
slrb_id
;
struct
PC5SEstablishReq
pc5s_establish_req
;
struct
PC5SEstablishRsp
pc5s_establish_rsp
;
}
sidelinkPrimitive
;
};
...
...
openair2/RRC/LITE/rrc_UE.c
View file @
9c00f4b7
This diff is collapsed.
Click to expand it.
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