NFAPI UL indications added and full UE connection tested.
This commit is contained in:
@@ -10,6 +10,63 @@
|
||||
IF_Module_t *if_inst[MAX_IF_MODULES];
|
||||
Sched_Rsp_t Sched_INFO[MAX_IF_MODULES][MAX_NUM_CCs];
|
||||
|
||||
void handle_rach(UL_IND_t *UL_info) {
|
||||
|
||||
if (UL_info->rach_ind.number_of_preambles>0) {
|
||||
|
||||
AssertFatal(UL_info->rach_ind.number_of_preambles==1,"More than 1 preamble not supported\n");
|
||||
UL_info->rach_ind.number_of_preambles=0;
|
||||
LOG_I(MAC,"Frame %d, Subframe %d Calling initiate_ra_proc\n",UL_info->frame,UL_info->subframe);
|
||||
initiate_ra_proc(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
UL_info->frame,
|
||||
UL_info->subframe,
|
||||
UL_info->rach_ind.preamble_list[0].preamble_rel8.preamble,
|
||||
UL_info->rach_ind.preamble_list[0].preamble_rel8.timing_advance,
|
||||
UL_info->rach_ind.preamble_list[0].preamble_rel8.rnti);
|
||||
}
|
||||
}
|
||||
|
||||
void handle_ulsch(UL_IND_t *UL_info) {
|
||||
|
||||
int i;
|
||||
|
||||
for (i=0;i<UL_info->rx_ind.number_of_pdus;i++) {
|
||||
|
||||
LOG_I(MAC,"Frame %d, Subframe %d Calling rx_sdu \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_pdu_list[i].rx_ue_information.rnti,
|
||||
UL_info->rx_ind.rx_pdu_list[i].data,
|
||||
UL_info->rx_ind.rx_pdu_list[i].rx_indication_rel8.length,
|
||||
UL_info->rx_ind.rx_pdu_list[i].rx_indication_rel8.timing_advance,
|
||||
UL_info->rx_ind.rx_pdu_list[i].rx_indication_rel8.ul_cqi);
|
||||
|
||||
}
|
||||
UL_info->rx_ind.number_of_pdus=0;
|
||||
|
||||
for (i=0;i<UL_info->crc_ind.number_of_crcs;i++) {
|
||||
|
||||
if (UL_info->crc_ind.crc_pdu_list[i].crc_indication_rel8.crc_flag == 1) { // CRC error indication
|
||||
LOG_I(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->crc_ind.crc_pdu_list[i].rx_ue_information.rnti,
|
||||
(uint8_t *)NULL,
|
||||
0,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
UL_info->crc_ind.number_of_crcs=0;
|
||||
}
|
||||
|
||||
void UL_indication(UL_IND_t *UL_info)
|
||||
{
|
||||
|
||||
@@ -38,13 +95,13 @@ void UL_indication(UL_IND_t *UL_info)
|
||||
|
||||
|
||||
|
||||
// Call uplink indication function
|
||||
AssertFatal(ifi->UL_indication!=NULL,"UL_indication is null (mod %d, cc %d)\n",
|
||||
module_id,
|
||||
CC_id);
|
||||
handle_rach(UL_info);
|
||||
|
||||
// clear HI prior to hanling ULSCH
|
||||
mac->HI_DCI0_req[CC_id].hi_dci0_request_body.number_of_hi = 0;
|
||||
|
||||
handle_ulsch(UL_info);
|
||||
|
||||
// ifi->UL_indication(UL_info);
|
||||
|
||||
if (ifi->CC_mask == ((1<<MAX_NUM_CCs)-1)) {
|
||||
|
||||
eNB_dlsch_ulsch_scheduler(module_id,
|
||||
@@ -67,8 +124,8 @@ void UL_indication(UL_IND_t *UL_info)
|
||||
module_id,
|
||||
CC_id);
|
||||
ifi->schedule_response(sched_info);
|
||||
LOG_I(PHY,"Schedule_response: frame %d, subframe %d (dl_pdus %d / %p)\n",sched_info->frame,sched_info->subframe,sched_info->DL_req->number_pdu,
|
||||
&sched_info->DL_req->number_pdu);
|
||||
LOG_I(PHY,"Schedule_response: frame %d, subframe %d (dl_pdus %d / %p)\n",sched_info->frame,sched_info->subframe,sched_info->DL_req->dl_config_request_body.number_pdu,
|
||||
&sched_info->DL_req->dl_config_request_body.number_pdu);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user