Commit cdb3e36b authored by Xenofon Foukas's avatar Xenofon Foukas
Browse files

Fixes to merge with develop

parent cb8007bb
......@@ -59,10 +59,6 @@
//#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h"
//Agent-related headers
#include "ENB_APP/enb_agent_extern.h"
#include "ENB_APP/enb_agent_mac.h"
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
#endif
......@@ -89,9 +85,6 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
int mbsfn_status[MAX_NUM_CCs];
uint32_t RBalloc[MAX_NUM_CCs];
protocol_ctxt_t ctxt;
Protocol__ProgranMessage *msg;
#ifdef EXMIMO
int ret;
#endif
......@@ -282,19 +275,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
break;
}
} else { //FDD
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
schedule_ulsch(module_idP,frameP,cooperation_flag,1,5,nCCE);
}
......@@ -306,19 +287,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
// TDD, nothing
// FDD, normal UL/DLSCH
if (mac_xface->lte_frame_parms->frame_type == FDD) { //FDD
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
schedule_ulsch(module_idP,frameP,cooperation_flag,2,6,nCCE);
}
......@@ -337,19 +306,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
// no break here!
case 5:
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
break;
......@@ -357,19 +314,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
break;
}
} else { //FDD
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
schedule_ulsch(module_idP,frameP,cooperation_flag,3,7,nCCE);
......@@ -396,19 +341,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
// no break here!
case 5:
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,1,mbsfn_status);
break;
......@@ -419,19 +352,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
if (mac_xface->lte_frame_parms->frame_type == FDD) { //FDD
// schedule_RA(module_idP,frameP, subframeP, 0, nprb, nCCE);
// schedule_ulsch(module_idP, frameP, cooperation_flag, 4, 8, nCCE);
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP, frameP, subframeP, nprb, nCCE, mbsfn_status);
schedule_ue_spec(module_idP, frameP, subframeP, nprb, nCCE, mbsfn_status);
fill_DLSCH_dci(module_idP, frameP, subframeP, RBalloc, 1, mbsfn_status);
}
......@@ -487,37 +408,13 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
case 5:
schedule_RA(module_idP,frameP,subframeP,2,nprb,nCCE);
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,1,mbsfn_status);
break;
case 3:
case 4:
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
break;
......@@ -526,19 +423,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
}
} else { //FDD
// schedule_ulsch(module_idP,frameP,cooperation_flag,6,0,nCCE);
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
}
......@@ -553,36 +438,12 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
case 3:
case 4:
schedule_RA(module_idP,frameP,subframeP,3,nprb,nCCE); // 3 = Msg3 subframeP, not
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,1,mbsfn_status);
break;
case 5:
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
break;
......@@ -591,19 +452,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
}
} else { //FDD
//schedule_ulsch(module_idP,frameP,cooperation_flag,7,1,nCCE);
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
}
......@@ -623,19 +472,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
// schedule_RA(module_idP,subframeP,nprb,nCCE);
schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,2,nCCE);
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
break;
......@@ -644,19 +481,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
}
} else { //FDD
//schedule_ulsch(module_idP,frameP,cooperation_flag,8,2,nCCE);
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
}
......@@ -670,76 +495,28 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
case 1:
schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,3,nCCE);
schedule_RA(module_idP,frameP,subframeP,7,nprb,nCCE); // 7 = Msg3 subframeP, not
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,1,mbsfn_status);
break;
case 3:
case 4:
schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,3,nCCE);
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
break;
case 6:
schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,4,nCCE);
//schedule_RA(module_idP,frameP,subframeP,nprb,nCCE);
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
break;
case 2:
case 5:
//schedule_RA(module_idP,frameP,subframeP,nprb,nCCE);
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
break;
......@@ -748,19 +525,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
}
} else { //FDD
// schedule_ulsch(module_idP,frameP,cooperation_flag,9,3,nCCE);
if (mac_agent_registered[module_idP]) {
enb_agent_mac_create_empty_dl_config(module_idP, &msg);
agent_mac_xface[module_idP]->enb_agent_schedule_ue_spec(
module_idP,
frameP,
subframeP,
nprb,
nCCE,
mbsfn_status,
msg);
enb_agent_mac_destroy_dl_config(msg);
}
//schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment