Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oai
openairinterface5G
Commits
4695d16c
Commit
4695d16c
authored
Feb 25, 2018
by
knopp
Browse files
Options
Downloads
Patches
Plain Diff
handling of RU_IDLE->RU_RUN->RU_IDLE
parent
1bf45411
No related branches found
No related tags found
4 merge requests
!650
Release v1.1.0 Candidate
,
!617
Develop: Integration 2019 Week 25
,
!588
Develop nr merge
,
!576
Multi-RU support and OTA Synch/Calibration for TDD
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
targets/RT/USER/lte-ru.c
+45
-21
45 additions, 21 deletions
targets/RT/USER/lte-ru.c
with
45 additions
and
21 deletions
targets/RT/USER/lte-ru.c
+
45
−
21
View file @
4695d16c
...
@@ -963,6 +963,12 @@ static void* ru_thread_asynch_rxtx( void* param ) {
...
@@ -963,6 +963,12 @@ static void* ru_thread_asynch_rxtx( void* param ) {
if
(
oai_exit
)
break
;
if
(
oai_exit
)
break
;
if
(
ru
->
state
!=
RU_RUN
)
{
subframe
=
0
;
frame
=
0
;
usleep
(
1000
);
}
else
{
if
(
subframe
==
9
)
{
if
(
subframe
==
9
)
{
subframe
=
0
;
subframe
=
0
;
frame
++
;
frame
++
;
...
@@ -980,7 +986,7 @@ static void* ru_thread_asynch_rxtx( void* param ) {
...
@@ -980,7 +986,7 @@ static void* ru_thread_asynch_rxtx( void* param ) {
}
}
else
AssertFatal
(
1
==
0
,
"Unknown function in ru_thread_asynch_rxtx
\n
"
);
else
AssertFatal
(
1
==
0
,
"Unknown function in ru_thread_asynch_rxtx
\n
"
);
}
}
}
ru_thread_asynch_rxtx_status
=
0
;
ru_thread_asynch_rxtx_status
=
0
;
return
(
&
ru_thread_asynch_rxtx_status
);
return
(
&
ru_thread_asynch_rxtx_status
);
}
}
...
@@ -1501,6 +1507,7 @@ static void* ru_stats_thread(void* param) {
...
@@ -1501,6 +1507,7 @@ static void* ru_stats_thread(void* param) {
}
}
void
reset_proc
(
RU_t
*
ru
);
static
void
*
ru_thread_control
(
void
*
param
)
{
static
void
*
ru_thread_control
(
void
*
param
)
{
...
@@ -1622,7 +1629,7 @@ static void* ru_thread_control( void* param ) {
...
@@ -1622,7 +1629,7 @@ static void* ru_thread_control( void* param ) {
AssertFatal
((
ru
->
ifdevice
.
trx_ctlsend_func
(
&
ru
->
ifdevice
,
&
rru_config_msg
,
rru_config_msg
.
len
)
!=-
1
),
AssertFatal
((
ru
->
ifdevice
.
trx_ctlsend_func
(
&
ru
->
ifdevice
,
&
rru_config_msg
,
rru_config_msg
.
len
)
!=-
1
),
"RU %d failed send CONFIG_OK to RAU
\n
"
,
ru
->
idx
);
"RU %d failed send CONFIG_OK to RAU
\n
"
,
ru
->
idx
);
reset_proc
(
ru
);
ru
->
state
=
RU_READY
;
ru
->
state
=
RU_READY
;
}
else
{
}
else
{
LOG_I
(
PHY
,
"Received RRU_config msg...Ignoring
\n
"
);
LOG_I
(
PHY
,
"Received RRU_config msg...Ignoring
\n
"
);
...
@@ -1649,7 +1656,7 @@ static void* ru_thread_control( void* param ) {
...
@@ -1649,7 +1656,7 @@ static void* ru_thread_control( void* param ) {
pthread_cond_signal
(
&
RC
.
ru_cond
);
pthread_cond_signal
(
&
RC
.
ru_cond
);
pthread_mutex_unlock
(
&
RC
.
ru_mutex
);
pthread_mutex_unlock
(
&
RC
.
ru_mutex
);
wait_sync
(
"ru_thread"
);
wait_sync
(
"ru_thread
_control
"
);
// send start
// send start
rru_config_msg
.
type
=
RRU_start
;
rru_config_msg
.
type
=
RRU_start
;
...
@@ -1682,10 +1689,10 @@ static void* ru_thread_control( void* param ) {
...
@@ -1682,10 +1689,10 @@ static void* ru_thread_control( void* param ) {
pthread_cond_signal
(
&
RC
.
ru_cond
);
pthread_cond_signal
(
&
RC
.
ru_cond
);
pthread_mutex_unlock
(
&
RC
.
ru_mutex
);
pthread_mutex_unlock
(
&
RC
.
ru_mutex
);
wait_sync
(
"ru_thread"
);
wait_sync
(
"ru_thread
_control
"
);
ru
->
state
=
(
ru
->
is_slave
==
1
)
?
RU_SYNC
:
RU_RUN
;
ru
->
state
=
(
ru
->
is_slave
==
1
)
?
RU_SYNC
:
RU_RUN
;
ru
->
cmd
=
EMPTY
;
pthread_mutex_lock
(
&
proc
->
mutex_ru
);
pthread_mutex_lock
(
&
proc
->
mutex_ru
);
proc
->
instance_cnt_ru
=
1
;
proc
->
instance_cnt_ru
=
1
;
pthread_mutex_unlock
(
&
proc
->
mutex_ru
);
pthread_mutex_unlock
(
&
proc
->
mutex_ru
);
...
@@ -1780,6 +1787,7 @@ static void* ru_thread( void* param ) {
...
@@ -1780,6 +1787,7 @@ static void* ru_thread( void* param ) {
// wait to be woken up
// 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
(
wait_on_condition
(
&
ru
->
proc
.
mutex_ru
,
&
ru
->
proc
.
cond_ru_thread
,
&
ru
->
proc
.
instance_cnt_ru
,
"ru_thread"
)
<
0
)
break
;
AssertFatal
(
ru
->
state
==
RU_RUN
,
"ru->state = %d != RU_RUN
\n
"
);
// Start RF device if any
// Start RF device if any
if
(
ru
->
start_rf
)
{
if
(
ru
->
start_rf
)
{
...
@@ -1878,7 +1886,6 @@ static void* ru_thread( void* param ) {
...
@@ -1878,7 +1886,6 @@ static void* ru_thread( void* param ) {
if
(
ru
->
fh_north_out
)
ru
->
fh_north_out
(
ru
);
if
(
ru
->
fh_north_out
)
ru
->
fh_north_out
(
ru
);
LOG_I
(
PHY
,
"ru->state = %d (RU_RUN is %d)
\n
"
,
ru
->
state
,
RU_RUN
);
}
}
}
// while !oai_exit
}
// while !oai_exit
...
@@ -2013,6 +2020,23 @@ extern void feptx_prec(RU_t *ru);
...
@@ -2013,6 +2020,23 @@ extern void feptx_prec(RU_t *ru);
extern
void
init_fep_thread
(
RU_t
*
ru
,
pthread_attr_t
*
attr
);
extern
void
init_fep_thread
(
RU_t
*
ru
,
pthread_attr_t
*
attr
);
extern
void
init_feptx_thread
(
RU_t
*
ru
,
pthread_attr_t
*
attr
);
extern
void
init_feptx_thread
(
RU_t
*
ru
,
pthread_attr_t
*
attr
);
void
reset_proc
(
RU_t
*
ru
)
{
int
i
=
0
;
RU_proc_t
*
proc
;
AssertFatal
(
ru
!=
NULL
,
"ru is null
\n
"
);
proc
=
&
ru
->
proc
;
proc
->
ru
=
ru
;
proc
->
first_rx
=
1
;
proc
->
first_tx
=
1
;
proc
->
frame_offset
=
0
;
proc
->
frame_tx_unwrap
=
0
;
for
(
i
=
0
;
i
<
10
;
i
++
)
proc
->
symbol_mask
[
i
]
=
0
;
}
void
init_RU_proc
(
RU_t
*
ru
)
{
void
init_RU_proc
(
RU_t
*
ru
)
{
int
i
=
0
;
int
i
=
0
;
...
@@ -2371,7 +2395,7 @@ void configure_rru(int idx,
...
@@ -2371,7 +2395,7 @@ void configure_rru(int idx,
fill_rf_config
(
ru
,
ru
->
rf_config_file
);
fill_rf_config
(
ru
,
ru
->
rf_config_file
);
phy_init_RU
(
ru
);
//
phy_init_RU(ru);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment