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
wangjie
OpenXG-RAN
Commits
c738ebbd
Commit
c738ebbd
authored
Mar 23, 2021
by
rmagueta
Committed by
luis_pereira87
Mar 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove TC-RNTI at PHY when RA procedure does not succeeded
parent
f23cb63b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
2 deletions
+17
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+11
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+3
-0
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+2
-0
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
c738ebbd
...
@@ -1377,7 +1377,7 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram
...
@@ -1377,7 +1377,7 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
module_id
]
->
UE_info
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
module_id
]
->
UE_info
;
NR_UE_harq_t
*
harq
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
harq_processes
[
current_harq_pid
];
NR_UE_harq_t
*
harq
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
harq_processes
[
current_harq_pid
];
LOG_D
(
MAC
,
"ue %d, rnti %d, harq is waiting %d, round %d, frame %d %d, harq id %d
\n
"
,
UE_id
,
ra
->
rnti
,
harq
->
is_waiting
,
harq
->
round
,
frame
,
slot
,
current_harq_pid
);
LOG_D
(
NR_
MAC
,
"ue %d, rnti %d, harq is waiting %d, round %d, frame %d %d, harq id %d
\n
"
,
UE_id
,
ra
->
rnti
,
harq
->
is_waiting
,
harq
->
round
,
frame
,
slot
,
current_harq_pid
);
if
(
harq
->
is_waiting
==
0
)
if
(
harq
->
is_waiting
==
0
)
{
{
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
c738ebbd
...
@@ -1753,12 +1753,22 @@ void mac_remove_nr_ue(module_id_t mod_id, rnti_t rnti)
...
@@ -1753,12 +1753,22 @@ void mac_remove_nr_ue(module_id_t mod_id, rnti_t rnti)
if
(
pthread_mutex_lock
(
&
rnti_to_remove_mutex
))
exit
(
1
);
if
(
pthread_mutex_lock
(
&
rnti_to_remove_mutex
))
exit
(
1
);
if
(
rnti_to_remove_count
==
10
)
exit
(
1
);
if
(
rnti_to_remove_count
==
10
)
exit
(
1
);
rnti_to_remove
[
rnti_to_remove_count
]
=
rnti
;
rnti_to_remove
[
rnti_to_remove_count
]
=
rnti
;
LOG_W
(
MAC
,
"to remove in mac rnti_to_remove[%d]=%d
\n
"
,
rnti_to_remove_count
,
rnti
);
LOG_W
(
NR_MAC
,
"to remove in mac rnti_to_remove[%d] = 0x%04x
\n
"
,
rnti_to_remove_count
,
rnti
);
rnti_to_remove_count
++
;
rnti_to_remove_count
++
;
if
(
pthread_mutex_unlock
(
&
rnti_to_remove_mutex
))
exit
(
1
);
if
(
pthread_mutex_unlock
(
&
rnti_to_remove_mutex
))
exit
(
1
);
}
}
}
}
void
nr_mac_remove_ra_rnti_ue
(
module_id_t
mod_id
,
rnti_t
rnti
)
{
// Hack to remove UE in the phy (following the same procedure as in function mac_remove_nr_ue)
if
(
pthread_mutex_lock
(
&
rnti_to_remove_mutex
))
exit
(
1
);
if
(
rnti_to_remove_count
==
10
)
exit
(
1
);
rnti_to_remove
[
rnti_to_remove_count
]
=
rnti
;
LOG_W
(
NR_MAC
,
"to remove in mac rnti_to_remove[%d] = 0x%04x
\n
"
,
rnti_to_remove_count
,
rnti
);
rnti_to_remove_count
++
;
if
(
pthread_mutex_unlock
(
&
rnti_to_remove_mutex
))
exit
(
1
);
}
uint8_t
nr_get_tpc
(
int
target
,
uint8_t
cqi
,
int
incr
)
{
uint8_t
nr_get_tpc
(
int
target
,
uint8_t
cqi
,
int
incr
)
{
// al values passed to this function are x10
// al values passed to this function are x10
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
c738ebbd
...
@@ -511,6 +511,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
...
@@ -511,6 +511,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
if
(
no_sig
)
{
if
(
no_sig
)
{
LOG_W
(
NR_MAC
,
"Random Access %i failed at state %i
\n
"
,
i
,
ra
->
state
);
LOG_W
(
NR_MAC
,
"Random Access %i failed at state %i
\n
"
,
i
,
ra
->
state
);
nr_mac_remove_ra_rnti_ue
(
gnb_mod_idP
,
ra
->
rnti
);
nr_clear_ra_proc
(
gnb_mod_idP
,
CC_idP
,
frameP
,
ra
);
nr_clear_ra_proc
(
gnb_mod_idP
,
CC_idP
,
frameP
,
ra
);
}
else
{
}
else
{
...
@@ -535,6 +536,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
...
@@ -535,6 +536,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
if
(
ra
->
cfra
)
{
if
(
ra
->
cfra
)
{
LOG_I
(
NR_MAC
,
"(ue %i, rnti 0x%04x) CFRA procedure succeeded!
\n
"
,
UE_id
,
ra
->
rnti
);
LOG_I
(
NR_MAC
,
"(ue %i, rnti 0x%04x) CFRA procedure succeeded!
\n
"
,
UE_id
,
ra
->
rnti
);
nr_mac_remove_ra_rnti_ue
(
gnb_mod_idP
,
ra
->
rnti
);
nr_clear_ra_proc
(
gnb_mod_idP
,
CC_idP
,
frameP
,
ra
);
nr_clear_ra_proc
(
gnb_mod_idP
,
CC_idP
,
frameP
,
ra
);
free
(
ra
->
preambles
.
preamble_list
);
free
(
ra
->
preambles
.
preamble_list
);
UE_info
->
active
[
UE_id
]
=
true
;
UE_info
->
active
[
UE_id
]
=
true
;
...
@@ -574,6 +576,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
...
@@ -574,6 +576,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
continue
;
continue
;
LOG_W
(
NR_MAC
,
"Random Access %i failed at state %i
\n
"
,
i
,
ra
->
state
);
LOG_W
(
NR_MAC
,
"Random Access %i failed at state %i
\n
"
,
i
,
ra
->
state
);
nr_mac_remove_ra_rnti_ue
(
gnb_mod_idP
,
ra
->
rnti
);
nr_clear_ra_proc
(
gnb_mod_idP
,
CC_idP
,
frameP
,
ra
);
nr_clear_ra_proc
(
gnb_mod_idP
,
CC_idP
,
frameP
,
ra
);
}
}
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
c738ebbd
...
@@ -312,6 +312,8 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *secon
...
@@ -312,6 +312,8 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *secon
void
mac_remove_nr_ue
(
module_id_t
mod_id
,
rnti_t
rnti
);
void
mac_remove_nr_ue
(
module_id_t
mod_id
,
rnti_t
rnti
);
void
nr_mac_remove_ra_rnti_ue
(
module_id_t
mod_id
,
rnti_t
rnti
);
int
allocate_nr_CCEs
(
gNB_MAC_INST
*
nr_mac
,
int
allocate_nr_CCEs
(
gNB_MAC_INST
*
nr_mac
,
NR_BWP_Downlink_t
*
bwp
,
NR_BWP_Downlink_t
*
bwp
,
NR_ControlResourceSet_t
*
coreset
,
NR_ControlResourceSet_t
*
coreset
,
...
...
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