Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
openairinterface5G
Commits
ff6c7119
Commit
ff6c7119
authored
Jan 03, 2018
by
knopp
Browse files
added MAC header handling for reception.
parent
532a566c
Changes
1
Hide whitespace changes
Inline
Side-by-side
openair2/LAYER2/MAC/ue_procedures.c
View file @
ff6c7119
...
...
@@ -751,6 +751,24 @@ void ue_send_sl_sdu(module_id_t module_idP,
uint8_t
eNB_index
)
{
int
rlc_sdu_len
;
char
*
rlc_sdu
;
// Notes: 1. no control elements are supported yet
// 2. we exit with error if LCID != 3
// 3. we exit with error if E=1 (more than one SDU/CE)
// extract header
SLSCH_SUBHEADER_24_Bit_DST_LONG
*
longh
=
(
SLSCH_SUBHEADER_24_Bit_DST_LONG
*
)
sdu
;
AssertFatal
(
longh
->
E
==
0
,
"E is non-zero
\n
"
);
AssertFatal
(
longh
->
LCID
==
3
,
"LCID is %d (not 3)
\n
"
,
longh
->
LCID
);
if
(
longh
->
F
==
1
)
{
rlc_sdu_len
=
((
longh
->
L_MSB
<<
8
)
&
0x7F00
)
|
(
longh
->
L_LSB
&
0xFF
);
rlc_sdu
=
sdu
+
sizeof
(
SLSCH_SUBHEADER_24_Bit_DST_LONG
);
}
else
{
rlc_sdu_len
=
((
SLSCH_SUBHEADER_24_Bit_DST_SHORT
*
)
sdu
)
->
L
;
rlc_sdu
=
sdu
+
sizeof
(
SLSCH_SUBHEADER_24_Bit_DST_SHORT
);
}
mac_rlc_data_ind
(
module_idP
,
0x1234
,
...
...
@@ -759,8 +777,8 @@ void ue_send_sl_sdu(module_id_t module_idP,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
3
,
(
char
*
)
sdu
,
sdu_len
,
rlc_
sdu
,
rlc_
sdu_len
,
1
,
NULL
);
}
...
...
@@ -2762,7 +2780,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
SLSCH_SUBHEADER_24_Bit_DST_SHORT
*
shorth
=
(
SLSCH_SUBHEADER_24_Bit_DST_SHORT
*
)
slsch
->
payload
;
shorth
->
F
=
0
;
shorth
->
L
=
sdu_length
;
shorth
->
E
=
1
;
shorth
->
E
=
0
;
shorth
->
LCID
=
3
;
shorth
->
SRC07
=
0x12
;
shorth
->
SRC815
=
0x34
;
...
...
@@ -2777,7 +2795,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
longh
->
F
=
1
;
longh
->
L_LSB
=
sdu_length
&
0xff
;
longh
->
L_MSB
=
(
sdu_length
>>
8
)
&
0x7f
;
longh
->
E
=
1
;
longh
->
E
=
0
;
longh
->
LCID
=
3
;
longh
->
SRC07
=
0x12
;
longh
->
SRC815
=
0x34
;
...
...
Cédric Roux
@Cedric.Roux
mentioned in commit
f254107b
·
May 09, 2018
mentioned in commit
f254107b
mentioned in commit f254107b24f80adbb532581c9b96471f60a3de88
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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