Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
openairinterface5G
Commits
9f781408
Commit
9f781408
authored
Nov 01, 2017
by
David Price
Browse files
Fails at the point core sends Identity Request to UE
parent
3a7456df
Changes
18
Hide whitespace changes
Inline
Side-by-side
nfapi/nfapi_pnf.c
View file @
9f781408
...
...
@@ -964,7 +964,7 @@ int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t*
int
pnf_phy_dl_config_req
(
nfapi_pnf_p7_config_t
*
pnf_p7
,
nfapi_dl_config_request_t
*
req
)
{
LOG_D
(
PHY
,
"[PNF]
dl config request
sfn_sf:%d pdcch:%u dci:%u pdu:%d pdsch_rnti:%d pcfich:%u
RC.ru:%p RC.eNB:%p sync_var:%d
\n
"
,
NFAPI_SFNSF2DEC
(
req
->
sfn_sf
),
req
->
dl_config_request_body
.
number_pdcch_ofdm_symbols
,
req
->
dl_config_request_body
.
number_dci
,
req
->
dl_config_request_body
.
number_pdu
,
req
->
dl_config_request_body
.
number_pdsch_rnti
,
req
->
dl_config_request_body
.
transmission_power_pcfich
,
RC
.
ru
,
RC
.
eNB
,
sync_var
);
LOG_D
(
PHY
,
"[PNF]
%s()
sfn_sf:%d pdcch:%u
dl_cfg[
dci:%u pdu
s
:%d pdsch_rnti:%d
]
pcfich:%u
\n
"
,
__FUNCTION__
,
NFAPI_SFNSF2DEC
(
req
->
sfn_sf
),
req
->
dl_config_request_body
.
number_pdcch_ofdm_symbols
,
req
->
dl_config_request_body
.
number_dci
,
req
->
dl_config_request_body
.
number_pdu
,
req
->
dl_config_request_body
.
number_pdsch_rnti
,
req
->
dl_config_request_body
.
transmission_power_pcfich
);
if
(
RC
.
ru
==
0
)
{
...
...
@@ -1038,10 +1038,11 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request
{
nfapi_dl_config_dlsch_pdu
*
dlsch_pdu
=
&
dl_config_pdu_list
[
i
].
dlsch_pdu
;
nfapi_dl_config_dlsch_pdu_rel8_t
*
rel8_pdu
=
&
dlsch_pdu
->
dlsch_pdu_rel8
;
nfapi_tx_request_pdu_t
*
tx_pdu
=
tx_request_pdu
[
sfn
][
sf
][
rel8_pdu
->
pdu_index
];
if
(
tx_
request_pdu
[
sfn
][
sf
][
rel8_pdu
->
pdu_index
]
!=
NULL
)
if
(
tx_
pdu
!=
NULL
)
{
uint8_t
*
dlsch_sdu
=
malloc
(
tx_
request_pdu
[
sfn
][
sf
][
rel8_pdu
->
pdu_index
]
->
segments
[
0
].
segment_length
);
uint8_t
*
dlsch_sdu
=
malloc
(
tx_
pdu
->
segments
[
0
].
segment_length
);
// **********************************************************************
// THIS IS CREATING AN INTENTIONAL LEAK - I think...
...
...
@@ -1053,7 +1054,7 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request
// I THINK I NEED TO FIX THIS - unless it IS getting freed by the stack
//
// **********************************************************************
memcpy
(
dlsch_sdu
,
tx_
request_pdu
[
sfn
][
sf
][
rel8_pdu
->
pdu_index
]
->
segments
[
0
].
segment_data
,
tx_request_pdu
[
sfn
][
sf
][
rel8_pdu
->
pdu_index
]
->
segments
[
0
].
segment_length
);
memcpy
(
dlsch_sdu
,
tx_
pdu
->
segments
[
0
].
segment_data
,
tx_pdu
->
segments
[
0
].
segment_length
);
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() DLSCH:pdu_index:%d handle_nfapi_dlsch_pdu(eNB, proc_rxtx, dlsch_pdu, transport_blocks:%d sdu:%p) eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols:%d\n", __FUNCTION__, rel8_pdu->pdu_index, rel8_pdu->transport_blocks, dlsch_sdu, eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols);
...
...
@@ -1086,13 +1087,13 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req)
uint16_t
sfn
=
NFAPI_SFNSF2SFN
(
req
->
sfn_sf
);
uint16_t
sf
=
NFAPI_SFNSF2SF
(
req
->
sfn_sf
);
LOG_D
(
PHY
,
"%s() SFN/SF:%d
/
%d PDUs:%d
\n
"
,
__FUNCTION__
,
sfn
,
sf
,
req
->
tx_request_body
.
number_of_pdus
);
LOG_D
(
PHY
,
"%s() SFN/SF:%d%d PDUs:%d
\n
"
,
__FUNCTION__
,
sfn
,
sf
,
req
->
tx_request_body
.
number_of_pdus
);
if
(
req
->
tx_request_body
.
tl
.
tag
==
NFAPI_TX_REQUEST_BODY_TAG
)
{
for
(
int
i
=
0
;
i
<
req
->
tx_request_body
.
number_of_pdus
;
i
++
)
{
LOG_D
(
PHY
,
"%s() SFN/SF:%d
/
%d number_of_pdus:%d [PDU:%d] pdu_length:%d pdu_index:%d num_segments:%d
\n
"
,
LOG_D
(
PHY
,
"%s() SFN/SF:%d%d number_of_pdus:%d [PDU:%d] pdu_length:%d pdu_index:%d num_segments:%d
\n
"
,
__FUNCTION__
,
sfn
,
sf
,
req
->
tx_request_body
.
number_of_pdus
,
...
...
@@ -1149,7 +1150,7 @@ int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request
for
(
int
i
=
0
;
i
<
req
->
ul_config_request_body
.
number_of_pdus
;
i
++
)
{
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"%s() sfn/sf:%d PDU[%d] size:%d
\n
"
,
__FUNCTION__
,
NFAPI_SFNSF2DEC
(
req
->
sfn_sf
),
i
,
ul_config_pdu_list
[
i
].
pdu_size
);
LOG_D
(
PHY
,
"%s() sfn/sf:%d PDU[%d] size:%d
\n
"
,
__FUNCTION__
,
NFAPI_SFNSF2DEC
(
req
->
sfn_sf
),
i
,
ul_config_pdu_list
[
i
].
pdu_size
);
if
(
ul_config_pdu_list
[
i
].
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_PDU_TYPE
||
...
...
@@ -1161,7 +1162,7 @@ int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request
ul_config_pdu_list
[
i
].
pdu_type
==
NFAPI_UL_CONFIG_UCI_SR_HARQ_PDU_TYPE
)
{
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"%s() handle_nfapi_ul_pdu() for PDU:%d
\n
"
,
__FUNCTION__
,
i
);
LOG_D
(
PHY
,
"%s() handle_nfapi_ul_pdu() for PDU:%d
\n
"
,
__FUNCTION__
,
i
);
handle_nfapi_ul_pdu
(
eNB
,
proc
,
&
ul_config_pdu_list
[
i
],
curr_sfn
,
curr_sf
,
req
->
ul_config_request_body
.
srs_present
);
}
...
...
@@ -1871,3 +1872,16 @@ int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind)
return
retval
;
}
int
oai_nfapi_sr_indication
(
nfapi_sr_indication_t
*
ind
)
{
ind
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
int
retval
=
nfapi_pnf_p7_sr_ind
(
p7_config_g
,
ind
);
LOG_E
(
PHY
,
"%s() retval:%d
\n
"
,
__FUNCTION__
,
retval
);
//free(ind.rx_indication_body.rx_pdu_list);
return
retval
;
}
nfapi/nfapi_vnf.c
View file @
9f781408
...
...
@@ -532,7 +532,7 @@ int wake_eNB_rxtx(PHY_VARS_eNB *eNB, uint16_t sfn, uint16_t sf)
old_sf
=
sf
;
old_sfn
=
sfn
;
if
(
old_sf
==
0
&&
old_sfn
%
100
==
0
)
LOG_W
(
PHY
,
"[eNB] sfn/sf:%d
:
%d old_sfn/sf:%d
:
%d proc[
frame_rx:%d subframe_
rx:%d]
\n
"
,
sfn
,
sf
,
old_sfn
,
old_sf
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
if
(
old_sf
==
0
&&
old_sfn
%
100
==
0
)
LOG_W
(
PHY
,
"[eNB] sfn/sf:%d%d old_sfn/sf:%d%d proc[rx:
%d
%d]
\n
"
,
sfn
,
sf
,
old_sfn
,
old_sf
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
}
++
proc_rxtx
->
instance_cnt_rxtx
;
...
...
@@ -551,7 +551,7 @@ int wake_eNB_rxtx(PHY_VARS_eNB *eNB, uint16_t sfn, uint16_t sf)
proc_rxtx
->
frame_tx
=
(
proc_rxtx
->
subframe_rx
>
(
9
-
sf_ahead
))
?
(
proc_rxtx
->
frame_rx
+
1
)
&
1023
:
proc_rxtx
->
frame_rx
;
proc_rxtx
->
subframe_tx
=
(
proc_rxtx
->
subframe_rx
+
sf_ahead
)
%
10
;
LOG_
E
(
PHY
,
"sfn/sf:%d
:
%d proc[
frame_rx:%d subframe_rx:%d timestamp_rx:%ld timestamp_tx:%l
d] proc_rxtx[instance_cnt_rxtx:%d
frame_rx:%d subframe_
rx:%d]
\n
"
,
sfn
,
sf
,
proc
->
frame_rx
,
proc
->
subframe_rx
,
proc
->
timestamp_rx
,
proc
->
timestamp_tx
,
proc_rxtx
->
instance_cnt_rxtx
,
proc_rxtx
->
frame_rx
,
proc_rxtx
->
subframe_rx
);
LOG_
D
(
PHY
,
"sfn/sf:%d%d proc[
rx:%d%
d] proc_rxtx[instance_cnt_rxtx:%d rx:
%d
%d]
\n
\n
"
,
sfn
,
sf
,
proc
->
frame_rx
,
proc
->
subframe_rx
,
proc_rxtx
->
instance_cnt_rxtx
,
proc_rxtx
->
frame_rx
,
proc_rxtx
->
subframe_rx
);
// the thread can now be woken up
if
(
pthread_cond_signal
(
&
proc_rxtx
->
cond_rxtx
)
!=
0
)
{
...
...
@@ -560,7 +560,9 @@ int wake_eNB_rxtx(PHY_VARS_eNB *eNB, uint16_t sfn, uint16_t sf)
return
(
-
1
);
}
//LOG_D(PHY,"%s() About to attempt pthread_mutex_unlock\n", __FUNCTION__);
pthread_mutex_unlock
(
&
proc_rxtx
->
mutex_rxtx
);
//LOG_D(PHY,"%s() UNLOCKED pthread_mutex_unlock\n", __FUNCTION__);
return
(
0
);
}
...
...
@@ -775,10 +777,34 @@ int phy_srs_indication(struct nfapi_vnf_p7_config* config, nfapi_srs_indication_
}
int
phy_sr_indication
(
struct
nfapi_vnf_p7_config
*
config
,
nfapi_sr_indication_t
*
ind
)
{
// vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
//mac_sr_ind(p7_vnf->mac, ind);
return
1
;
struct
PHY_VARS_eNB_s
*
eNB
=
RC
.
eNB
[
0
][
0
];
LOG_D
(
MAC
,
"%s() NFAPI SFN/SF:%d srs:%d
\n
"
,
NFAPI_SFNSF2DEC
(
ind
->
sfn_sf
),
ind
->
sr_indication_body
.
number_of_srs
);
pthread_mutex_lock
(
&
eNB
->
UL_INFO_mutex
);
nfapi_sr_indication_t
*
dest_ind
=
&
eNB
->
UL_INFO
.
sr_ind
;
nfapi_rx_indication_pdu_t
*
dest_pdu_list
=
eNB
->
sr_pdu_list
;
*
dest_ind
=
*
ind
;
dest_ind
->
sr_indication_body
.
sr_pdu_list
=
dest_pdu_list
;
for
(
i
=
0
;
i
<
UL_info
->
sr_ind
.
sr_indication_body
.
number_of_srs
;
i
++
)
{
nfapi_sr_indication_pdu_t
*
dest_pdu
=
&
dest_ind
->
sr_indication_body
.
sr_pdu_list
[
i
];
nfapi_sr_indication_pdu_t
*
src_pdu
=
&
ind
->
sr_indication_body
.
sr_pdu_list
[
i
];
memcpy
(
dest_pdu
,
src_pdu
,
sizeof
(
*
src_pdu
));
}
pthread_mutex_unlock
(
&
eNB
->
UL_INFO_mutex
);
// vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
//mac_sr_ind(p7_vnf->mac, ind);
return
1
;
}
int
phy_cqi_indication
(
struct
nfapi_vnf_p7_config
*
config
,
nfapi_cqi_indication_t
*
ind
)
{
// vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
...
...
@@ -1354,15 +1380,20 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req)
dl_config_req
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
//dl_config_req->header.message_id = NFAPI_DL_CONFIG_BCH_PDU_TYPE;
//
NFAPI_TRACE(NFAPI_TRACE_INFO
, "[VNF] %s() header message_id:%02x\n", __FUNCTION__, dl_config_req->header.message_id);
//
LOG_D(PHY
, "[VNF] %s() header message_id:%02x\n", __FUNCTION__, dl_config_req->header.message_id);
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] %s() DL_CONFIG p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d pdcch:%d dci:%d pdu:%d pdsch_rnti:%d pcfich:%d
\n
"
,
__FUNCTION__
,
p7_config
,
dl_config_req
->
header
.
phy_id
,
dl_config_req
->
header
.
message_id
,
NFAPI_SFNSF2DEC
(
dl_config_req
->
sfn_sf
),
dl_config_req
->
dl_config_request_body
.
number_pdcch_ofdm_symbols
,
dl_config_req
->
dl_config_request_body
.
number_dci
,
dl_config_req
->
dl_config_request_body
.
number_pdu
,
dl_config_req
->
dl_config_request_body
.
number_pdsch_rnti
,
dl_config_req
->
dl_config_request_body
.
transmission_power_pcfich
);
LOG_D
(
PHY
,
"[VNF] %s() DL_CONFIG p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d pdcch:%d dci:%d pdu:%d pdsch_rnti:%d pcfich:%d
\n
"
,
__FUNCTION__
,
p7_config
,
dl_config_req
->
header
.
phy_id
,
dl_config_req
->
header
.
message_id
,
NFAPI_SFNSF2DEC
(
dl_config_req
->
sfn_sf
),
dl_config_req
->
dl_config_request_body
.
number_pdcch_ofdm_symbols
,
dl_config_req
->
dl_config_request_body
.
number_dci
,
dl_config_req
->
dl_config_request_body
.
number_pdu
,
dl_config_req
->
dl_config_request_body
.
number_pdsch_rnti
,
dl_config_req
->
dl_config_request_body
.
transmission_power_pcfich
);
int
retval
=
nfapi_vnf_p7_dl_config_req
(
p7_config
,
dl_config_req
);
dl_config_req
->
dl_config_request_body
.
number_pdcch_ofdm_symbols
=
1
;
dl_config_req
->
dl_config_request_body
.
number_dci
=
0
;
dl_config_req
->
dl_config_request_body
.
number_pdu
=
0
;
dl_config_req
->
dl_config_request_body
.
number_pdsch_rnti
=
0
;
if
(
retval
!=
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s() Problem sending retval:%d
\n
"
,
__FUNCTION__
,
retval
);
LOG_E
(
PHY
,
"%s() Problem sending retval:%d
\n
"
,
__FUNCTION__
,
retval
);
}
return
retval
;
}
...
...
@@ -1373,13 +1404,18 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req)
tx_req
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] %s() TX_REQ p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d number_of_pdus:%d
\n
"
,
__FUNCTION__
,
p7_config
,
tx_req
->
header
.
phy_id
,
tx_req
->
header
.
message_id
,
NFAPI_SFNSF2DEC
(
tx_req
->
sfn_sf
),
tx_req
->
tx_request_body
.
number_of_pdus
);
LOG_D
(
PHY
,
"[VNF] %s() TX_REQ p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d number_of_pdus:%d
\n
"
,
__FUNCTION__
,
p7_config
,
tx_req
->
header
.
phy_id
,
tx_req
->
header
.
message_id
,
NFAPI_SFNSF2DEC
(
tx_req
->
sfn_sf
),
tx_req
->
tx_request_body
.
number_of_pdus
);
int
retval
=
nfapi_vnf_p7_tx_req
(
p7_config
,
tx_req
);
if
(
retval
!=
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s() Problem sending retval:%d
\n
"
,
__FUNCTION__
,
retval
);
LOG_E
(
PHY
,
"%s() Problem sending retval:%d
\n
"
,
__FUNCTION__
,
retval
);
}
else
{
tx_req
->
tx_request_body
.
number_of_pdus
=
0
;
}
return
retval
;
}
...
...
@@ -1390,13 +1426,19 @@ int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req)
hi_dci0_req
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] %s() HI_DCI0_REQ p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d number_of_dci:%d number_of_hi:%d
\n
"
,
__FUNCTION__
,
p7_config
,
hi_dci0_req
->
header
.
phy_id
,
hi_dci0_req
->
header
.
message_id
,
NFAPI_SFNSF2DEC
(
hi_dci0_req
->
sfn_sf
),
hi_dci0_req
->
hi_dci0_request_body
.
number_of_dci
,
hi_dci0_req
->
hi_dci0_request_body
.
number_of_hi
);
LOG_D
(
PHY
,
"[VNF] %s() HI_DCI0_REQ p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d number_of_dci:%d number_of_hi:%d
\n
"
,
__FUNCTION__
,
p7_config
,
hi_dci0_req
->
header
.
phy_id
,
hi_dci0_req
->
header
.
message_id
,
NFAPI_SFNSF2DEC
(
hi_dci0_req
->
sfn_sf
),
hi_dci0_req
->
hi_dci0_request_body
.
number_of_dci
,
hi_dci0_req
->
hi_dci0_request_body
.
number_of_hi
);
int
retval
=
nfapi_vnf_p7_hi_dci0_req
(
p7_config
,
hi_dci0_req
);
if
(
retval
!=
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s() Problem sending retval:%d
\n
"
,
__FUNCTION__
,
retval
);
LOG_E
(
PHY
,
"%s() Problem sending retval:%d
\n
"
,
__FUNCTION__
,
retval
);
}
else
{
hi_dci0_req
->
hi_dci0_request_body
.
number_of_hi
=
0
;
hi_dci0_req
->
hi_dci0_request_body
.
number_of_dci
=
0
;
}
return
retval
;
}
...
...
@@ -1407,9 +1449,9 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req)
ul_config_req
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
//
NFAPI_TRACE(NFAPI_TRACE_INFO
, "[VNF] %s() header message_id:%02x\n", __FUNCTION__, ul_config_req->header.message_id);
//
LOG_D(PHY
, "[VNF] %s() header message_id:%02x\n", __FUNCTION__, ul_config_req->header.message_id);
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] %s() UL_CONFIG p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d PDUs:%d rach_prach_frequency_resources:%d srs_present:%d
\n
"
,
LOG_D
(
PHY
,
"[VNF] %s() UL_CONFIG p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d PDUs:%d rach_prach_frequency_resources:%d srs_present:%d
\n
"
,
__FUNCTION__
,
p7_config
,
ul_config_req
->
header
.
phy_id
,
ul_config_req
->
header
.
message_id
,
NFAPI_SFNSF2DEC
(
ul_config_req
->
sfn_sf
),
ul_config_req
->
ul_config_request_body
.
number_of_pdus
,
ul_config_req
->
ul_config_request_body
.
rach_prach_frequency_resources
,
...
...
@@ -1419,13 +1461,14 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req)
if
(
retval
!=
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s() Problem sending retval:%d
\n
"
,
__FUNCTION__
,
retval
);
LOG_E
(
PHY
,
"%s() Problem sending retval:%d
\n
"
,
__FUNCTION__
,
retval
);
}
else
{
// Reset number of PDUs so that it is not resent
ul_config_req
->
ul_config_request_body
.
number_of_pdus
=
0
;
ul_config_req
->
ul_config_request_body
.
number_of_pdus
=
0
;
ul_config_req
->
ul_config_request_body
.
rach_prach_frequency_resources
=
0
;
ul_config_req
->
ul_config_request_body
.
srs_present
=
0
;
}
return
retval
;
}
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
9f781408
...
...
@@ -832,7 +832,7 @@ int8_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type)
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
AssertFatal
(
eNB
->
dlsch
[
i
]
!=
NULL
,
"eNB->dlsch[%d] is null
\n
"
,
i
);
AssertFatal
(
eNB
->
dlsch
[
i
]
!=
NULL
,
"eNB->dlsch[%d][0] is null
\n
"
,
i
);
//
LOG_D(PHY,"searching for rnti %x : UE index %d=> harq_mask %x, rnti %x, first_free_index %d\n", rnti,i,eNB->dlsch[i][0]->harq_mask,eNB->dlsch[i][0]->rnti,first_free_index);
LOG_D
(
PHY
,
"searching for rnti %x : UE index %d=> harq_mask %x, rnti %x, first_free_index %d
\n
"
,
rnti
,
i
,
eNB
->
dlsch
[
i
][
0
]
->
harq_mask
,
eNB
->
dlsch
[
i
][
0
]
->
rnti
,
first_free_index
);
if
((
eNB
->
dlsch
[
i
][
0
]
->
harq_mask
>
0
)
&&
(
eNB
->
dlsch
[
i
][
0
]
->
rnti
==
rnti
))
return
i
;
else
if
((
eNB
->
dlsch
[
i
][
0
]
->
harq_mask
==
0
)
&&
(
first_free_index
==-
1
))
first_free_index
=
i
;
...
...
openair1/SCHED/fapi_l1.c
View file @
9f781408
...
...
@@ -96,6 +96,7 @@ void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
hi_dci0_config_pdu
->
hi_pdu
.
hi_pdu_rel8
.
resource_block_start
,
hi_dci0_config_pdu
->
hi_pdu
.
hi_pdu_rel8
.
cyclic_shift_2_for_drms
);
// DJP - TODO FIXME - transmission power ignored
phich
->
config
[
phich
->
num_hi
].
hi
=
hi_dci0_config_pdu
->
hi_pdu
.
hi_pdu_rel8
.
hi_value
;
phich
->
config
[
phich
->
num_hi
].
first_rb
=
hi_dci0_config_pdu
->
hi_pdu
.
hi_pdu_rel8
.
resource_block_start
;
phich
->
config
[
phich
->
num_hi
].
n_DMRS
=
hi_dci0_config_pdu
->
hi_pdu
.
hi_pdu_rel8
.
cyclic_shift_2_for_drms
;
...
...
@@ -111,7 +112,7 @@ void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
AssertFatal
(
rel8
->
length
==
3
,
"BCH PDU has length %d != 3
\n
"
,
rel8
->
length
);
LOG_D
(
PHY
,
"bch_pdu: %x,%x,%x
\n
"
,
sdu
[
0
],
sdu
[
1
],
sdu
[
2
]);
//
LOG_D(PHY,"bch_pdu: %x,%x,%x\n",sdu[0],sdu[1],sdu[2]);
eNB
->
pbch_pdu
[
0
]
=
sdu
[
2
];
eNB
->
pbch_pdu
[
1
]
=
sdu
[
1
];
eNB
->
pbch_pdu
[
2
]
=
sdu
[
0
];
...
...
@@ -618,10 +619,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
eNB
->
pdcch_vars
[
subframe
&
1
].
num_dci
=
number_dci
;
eNB
->
phich_vars
[
subframe
&
1
].
num_hi
=
0
;
LOG_D
(
PHY
,
"NFAPI: Sched_INFO[Frame %d, Subframe %d]: %d dl_pdu, %d tx_req, %d hi_dci0_config_req, %d UL_config num_pdcch_symbols:%d
\n
"
,
frame
,
subframe
,
number_dl_pdu
,
TX_req
->
tx_request_body
.
number_of_pdus
,
number_hi_dci0_pdu
,
number_ul_pdu
,
eNB
->
pdcch_vars
[
subframe
&
1
].
num_pdcch_symbols
);
LOG_D
(
PHY
,
"NFAPI: Sched_INFO:SFN/SF:%d%d dl_pdu:%d tx_req:%d hi_dci0:%d ul_cfg:%d num_pdcch_symbols:%d
\n
"
,
frame
,
subframe
,
number_dl_pdu
,
TX_req
->
tx_request_body
.
number_of_pdus
,
number_hi_dci0_pdu
,
number_ul_pdu
,
eNB
->
pdcch_vars
[
subframe
&
1
].
num_pdcch_symbols
);
int
do_oai
=
0
;
...
...
@@ -641,12 +640,12 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
}
for
(
i
=
0
;
i
<
number_dl_pdu
;
i
++
)
{
dl_config_pdu
=
&
DL_req
->
dl_config_request_body
.
dl_config_pdu_list
[
i
];
LOG_D
(
PHY
,
"NFAPI: dl_pdu %d : type %d
\n
"
,
i
,
dl_config_pdu
->
pdu_type
);
//
LOG_D(PHY,"NFAPI: dl_pdu %d : type %d\n",i,dl_config_pdu->pdu_type);
switch
(
dl_config_pdu
->
pdu_type
)
{
case
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE
:
handle_nfapi_dci_dl_pdu
(
eNB
,
proc
,
dl_config_pdu
);
eNB
->
pdcch_vars
[
subframe
&
1
].
num_dci
++
;
LOG_E
(
PHY
,
"Incremented num_dci:%d but already set??? dl_config:num_dci:%d
\n
"
,
eNB
->
pdcch_vars
[
subframe
&
1
].
num_dci
,
number_dci
);
//
LOG_E(PHY,"Incremented num_dci:%d but already set??? dl_config:num_dci:%d\n", eNB->pdcch_vars[subframe&1].num_dci, number_dci);
do_oai
=
1
;
break
;
case
NFAPI_DL_CONFIG_BCH_PDU_TYPE
:
...
...
@@ -667,7 +666,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
// handle_nfapi_mch_dl_pdu(eNB,dl_config_pdu);
break
;
case
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE
:
LOG_
E
(
PHY
,
"%s() NFAPI_DL_CONFIG_DLSCH_PDU_TYPE TX:%d/%d RX:%d/%d transport_blocks:%d pdu_index:%d data:%p
\n
"
,
__FUNCTION__
,
proc
->
frame_tx
,
proc
->
subframe_tx
,
proc
->
frame_rx
,
proc
->
subframe_rx
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_blocks
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
,
TX_req
->
tx_request_body
.
tx_pdu_list
[
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
].
segments
[
0
].
segment_data
);
LOG_
D
(
PHY
,
"%s() NFAPI_DL_CONFIG_DLSCH_PDU_TYPE TX:%d/%d RX:%d/%d transport_blocks:%d pdu_index:%d data:%p
\n
"
,
__FUNCTION__
,
proc
->
frame_tx
,
proc
->
subframe_tx
,
proc
->
frame_rx
,
proc
->
subframe_rx
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_blocks
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
,
TX_req
->
tx_request_body
.
tx_pdu_list
[
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
].
segments
[
0
].
segment_data
);
/*
AssertFatal(dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index<TX_req->tx_request_body.number_of_pdus,
...
...
@@ -718,15 +717,13 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
}
}
if
(
nfapi_mode
&&
do_oai
)
{
if
(
nfapi_mode
&&
do_oai
)
{
oai_nfapi_tx_req
(
Sched_INFO
->
TX_req
);
oai_nfapi_dl_config_req
(
Sched_INFO
->
DL_req
);
// DJP - .dl_config_request_body.dl_config_pdu_list[0]); // DJP - FIXME TODO - yuk - only copes with 1 pdu
}
if
(
nfapi_mode
&&
number_hi_dci0_pdu
!=
0
)
{
if
(
nfapi_mode
&&
number_hi_dci0_pdu
!=
0
)
{
oai_nfapi_hi_dci0_req
(
HI_DCI0_req
);
}
...
...
@@ -738,25 +735,22 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
switch
(
hi_dci0_req_pdu
->
pdu_type
)
{
case
NFAPI_HI_DCI0_DCI_PDU_TYPE
:
case
NFAPI_HI_DCI0_DCI_PDU_TYPE
:
handle_nfapi_hi_dci0_dci_pdu
(
eNB
,
proc
,
hi_dci0_req_pdu
);
handle_nfapi_hi_dci0_dci_pdu
(
eNB
,
proc
,
hi_dci0_req_pdu
);
eNB
->
pdcch_vars
[
subframe
&
1
].
num_dci
++
;
break
;
eNB
->
pdcch_vars
[
subframe
&
1
].
num_dci
++
;
break
;
case
NFAPI_HI_DCI0_HI_PDU_TYPE
:
handle_nfapi_hi_dci0_hi_pdu
(
eNB
,
proc
,
hi_dci0_req_pdu
)
;
case
NFAPI_HI_DCI0_HI_PDU_TYPE
:
handle_nfapi_hi_dci0_hi_pdu
(
eNB
,
proc
,
hi_dci0_req_pdu
);
break
;
break
;
}
}
if
(
nfapi_mode
)
{
for
(
int
future_subframe
=
0
;
future_subframe
<
10
;
future_subframe
++
)
{
if
(
nfapi_mode
)
{
for
(
int
future_subframe
=
0
;
future_subframe
<
10
;
future_subframe
++
)
{
nfapi_ul_config_request_t
*
ul_req_tmp
=
&
RC
.
mac
[
0
]
->
UL_req_tmp
[
CC_id
][
future_subframe
];
// DJP - indexing directly into the mac - not good - ??????
...
...
@@ -772,18 +766,29 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
}
}
for
(
i
=
0
;
i
<
number_ul_pdu
;
i
++
)
{
ul_config_pdu
=
&
UL_req
->
ul_config_request_body
.
ul_config_pdu_list
[
i
];
LOG_D
(
PHY
,
"NFAPI: ul_pdu %d : type %d
\n
"
,
i
,
ul_config_pdu
->
pdu_type
);
AssertFatal
(
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_UCI_SR_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_UCI_SR_HARQ_PDU_TYPE
,
"Optional UL_PDU type %d not supported
\n
"
,
ul_config_pdu
->
pdu_type
);
handle_nfapi_ul_pdu
(
eNB
,
proc
,
ul_config_pdu
,
UL_req
->
sfn_sf
>>
4
,
UL_req
->
sfn_sf
&
0xf
,
UL_req
->
ul_config_request_body
.
srs_present
);
if
(
nfapi_mode
)
{
if
(
number_ul_pdu
>
0
)
{
LOG_D
(
PHY
,
"UL_CONFIG to send to PNF
\n
"
);
oai_nfapi_ul_config_req
(
UL_req
);
UL_req
->
ul_config_request_body
.
number_of_pdus
=
0
;
number_ul_pdu
=
0
;
}
}
else
{
for
(
i
=
0
;
i
<
number_ul_pdu
;
i
++
)
{
ul_config_pdu
=
&
UL_req
->
ul_config_request_body
.
ul_config_pdu_list
[
i
];
LOG_D
(
PHY
,
"NFAPI: ul_pdu %d : type %d
\n
"
,
i
,
ul_config_pdu
->
pdu_type
);
AssertFatal
(
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_UCI_SR_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_UCI_SR_HARQ_PDU_TYPE
,
"Optional UL_PDU type %d not supported
\n
"
,
ul_config_pdu
->
pdu_type
);
handle_nfapi_ul_pdu
(
eNB
,
proc
,
ul_config_pdu
,
UL_req
->
sfn_sf
>>
4
,
UL_req
->
sfn_sf
&
0xf
,
UL_req
->
ul_config_request_body
.
srs_present
);
}
}
}
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
9f781408
...
...
@@ -784,7 +784,14 @@ void srs_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
void
fill_sr_indication
(
PHY_VARS_eNB
*
eNB
,
uint16_t
rnti
,
int
frame
,
int
subframe
,
uint32_t
stat
)
{
pthread_mutex_lock
(
&
eNB
->
UL_INFO_mutex
);
nfapi_sr_indication_pdu_t
*
pdu
=
&
eNB
->
UL_INFO
.
sr_ind
.
sr_pdu_list
[
eNB
->
UL_INFO
.
sr_ind
.
number_of_srs
];
nfapi_sr_indication_t
*
sr_ind
=
&
eNB
->
UL_INFO
.
sr_ind
;
nfapi_sr_indication_body_t
*
sr_ind_body
=
&
sr_ind
->
sr_indication_body
;
nfapi_sr_indication_pdu_t
*
pdu
=
&
sr_ind_body
->
sr_pdu_list
[
sr_ind_body
->
number_of_srs
];
sr_ind
.
sfn_sf
=
frame
<<
4
|
subframe
;
sr_ind
.
header
.
message_id
=
NFAPI_RX_SR_INDICATION
;
sr_ind_body
->
tl
.
tag
=
NFAPI_SR_INDICATION_BODY_TAG
;
pdu
->
instance_length
=
0
;
// don't know what to do with this
// pdu->rx_ue_information.handle = handle;
...
...
@@ -794,12 +801,14 @@ void fill_sr_indication(PHY_VARS_eNB *eNB,uint16_t rnti,int frame,int subframe,u
int
SNRtimes10
=
dB_fixed_times10
(
stat
)
-
200
;
//(10*eNB->measurements.n0_power_dB[0]);
pdu
->
ul_cqi_information
.
tl
.
tag
=
NFAPI_UL_CQI_INFORMATION_TAG
;
if
(
SNRtimes10
<
-
640
)
pdu
->
ul_cqi_information
.
ul_cqi
=
0
;
else
if
(
SNRtimes10
>
635
)
pdu
->
ul_cqi_information
.
ul_cqi
=
255
;
else
pdu
->
ul_cqi_information
.
ul_cqi
=
(
640
+
SNRtimes10
)
/
5
;
pdu
->
ul_cqi_information
.
channel
=
0
;
eNB
->
UL_INFO
.
sr_ind
.
number_of_srs
++
;
sr_ind_body
->
number_of_srs
++
;
pthread_mutex_unlock
(
&
eNB
->
UL_INFO_mutex
);
}
...
...
openair2/LAYER2/MAC/eNB_scheduler.c
View file @
9f781408
...
...
@@ -234,7 +234,8 @@ void schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
{
eNB_MAC_INST
*
eNB
=
RC
.
mac
[
module_idP
];
UE_list_t
*
UE_list
=
&
eNB
->
UE_list
;
nfapi_ul_config_request_body_t
*
ul_req
;
nfapi_ul_config_request_t
*
ul_req
;
nfapi_ul_config_request_body_t
*
ul_req_body
;
int
CC_id
;
int
UE_id
;
SchedulingRequestConfig_t
*
SRconfig
;
...
...
@@ -249,9 +250,10 @@ void schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
for
(
UE_id
=
0
;
UE_id
<
NUMBER_OF_UE_MAX
;
UE_id
++
)
{
if
(
RC
.
mac
[
module_idP
]
->
UE_list
.
active
[
UE_id
]
!=
TRUE
)
continue
;
ul_req
=
&
RC
.
mac
[
module_idP
]
->
UL_req
[
CC_id
].
ul_config_request_body
;
ul_req
=
&
RC
.
mac
[
module_idP
]
->
UL_req
[
CC_id
];
ul_req_body
=
&
ul_req
->
ul_config_request_body
;
LOG_
E
(
MAC
,
"UE active UE_id:%d ul_req->number_of_pdus:%d
\n
"
,
UE_id
,
ul_req
->
number_of_pdus
);
//
LOG_
D
(MAC, "UE active UE_id:%d ul_req
_body
->number_of_pdus:%d\n", UE_id, ul_req
_body
->number_of_pdus);
AssertFatal
(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
physicalConfigDedicated
!=
NULL
,
"physicalConfigDedicated is null for UE %d
\n
"
,
UE_id
);
...
...
@@ -284,18 +286,18 @@ void schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
skip_ue
=
0
;
is_harq
=
0
;
// check that there is no existing UL grant for ULSCH which overrides the SR
for
(
i
=
0
;
i
<
ul_req
->
number_of_pdus
;
i
++
)
{
if
(((
ul_req
->
ul_config_pdu_list
[
i
].
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_PDU_TYPE
)
||
(
ul_req
->
ul_config_pdu_list
[
i
].
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE
)
||
(
ul_req
->
ul_config_pdu_list
[
i
].
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE
)
||
(
ul_req
->
ul_config_pdu_list
[
i
].
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE
))
&&
(
ul_req
->
ul_config_pdu_list
[
i
].
ulsch_pdu
.
ulsch_pdu_rel8
.
rnti
==
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rnti
))
{
for
(
i
=
0
;
i
<
ul_req
_body
->
number_of_pdus
;
i
++
)
{
if
(((
ul_req
_body
->
ul_config_pdu_list
[
i
].
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_PDU_TYPE
)
||
(
ul_req
_body
->
ul_config_pdu_list
[
i
].
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE
)
||
(
ul_req
_body
->
ul_config_pdu_list
[
i
].
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE
)
||
(
ul_req
_body
->
ul_config_pdu_list
[
i
].
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE
))
&&
(
ul_req
_body
->
ul_config_pdu_list
[
i
].
ulsch_pdu
.
ulsch_pdu_rel8
.
rnti
==
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rnti
))
{
skip_ue
=
1
;
break
;
}
/* if there is already an HARQ pdu, convert to SR_HARQ */
else
if
((
ul_req
->
ul_config_pdu_list
[
i
].
pdu_type
==
NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE
)
&&
(
ul_req
->
ul_config_pdu_list
[
i
].
uci_harq_pdu
.
ue_information
.
ue_information_rel8
.
rnti
==
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rnti
))
{
else
if
((
ul_req
_body
->
ul_config_pdu_list
[
i
].
pdu_type
==
NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE
)
&&
(
ul_req
_body
->
ul_config_pdu_list
[
i
].
uci_harq_pdu
.
ue_information
.
ue_information_rel8
.
rnti
==
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rnti
))
{
is_harq
=
1
;
break
;
}
...
...
@@ -304,33 +306,45 @@ void schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
// drop the allocation because ULSCH with handle it with BSR
if
(
skip_ue
==
1
)
continue
;
LOG_D
(
MAC
,
"Frame %d, Subframe %d : Scheduling SR for UE %d/%x
\n
"
,
frameP
,
subframeP
,
UE_id
,
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rnti
);
LOG_D
(
MAC
,
"Frame %d, Subframe %d : Scheduling SR for UE %d/%x
is_harq:%d
\n
"
,
frameP
,
subframeP
,
UE_id
,
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rnti
,
is_harq
);
// check Rel10 or Rel8 SR
#if defined(Rel10) || defined(Rel14)
if
((
UE_list
->
UE_template
[
CC_id
][
UE_id
].
physicalConfigDedicated
->
ext2
)
&&
(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
physicalConfigDedicated
->
ext2
->
schedulingRequestConfig_v1020
)
&&
(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
physicalConfigDedicated
->
ext2
->
schedulingRequestConfig_v1020
))
{
sr
.
sr_information_rel8
.
tl
.
tag
=
0
;
sr
.
sr_information_rel10
.
tl
.
tag
=
NFAPI_UL_CONFIG_REQUEST_SR_INFORMATION_REL10_TAG
;
sr
.
sr_information_rel10
.
number_of_pucch_resources
=
1
;
sr
.
sr_information_rel10
.
pucch_index_p1
=
*
UE_list
->
UE_template
[
CC_id
][
UE_id
].
physicalConfigDedicated
->
ext2
->
schedulingRequestConfig_v1020
->
sr_PUCCH_ResourceIndexP1_r10
;
LOG_D
(
MAC
,
"REL10 PUCCH INDEX P1:%d
\n
"
,
sr
.
sr_information_rel10
.
pucch_index_p1
);
}
else
#endif
{
sr
.
sr_information_rel8
.
tl
.
tag
=
NFAPI_UL_CONFIG_REQUEST_SR_INFORMATION_REL8_TAG
;
sr
.
sr_information_rel8
.
pucch_index
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
physicalConfigDedicated
->
schedulingRequestConfig
->
choice
.
setup
.
sr_PUCCH_ResourceIndex
;
sr
.
sr_information_rel10
.
tl
.
tag
=
0
;
LOG_D
(
MAC
,
"REL8 PUCCH INDEX:%d
\n
"
,
sr
.
sr_information_rel8
.
pucch_index
);
}
/* if there is already an HARQ pdu, convert to SR_HARQ */
if
(
is_harq
)
{
nfapi_ul_config_harq_information
h
=
ul_req
->
ul_config_pdu_list
[
i
].
uci_harq_pdu
.
harq_information
;
ul_req
->
ul_config_pdu_list
[
i
].
pdu_type
=
NFAPI_UL_CONFIG_UCI_SR_HARQ_PDU_TYPE
;
ul_req
->
ul_config_pdu_list
[
i
].
uci_sr_harq_pdu
.
sr_information
=
sr
;
ul_req
->
ul_config_pdu_list
[
i
].
uci_sr_harq_pdu
.
harq_information
=
h
;
nfapi_ul_config_harq_information
h
=
ul_req
_body
->
ul_config_pdu_list
[
i
].
uci_harq_pdu
.
harq_information
;
ul_req
_body
->
ul_config_pdu_list
[
i
].
pdu_type
=
NFAPI_UL_CONFIG_UCI_SR_HARQ_PDU_TYPE
;
ul_req
_body
->
ul_config_pdu_list
[
i
].
uci_sr_harq_pdu
.
sr_information
=
sr
;
ul_req
_body
->
ul_config_pdu_list
[
i
].
uci_sr_harq_pdu
.
harq_information
=
h
;
}
else
{
ul_req
->
ul_config_pdu_list
[
ul_req
->
number_of_pdus
].
pdu_type
=
NFAPI_UL_CONFIG_UCI_SR_PDU_TYPE
;
ul_req
->
ul_config_pdu_list
[
ul_req
->
number_of_pdus
].
uci_sr_pdu
.
ue_information
.
ue_information_rel8
.
rnti
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rnti
;
ul_req
->
ul_config_pdu_list
[
ul_req
->
number_of_pdus
].
uci_sr_pdu
.
sr_information
=
sr
;
ul_req
->
number_of_pdus
++
;
ul_req_body
->
ul_config_pdu_list
[
ul_req_body
->
number_of_pdus
].
pdu_type
=
NFAPI_UL_CONFIG_UCI_SR_PDU_TYPE
;
ul_req_body
->
ul_config_pdu_list
[
ul_req_body
->
number_of_pdus
].
uci_sr_pdu
.
ue_information
.
ue_information_rel8
.
tl
.
tag
=
NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG
;
ul_req_body
->
ul_config_pdu_list
[
ul_req_body
->
number_of_pdus
].
uci_sr_pdu
.
ue_information
.
ue_information_rel8
.
rnti
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rnti
;
ul_req_body
->
ul_config_pdu_list
[
ul_req_body
->
number_of_pdus
].
uci_sr_pdu
.
ue_information
.
ue_information_rel11
.
tl
.
tag
=
0
;
ul_req_body
->
ul_config_pdu_list
[
ul_req_body
->
number_of_pdus
].
uci_sr_pdu
.
ue_information
.
ue_information_rel13
.
tl
.
tag
=
0
;
ul_req_body
->
ul_config_pdu_list
[
ul_req_body
->
number_of_pdus
].
uci_sr_pdu
.
sr_information
=
sr
;
ul_req_body
->
number_of_pdus
++
;
}
/* if (is_harq) */
ul_req_body
->
tl
.
tag
=
NFAPI_UL_CONFIG_REQUEST_BODY_TAG
;
}
// for (UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id])
}
// for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++)
}
...
...
@@ -392,6 +406,8 @@ void check_ul_failure(module_id_t module_idP,int CC_id,int UE_id,
}
extern
uint8_t
nfapi_mode
;
void
clear_nfapi_information
(
eNB_MAC_INST
*
eNB
,
int
CC_idP
,
frame_t
frameP
,
sub_frame_t
subframeP
)
{
nfapi_dl_config_request_t
*
DL_req
=
&
eNB
->
DL_req
[
0
];
...
...
@@ -399,26 +415,41 @@ void clear_nfapi_information(eNB_MAC_INST *eNB,int CC_idP,frame_t frameP,sub_fra
nfapi_hi_dci0_request_t
*
HI_DCI0_req
=
&
eNB
->
HI_DCI0_req
[
0
];
nfapi_tx_request_t
*
TX_req
=
&
eNB
->
TX_req
[
0
];
eNB
->
pdu_index
[
CC_idP
]
=
0
;
DL_req
[
CC_idP
].
dl_config_request_body
.
number_pdcch_ofdm_symbols
=
1
;
DL_req
[
CC_idP
].
dl_config_request_body
.
number_dci
=
0
;
DL_req
[
CC_idP
].
dl_config_request_body
.
number_pdu
=
0
;
DL_req
[
CC_idP
].
dl_config_request_body
.
number_pdsch_rnti
=
0
;
DL_req
[
CC_idP
].
dl_config_request_body
.
transmission_power_pcfich
=
6000
;
HI_DCI0_req
[
CC_idP
].
hi_dci0_request_body
.
sfnsf
=
subframeP
+
(
frameP
<<
4
);
HI_DCI0_req
[
CC_idP
].
hi_dci0_request_body
.
number_of_dci
=
0
;
UL_req
[
CC_idP
].
ul_config_request_body
.
number_of_pdus
=
0
;
UL_req
[
CC_idP
].
ul_config_request_body
.
rach_prach_frequency_resources
=
0
;
// ignored, handled by PHY for now
UL_req
[
CC_idP
].
ul_config_request_body
.
srs_present
=
0
;
// ignored, handled by PHY for now
TX_req
[
CC_idP
].
tx_request_body
.
number_of_pdus
=
0
;
if
(
nfapi_mode
==
0
||
nfapi_mode
==
1
)
// monolithic or PNF
{
DL_req
[
CC_idP
].
dl_config_request_body
.
number_pdcch_ofdm_symbols
=
1
;
DL_req
[
CC_idP
].
dl_config_request_body
.
number_dci
=
0
;
DL_req
[
CC_idP
].
dl_config_request_body
.
number_pdu
=
0
;
DL_req
[
CC_idP
].
dl_config_request_body
.
number_pdsch_rnti
=
0
;
DL_req
[
CC_idP
].
dl_config_request_body
.
transmission_power_pcfich
=
6000
;
HI_DCI0_req
[
CC_idP
].
hi_dci0_request_body
.
sfnsf
=
subframeP
+
(
frameP
<<
4
);
HI_DCI0_req
[
CC_idP
].
hi_dci0_request_body
.
number_of_dci
=
0
;
UL_req
[
CC_idP
].
ul_config_request_body
.
number_of_pdus
=
0
;
UL_req
[
CC_idP
].
ul_config_request_body
.
rach_prach_frequency_resources
=
0
;
// ignored, handled by PHY for now
UL_req
[
CC_idP
].
ul_config_request_body
.
srs_present
=
0
;
// ignored, handled by PHY for now