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
zzha zzha
OpenXG-RAN
Commits
eda72f0e
Commit
eda72f0e
authored
Dec 13, 2017
by
khadraou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
c4160190
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
21 deletions
+34
-21
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+34
-21
No files found.
targets/RT/USER/lte-ru.c
View file @
eda72f0e
...
...
@@ -1438,6 +1438,7 @@ static void* ru_thread_control( void* param ) {
int
i
;
int
len
;
// Start IF device if any
if
(
ru
->
start_if
)
{
LOG_I
(
PHY
,
"Starting IF interface for RU %d
\n
"
,
ru
->
idx
);
...
...
@@ -1445,6 +1446,14 @@ static void* ru_thread_control( void* param ) {
}
LOG_I
(
PHY
,
"Signaling main thread that RU %d is ready
\n
"
,
ru
->
idx
);
pthread_mutex_lock
(
&
RC
.
ru_mutex
);
RC
.
ru_mask
&=
~
(
1
<<
ru
->
idx
);
pthread_cond_signal
(
&
RC
.
ru_cond
);
pthread_mutex_unlock
(
&
RC
.
ru_mutex
);
wait_sync
(
"ru_thread"
);
ru
->
state
=
RU_IDLE
;
LOG_I
(
PHY
,
"Control channel ON for RU %d
\n
"
,
ru
->
idx
);
...
...
@@ -1511,6 +1520,19 @@ static void* ru_thread_control( void* param ) {
configure_rru
(
ru
->
idx
,
(
void
*
)
&
rru_config_msg
.
msg
[
0
]);
fill_rf_config
(
ru
,
ru
->
rf_config_file
);
init_frame_parms
(
&
ru
->
frame_parms
,
1
);
phy_init_RU
(
ru
);
ret
=
openair0_device_load
(
&
ru
->
rfdevice
,
&
ru
->
openair0_cfg
);
if
(
setup_RU_buffers
(
ru
)
!=
0
)
{
printf
(
"Exiting, cannot initialize RU Buffers
\n
"
);
exit
(
-
1
);
}
// send CONFIG_OK
rru_config_msg
.
type
=
RRU_config_ok
;
...
...
@@ -1537,6 +1559,12 @@ static void* ru_thread_control( void* param ) {
LOG_I
(
PHY
,
"Sending Start to RRU
\n
"
,
ru
->
idx
);
AssertFatal
((
ru
->
ifdevice
.
trx_ctlsend_func
(
&
ru
->
ifdevice
,
&
rru_config_msg
,
rru_config_msg
.
len
)
!=-
1
),
"Failed to send msg to RU %d
\n
"
,
ru
->
idx
);
if
(
setup_RU_buffers
(
ru
)
!=
0
)
{
printf
(
"Exiting, cannot initialize RU Buffers
\n
"
);
exit
(
-
1
);
}
ru
->
state
=
RU_RUN
;
// TODO: Start ru_thread
...
...
@@ -1627,33 +1655,18 @@ static void* ru_thread( void* param ) {
LOG_I
(
PHY
,
"Starting RU %d (%s,%s),
\n
"
,
ru
->
idx
,
eNB_functions
[
ru
->
function
],
eNB_timing
[
ru
->
if_timing
]);
while
(
!
oai_exit
)
{
LOG_I
(
PHY
,
"Waiting for thread control. RU %d
\n
"
,
ru
->
idx
);
// wait to be woken up
if
(
wait_on_condition
(
&
ru
->
proc
.
mutex_ru
,
&
ru
->
proc
.
cond_ru_thread
,
&
ru
->
proc
.
instance_cnt_ru
,
"ru_thread"
)
<
0
)
break
;
if
(
ru
->
if_south
==
LOCAL_RF
)
{
// configure RF parameters only
fill_rf_config
(
ru
,
ru
->
rf_config_file
);
init_frame_parms
(
&
ru
->
frame_parms
,
1
);
phy_init_RU
(
ru
);
ret
=
openair0_device_load
(
&
ru
->
rfdevice
,
&
ru
->
openair0_cfg
);
}
if
(
setup_RU_buffers
(
ru
)
!=
0
)
{
printf
(
"Exiting, cannot initialize RU Buffers
\n
"
);
exit
(
-
1
);
}
LOG_I
(
PHY
,
"Signaling main thread that RU %d is ready
\n
"
,
ru
->
idx
);
pthread_mutex_lock
(
&
RC
.
ru_mutex
);
RC
.
ru_mask
&=
~
(
1
<<
ru
->
idx
);
pthread_cond_signal
(
&
RC
.
ru_cond
);
pthread_mutex_unlock
(
&
RC
.
ru_mutex
);
wait_sync
(
"ru_thread"
);
// Start RF device if any
if
(
ru
->
start_rf
)
{
...
...
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