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
e8f07008
Commit
e8f07008
authored
Mar 27, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
free RACH structures in the right place for the right triggering cause
parent
1244c9a2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
14 deletions
+24
-14
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+3
-3
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+2
-2
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+18
-9
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+1
-0
No files found.
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
e8f07008
...
...
@@ -1425,7 +1425,7 @@ void nr_rrc_mac_config_req_reset(module_id_t module_id,
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
switch
(
cause
)
{
case
GO_TO_IDLE
:
reset_ra
(
&
mac
->
ra
);
reset_ra
(
mac
,
cause
);
release_mac_configuration
(
mac
,
cause
);
nr_ue_init_mac
(
mac
);
nr_ue_mac_default_configs
(
mac
);
...
...
@@ -1433,14 +1433,14 @@ void nr_rrc_mac_config_req_reset(module_id_t module_id,
nr_ue_send_synch_request
(
mac
,
module_id
,
0
,
-
1
);
break
;
case
DETACH
:
reset_ra
(
&
mac
->
ra
);
reset_ra
(
mac
,
cause
);
reset_mac_inst
(
mac
);
nr_ue_reset_sync_state
(
mac
);
release_mac_configuration
(
mac
,
cause
);
break
;
case
T300_EXPIRY
:
reset_ra
(
mac
,
cause
);
reset_mac_inst
(
mac
);
reset_ra
(
&
mac
->
ra
);
mac
->
state
=
UE_SYNC
;
// still in sync but need to restart RA
break
;
case
RE_ESTABLISHMENT
:
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
e8f07008
...
...
@@ -100,7 +100,7 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(int nb_inst);
NR_UE_MAC_INST_t
*
get_mac_inst
(
module_id_t
module_id
);
void
reset_mac_inst
(
NR_UE_MAC_INST_t
*
nr_mac
);
void
reset_ra
(
RA_config_t
*
ra
);
void
reset_ra
(
NR_UE_MAC_INST_t
*
nr_mac
,
NR_UE_MAC_reset_cause_t
cause
);
void
release_mac_configuration
(
NR_UE_MAC_INST_t
*
mac
,
NR_UE_MAC_reset_cause_t
cause
);
...
...
@@ -307,7 +307,7 @@ void init_RA(NR_UE_MAC_INST_t *mac,
NR_RACH_ConfigDedicated_t
*
rach_ConfigDedicated
);
int16_t
get_prach_tx_power
(
NR_UE_MAC_INST_t
*
mac
);
void
free_rach_structures
(
NR_UE_MAC_INST_t
*
nr_mac
,
int
bwp_id
);
void
nr_Msg1_transmitted
(
NR_UE_MAC_INST_t
*
mac
);
void
nr_Msg3_transmitted
(
NR_UE_MAC_INST_t
*
mac
,
uint8_t
CC_id
,
frame_t
frameP
,
slot_t
slotP
,
uint8_t
gNB_id
);
void
nr_get_msg3_payload
(
NR_UE_MAC_INST_t
*
mac
,
uint8_t
*
buf
,
int
TBS_max
);
...
...
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
View file @
e8f07008
...
...
@@ -207,14 +207,6 @@ void reset_mac_inst(NR_UE_MAC_INST_t *nr_mac)
// release, if any, Temporary C-RNTI
nr_mac
->
ra
.
t_crnti
=
0
;
// free RACH structs
for
(
int
i
=
0
;
i
<
MAX_NUM_BWP_UE
;
i
++
)
{
free
(
nr_mac
->
ssb_list
[
i
].
tx_ssb
);
for
(
int
j
=
0
;
j
<
MAX_NB_PRACH_CONF_PERIOD_IN_ASSOCIATION_PATTERN_PERIOD
;
j
++
)
for
(
int
k
=
0
;
k
<
MAX_NB_FRAME_IN_PRACH_CONF_PERIOD
;
k
++
)
for
(
int
l
=
0
;
l
<
MAX_NB_SLOT_IN_FRAME
;
l
++
)
free
(
nr_mac
->
prach_assoc_pattern
[
i
].
prach_conf_period_list
[
j
].
prach_occasion_slot_map
[
k
][
l
].
prach_occasion
);
}
// reset BFI_COUNTER
// TODO beam failure procedure not implemented
...
...
@@ -287,9 +279,26 @@ void release_mac_configuration(NR_UE_MAC_INST_t *mac,
memset
(
&
mac
->
ul_time_alignment
,
0
,
sizeof
(
mac
->
ul_time_alignment
));
}
void
reset_ra
(
RA_config_t
*
ra
)
void
free_rach_structures
(
NR_UE_MAC_INST_t
*
nr_mac
,
int
bwp_id
)
{
for
(
int
j
=
0
;
j
<
MAX_NB_PRACH_CONF_PERIOD_IN_ASSOCIATION_PATTERN_PERIOD
;
j
++
)
for
(
int
k
=
0
;
k
<
MAX_NB_FRAME_IN_PRACH_CONF_PERIOD
;
k
++
)
for
(
int
l
=
0
;
l
<
MAX_NB_SLOT_IN_FRAME
;
l
++
)
free
(
nr_mac
->
prach_assoc_pattern
[
bwp_id
].
prach_conf_period_list
[
j
].
prach_occasion_slot_map
[
k
][
l
].
prach_occasion
);
free
(
nr_mac
->
ssb_list
[
bwp_id
].
tx_ssb
);
}
void
reset_ra
(
NR_UE_MAC_INST_t
*
nr_mac
,
NR_UE_MAC_reset_cause_t
cause
)
{
RA_config_t
*
ra
=
&
nr_mac
->
ra
;
if
(
ra
->
rach_ConfigDedicated
)
asn1cFreeStruc
(
asn_DEF_NR_RACH_ConfigDedicated
,
ra
->
rach_ConfigDedicated
);
memset
(
ra
,
0
,
sizeof
(
RA_config_t
));
if
(
cause
==
T300_EXPIRY
)
return
;
for
(
int
i
=
0
;
i
<
MAX_NUM_BWP_UE
;
i
++
)
free_rach_structures
(
nr_mac
,
i
);
}
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
e8f07008
...
...
@@ -1917,6 +1917,7 @@ void build_ssb_to_ro_map(NR_UE_MAC_INST_t *mac)
{
// Clear all the lists and maps
const
int
bwp_id
=
mac
->
current_UL_BWP
->
bwp_id
;
free_rach_structures
(
mac
,
bwp_id
);
memset
(
&
mac
->
ssb_list
[
bwp_id
],
0
,
sizeof
(
ssb_list_info_t
));
memset
(
&
mac
->
prach_assoc_pattern
[
bwp_id
],
0
,
sizeof
(
prach_association_pattern_t
));
...
...
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