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
270c540c
Commit
270c540c
authored
May 11, 2022
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor clean up in function mac_rrc_nr_data_req
parent
3c4ba502
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
49 deletions
+46
-49
openair2/RRC/NR/L2_nr_interface.c
openair2/RRC/NR/L2_nr_interface.c
+46
-49
No files found.
openair2/RRC/NR/L2_nr_interface.c
View file @
270c540c
...
...
@@ -253,44 +253,41 @@ uint16_t mac_rrc_nr_data_req(const module_id_t Mod_idP,
buffer_pP
[
2
]);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
return
(
3
)
;
return
3
;
}
// TODO BCCH SIB1 SIBs
if
((
Srb_id
&
RAB_OFFSET
)
==
BCCH
)
{
memcpy
(
&
buffer_pP
[
0
],
RC
.
nrrrc
[
Mod_idP
]
->
carrier
.
SIB1
,
RC
.
nrrrc
[
Mod_idP
]
->
carrier
.
sizeof_SIB1
);
if
((
Srb_id
&
RAB_OFFSET
)
==
BCCH
)
{
memcpy
(
&
buffer_pP
[
0
],
RC
.
nrrrc
[
Mod_idP
]
->
carrier
.
SIB1
,
RC
.
nrrrc
[
Mod_idP
]
->
carrier
.
sizeof_SIB1
);
return
RC
.
nrrrc
[
Mod_idP
]
->
carrier
.
sizeof_SIB1
;
}
// CCCH
if
(
(
Srb_id
&
RAB_OFFSET
)
==
CCCH
)
{
if
((
Srb_id
&
RAB_OFFSET
)
==
CCCH
)
{
LOG_D
(
NR_RRC
,
"[gNB %d] Frame %d CCCH request (Srb_id %ld)
\n
"
,
Mod_idP
,
frameP
,
Srb_id
);
char
*
payload_pP
;
uint16_t
Sdu_size
=
0
;
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
rrc_gNB_get_ue_context
(
RC
.
nrrrc
[
Mod_idP
],
rnti
);
LOG_D
(
NR_RRC
,
"[gNB %d] Frame %d CCCH request (Srb_id %ld)
\n
"
,
Mod_idP
,
frameP
,
Srb_id
);
if
(
ue_context_p
==
NULL
)
{
LOG_E
(
NR_RRC
,
"[gNB %d] Frame %d CCCH request but no ue_context
\n
"
,
Mod_idP
,
frameP
);
return
0
;
}
AssertFatal
(
ue_context_p
!=
NULL
,
"failed to get ue_context, rnti %x
\n
"
,
rnti
);
uint16_t
payload_size
=
ue_context_p
->
ue_context
.
Srb0
.
Tx_buffer
.
payload_size
;
// check if data is there for MAC
if
(
payload_size
>
0
)
{
payload_pP
=
ue_context_p
->
ue_context
.
Srb0
.
Tx_buffer
.
Payload
;
LOG_D
(
NR_RRC
,
"[gNB %d] CCCH has %d bytes (dest: %p, src %p)
\n
"
,
Mod_idP
,
payload_size
,
buffer_pP
,
payload_pP
);
// Fill buffer
memcpy
((
void
*
)
buffer_pP
,
(
void
*
)
payload_pP
,
payload_size
);
Sdu_size
=
payload_size
;
ue_context_p
->
ue_context
.
Srb0
.
Tx_buffer
.
payload_size
=
0
;
}
return
Sdu
_size
;
return
payload
_size
;
}
return
(
0
);
return
0
;
}
int8_t
nr_mac_rrc_bwp_switch_req
(
const
module_id_t
module_idP
,
...
...
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