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
promise
OpenXG-RAN
Commits
80aaca76
Commit
80aaca76
authored
Oct 19, 2017
by
David Price
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More tidy up
parent
b6a9bb33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
70 deletions
+74
-70
openair2/PHY_INTERFACE/IF_Module.c
openair2/PHY_INTERFACE/IF_Module.c
+74
-70
No files found.
openair2/PHY_INTERFACE/IF_Module.c
View file @
80aaca76
...
...
@@ -91,20 +91,24 @@ void handle_cqi(UL_IND_t *UL_info) {
ind
.
cqi_indication_body
=
UL_info
->
cqi_ind
;
oai_nfapi_cqi_indication
(
&
ind
);
UL_info
->
cqi_ind
.
number_of_cqis
=
0
;
}
}
for
(
i
=
0
;
i
<
UL_info
->
cqi_ind
.
number_of_cqis
;
i
++
)
cqi_indication
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
,
UL_info
->
cqi_ind
.
cqi_pdu_list
[
i
].
rx_ue_information
.
rnti
,
&
UL_info
->
cqi_ind
.
cqi_pdu_list
[
i
].
cqi_indication_rel9
,
UL_info
->
cqi_ind
.
cqi_raw_pdu_list
[
i
].
pdu
,
&
UL_info
->
cqi_ind
.
cqi_pdu_list
[
i
].
ul_cqi_information
);
UL_info
->
cqi_ind
.
number_of_cqis
=
0
;
else
{
for
(
i
=
0
;
i
<
UL_info
->
cqi_ind
.
number_of_cqis
;
i
++
)
cqi_indication
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
,
UL_info
->
cqi_ind
.
cqi_pdu_list
[
i
].
rx_ue_information
.
rnti
,
&
UL_info
->
cqi_ind
.
cqi_pdu_list
[
i
].
cqi_indication_rel9
,
UL_info
->
cqi_ind
.
cqi_raw_pdu_list
[
i
].
pdu
,
&
UL_info
->
cqi_ind
.
cqi_pdu_list
[
i
].
ul_cqi_information
);
UL_info
->
cqi_ind
.
number_of_cqis
=
0
;
}
}
void
handle_harq
(
UL_IND_t
*
UL_info
)
{
...
...
@@ -117,27 +121,26 @@ void handle_harq(UL_IND_t *UL_info) {
{
LOG_E
(
PHY
,
"UL_info->harq_ind.harq_indication_body.number_of_harqs:%d Send to VNF
\n
"
,
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
);
nfapi_harq_indication_t
ind
;
ind
.
header
.
message_id
=
NFAPI_HARQ_INDICATION
;
ind
.
sfn_sf
=
UL_info
->
frame
<<
4
|
UL_info
->
subframe
;
int
retval
=
oai_nfapi_harq_indication
(
&
ind
);
int
retval
=
oai_nfapi_harq_indication
(
&
UL_info
->
harq_ind
);
if
(
retval
!=
0
)
{
LOG_E
(
PHY
,
"Failed to encode NFAPI HARQ_IND retval:%d
\n
"
,
retval
);
}
}
for
(
i
=
0
;
i
<
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
;
i
++
)
harq_indication
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
,
&
UL_info
->
harq_ind
.
harq_indication_body
.
harq_pdu_list
[
i
]);
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
=
0
;
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
=
0
;
}
else
{
for
(
i
=
0
;
i
<
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
;
i
++
)
harq_indication
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
,
&
UL_info
->
harq_ind
.
harq_indication_body
.
harq_pdu_list
[
i
]);
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
=
0
;
}
}
void
handle_ulsch
(
UL_IND_t
*
UL_info
)
{
...
...
@@ -152,53 +155,54 @@ void handle_ulsch(UL_IND_t *UL_info) {
oai_nfapi_crc_indication
(
&
UL_info
->
crc_ind
);
}
}
if
(
nfapi_mode
==
1
&&
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
>
0
)
if
(
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
>
0
)
{
LOG_D
(
PHY
,
"UL_info->rx_ind.number_of_pdus:%d
\n
"
,
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
);
oai_nfapi_rx_ind
(
&
UL_info
->
rx_ind
);
}
}
else
{
LOG_D
(
PHY
,
"UL_info->rx_ind.number_of_pdus:%d
\n
"
,
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
);
oai_nfapi_rx_ind
(
&
UL_info
->
rx_ind
);
for
(
i
=
0
;
i
<
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
;
i
++
)
{
for
(
j
=
0
;
j
<
UL_info
->
crc_ind
.
crc_indication_body
.
number_of_crcs
;
j
++
)
{
// find crc_indication j corresponding rx_indication i
LOG_D
(
PHY
,
"UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].rx_ue_information.rnti:%04x UL_info->rx_ind.rx_indication_body.rx_pdu_list[%d].rx_ue_information.rnti:%04x
\n
"
,
j
,
UL_info
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
[
j
].
rx_ue_information
.
rnti
,
i
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_ue_information
.
rnti
);
if
(
UL_info
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
[
j
].
rx_ue_information
.
rnti
==
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_ue_information
.
rnti
)
{
LOG_D
(
PHY
,
"UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].crc_indication_rel8.crc_flag:%d
\n
"
,
j
,
UL_info
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
[
j
].
crc_indication_rel8
.
crc_flag
);
if
(
UL_info
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
[
j
].
crc_indication_rel8
.
crc_flag
==
1
)
{
// CRC error indication
LOG_D
(
MAC
,
"Frame %d, Subframe %d Calling rx_sdu (CRC error)
\n
"
,
UL_info
->
frame
,
UL_info
->
subframe
);
rx_sdu
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_ue_information
.
rnti
,
(
uint8_t
*
)
NULL
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
length
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
timing_advance
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
ul_cqi
);
}
else
{
LOG_D
(
MAC
,
"Frame %d, Subframe %d Calling rx_sdu (CRC ok)
\n
"
,
UL_info
->
frame
,
UL_info
->
subframe
);
rx_sdu
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_ue_information
.
rnti
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
data
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
length
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
timing_advance
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
ul_cqi
);
}
break
;
}
//if (UL_info->crc_ind.crc_pdu_list[j].rx_ue_information.rnti ==
// UL_info->rx_ind.rx_pdu_list[i].rx_ue_information.rnti)
}
// for (j=0;j<UL_info->crc_ind.crc_indication_body.number_of_crcs;j++)
AssertFatal
(
j
<
UL_info
->
crc_ind
.
crc_indication_body
.
number_of_crcs
,
"Couldn't find matchin CRC indication
\n
"
);
}
// for (i=0;i<UL_info->rx_ind.number_of_pdus;i++)
}
for
(
i
=
0
;
i
<
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
;
i
++
)
{
for
(
j
=
0
;
j
<
UL_info
->
crc_ind
.
crc_indication_body
.
number_of_crcs
;
j
++
)
{
// find crc_indication j corresponding rx_indication i
LOG_D
(
PHY
,
"UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].rx_ue_information.rnti:%04x UL_info->rx_ind.rx_indication_body.rx_pdu_list[%d].rx_ue_information.rnti:%04x
\n
"
,
j
,
UL_info
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
[
j
].
rx_ue_information
.
rnti
,
i
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_ue_information
.
rnti
);
if
(
UL_info
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
[
j
].
rx_ue_information
.
rnti
==
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_ue_information
.
rnti
)
{
LOG_D
(
PHY
,
"UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].crc_indication_rel8.crc_flag:%d
\n
"
,
j
,
UL_info
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
[
j
].
crc_indication_rel8
.
crc_flag
);
if
(
UL_info
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
[
j
].
crc_indication_rel8
.
crc_flag
==
1
)
{
// CRC error indication
LOG_D
(
MAC
,
"Frame %d, Subframe %d Calling rx_sdu (CRC error)
\n
"
,
UL_info
->
frame
,
UL_info
->
subframe
);
rx_sdu
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_ue_information
.
rnti
,
(
uint8_t
*
)
NULL
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
length
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
timing_advance
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
ul_cqi
);
}
else
{
LOG_D
(
MAC
,
"Frame %d, Subframe %d Calling rx_sdu (CRC ok)
\n
"
,
UL_info
->
frame
,
UL_info
->
subframe
);
rx_sdu
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_ue_information
.
rnti
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
data
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
length
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
timing_advance
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
ul_cqi
);
}
break
;
}
//if (UL_info->crc_ind.crc_pdu_list[j].rx_ue_information.rnti ==
// UL_info->rx_ind.rx_pdu_list[i].rx_ue_information.rnti) {
}
// for (j=0;j<UL_info->crc_ind.crc_indication_body.number_of_crcs;j++) {
AssertFatal
(
j
<
UL_info
->
crc_ind
.
crc_indication_body
.
number_of_crcs
,
"Couldn't find matchin CRC indication
\n
"
);
}
// for (i=0;i<UL_info->rx_ind.number_of_pdus;i++) {
if
(
NFAPI_SFNSF2SFN
(
UL_info
->
rx_ind
.
sfn_sf
)
==
UL_info
->
frame
&&
NFAPI_SFNSF2SF
(
UL_info
->
rx_ind
.
sfn_sf
)
==
UL_info
->
subframe
&&
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
>
0
)
{
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
=
0
;
...
...
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