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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
5df61530
Commit
5df61530
authored
Dec 05, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary nr_ue_manage_ra_procedure function
parent
dcc17a9d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
55 deletions
+23
-55
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+0
-9
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+1
-41
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+22
-5
No files found.
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
5df61530
...
...
@@ -297,15 +297,6 @@ void nr_ra_contention_resolution_failed(NR_UE_MAC_INST_t *mac);
void
nr_ra_succeeded
(
NR_UE_MAC_INST_t
*
mac
,
const
uint8_t
gNB_index
,
const
frame_t
frame
,
const
int
slot
);
void
nr_ra_backoff_setting
(
RA_config_t
*
ra
);
void
nr_get_RA_window
(
NR_UE_MAC_INST_t
*
mac
);
/*@mac pointer to MAC instance
@param CC_id Component Carrier Index
@param frame
@param gNB_id gNB index
@param nr_slot_tx slot for PRACH transmission
@returns indication to generate PRACH to phy */
void
nr_ue_manage_ra_procedure
(
NR_UE_MAC_INST_t
*
mac
,
int
CC_id
,
frame_t
frame
,
uint8_t
gNB_id
,
int
nr_slot_tx
);
void
prepare_msg4_msgb_feedback
(
NR_UE_MAC_INST_t
*
mac
,
int
pid
,
int
ack_nack
);
void
configure_initial_pucch
(
PUCCH_sched_t
*
pucch
,
int
res_ind
);
void
release_PUCCH_SRS
(
NR_UE_MAC_INST_t
*
mac
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
5df61530
...
...
@@ -1068,6 +1068,7 @@ bool init_RA(NR_UE_MAC_INST_t *mac, int frame)
twostep_generic
,
&
mac
->
ntn_ta
);
ra
->
start_response_window
=
false
;
return
true
;
}
...
...
@@ -1159,47 +1160,6 @@ void nr_get_Msg3_MsgA_PUSCH_payload(NR_UE_MAC_INST_t *mac, uint8_t *buf, int TBS
memcpy
(
ra
->
Msg3_buffer
,
buf
,
sizeof
(
uint8_t
)
*
TBS_max
);
}
/**
* Function: handles Random Access Preamble Initialization (5.1.1 TS 38.321)
* handles Random Access Response reception (5.1.4 TS 38.321)
* Note: In SA mode the Msg3 contains a CCCH SDU, therefore no C-RNTI MAC CE is transmitted.
*
* @prach_resources pointer to PRACH resources
* @prach_pdu pointer to FAPI UL PRACH PDU
* @mod_id module ID
* @CC_id CC ID
* @frame current UL TX frame
* @gNB_id gNB ID
* @nr_slot_tx current UL TX slot
*/
void
nr_ue_manage_ra_procedure
(
NR_UE_MAC_INST_t
*
mac
,
int
CC_id
,
frame_t
frame
,
uint8_t
gNB_id
,
int
nr_slot_tx
)
{
RA_config_t
*
ra
=
&
mac
->
ra
;
if
(
ra
->
ra_state
==
nrRA_UE_IDLE
)
{
bool
init_success
=
init_RA
(
mac
,
frame
);
if
(
!
init_success
)
return
;
else
{
// perform the Random Access Resource selection procedure (see clause 5.1.2 and .2a)
ra_resource_selection
(
mac
);
}
}
LOG_D
(
NR_MAC
,
"[UE %d][%d.%d]: ra_state %d, RA_active %d
\n
"
,
mac
->
ue_id
,
frame
,
nr_slot_tx
,
ra
->
ra_state
,
ra
->
RA_active
);
if
(
nr_timer_is_active
(
&
ra
->
RA_backoff_timer
))
{
// if the criteria (as defined in clause 5.1.2) to select contention-free Random Access Resources
// is met during the backoff time
// TODO verify what does this mean
if
(
ra
->
cfra
)
{
// perform the Random Access Resource selection procedure
nr_timer_stop
(
&
ra
->
RA_backoff_timer
);
mac
->
ra
.
ra_state
=
nrRA_GENERATE_PREAMBLE
;
ra_resource_selection
(
mac
);
}
}
}
// Handlig successful RA completion @ MAC layer
// according to section 5 of 3GPP TS 38.321 version 16.2.1 Release 16
// todo:
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
5df61530
...
...
@@ -246,6 +246,18 @@ void update_mac_timers(NR_UE_MAC_INST_t *mac)
// perform the Random Access Resource selection procedure after the backoff time
mac
->
ra
.
ra_state
=
nrRA_GENERATE_PREAMBLE
;
ra_resource_selection
(
mac
);
}
else
{
if
(
nr_timer_is_active
(
&
mac
->
ra
.
RA_backoff_timer
))
{
// if the criteria (as defined in clause 5.1.2) to select contention-free Random Access Resources
// is met during the backoff time
// TODO verify what does this mean
if
(
mac
->
ra
.
cfra
)
{
// perform the Random Access Resource selection procedure
nr_timer_stop
(
&
mac
->
ra
.
RA_backoff_timer
);
mac
->
ra
.
ra_state
=
nrRA_GENERATE_PREAMBLE
;
ra_resource_selection
(
mac
);
}
}
}
}
...
...
@@ -1315,11 +1327,18 @@ void nr_ue_ul_scheduler(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_info)
uint32_t
gNB_index
=
ul_info
->
gNB_index
;
RA_config_t
*
ra
=
&
mac
->
ra
;
if
(
mac
->
state
==
UE_PERFORMING_RA
)
{
nr_ue_manage_ra_procedure
(
mac
,
cc_id
,
frame_tx
,
gNB_index
,
slot_tx
);
nr_ue_prach_scheduler
(
mac
,
frame_tx
,
slot_tx
);
if
(
mac
->
state
==
UE_PERFORMING_RA
&&
ra
->
ra_state
==
nrRA_UE_IDLE
)
{
bool
res
=
init_RA
(
mac
,
frame_tx
);
if
(
res
)
{
// perform the Random Access Resource selection procedure (see clause 5.1.2 and .2a)
ra_resource_selection
(
mac
);
}
}
if
(
mac
->
state
==
UE_PERFORMING_RA
&&
ra
->
ra_state
==
nrRA_GENERATE_PREAMBLE
)
nr_ue_prach_scheduler
(
mac
,
frame_tx
,
slot_tx
);
bool
BSRsent
=
false
;
if
(
mac
->
state
==
UE_CONNECTED
)
{
nr_ue_periodic_srs_scheduling
(
mac
,
frame_tx
,
slot_tx
);
...
...
@@ -2075,8 +2094,6 @@ static bool is_prach_frame(frame_t frame, prach_occasion_info_t *prach_occasion_
static
void
nr_ue_prach_scheduler
(
NR_UE_MAC_INST_t
*
mac
,
frame_t
frameP
,
slot_t
slotP
)
{
RA_config_t
*
ra
=
&
mac
->
ra
;
if
(
ra
->
ra_state
!=
nrRA_GENERATE_PREAMBLE
)
return
;
// Get any valid PRACH occasion in the current slot for the selected SSB index
prach_occasion_info_t
*
prach_occasion_info
=
&
ra
->
sched_ro_info
;
...
...
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