Commit e7403759 authored by Vijay Chadachan's avatar Vijay Chadachan Committed by Vijay C

Fix for FATALS observed in the MAC

parent 52b35ba4
...@@ -1010,6 +1010,8 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, rrc_mac_config_req_eNB_t *param) ...@@ -1010,6 +1010,8 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, rrc_mac_config_req_eNB_t *param)
} }
eNB->scheduler_mode = global_scheduler_mode; eNB->scheduler_mode = global_scheduler_mode;
//Set the number of MAC_CC to current configured CC value
*RC.nb_mac_CC= RC.nb_CC[0];
return(0); return(0);
} }
......
...@@ -91,7 +91,7 @@ void schedule_SRS(module_id_t module_idP, ...@@ -91,7 +91,7 @@ void schedule_SRS(module_id_t module_idP,
LTE_SoundingRS_UL_ConfigCommon_t *soundingRS_UL_ConfigCommon = NULL; LTE_SoundingRS_UL_ConfigCommon_t *soundingRS_UL_ConfigCommon = NULL;
struct LTE_SoundingRS_UL_ConfigDedicated *soundingRS_UL_ConfigDedicated = NULL; struct LTE_SoundingRS_UL_ConfigDedicated *soundingRS_UL_ConfigDedicated = NULL;
for (CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
soundingRS_UL_ConfigCommon = &(cc[CC_id].radioResourceConfigCommon->soundingRS_UL_ConfigCommon); soundingRS_UL_ConfigCommon = &(cc[CC_id].radioResourceConfigCommon->soundingRS_UL_ConfigCommon);
/* Check if SRS is enabled in this frame/subframe */ /* Check if SRS is enabled in this frame/subframe */
...@@ -196,7 +196,7 @@ void schedule_CSI(module_id_t module_idP, ...@@ -196,7 +196,7 @@ void schedule_CSI(module_id_t module_idP,
nfapi_ul_config_request_body_t *ul_req = NULL; nfapi_ul_config_request_body_t *ul_req = NULL;
UE_sched_ctrl_t *UE_scheduling_control = NULL; UE_sched_ctrl_t *UE_scheduling_control = NULL;
for (CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
cc = &eNB->common_channels[CC_id]; cc = &eNB->common_channels[CC_id];
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
...@@ -311,7 +311,7 @@ schedule_SR (module_id_t module_idP, ...@@ -311,7 +311,7 @@ schedule_SR (module_id_t module_idP,
nfapi_ul_config_sr_information sr; nfapi_ul_config_sr_information sr;
memset(&sr, 0, sizeof(sr)); memset(&sr, 0, sizeof(sr));
for (int CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (int CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
eNB->UL_req[CC_id].sfn_sf = (frameP << 4) + subframeP; eNB->UL_req[CC_id].sfn_sf = (frameP << 4) + subframeP;
for (int UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { for (int UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
...@@ -533,7 +533,7 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) { ...@@ -533,7 +533,7 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
int CC_id; int CC_id;
eNB_MAC_INST *mac = RC.mac[module_idP]; eNB_MAC_INST *mac = RC.mac[module_idP];
for (CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
nfapi_ul_config_request_t *ul_req_tmp = &mac->UL_req_tmp[CC_id][subframeP]; nfapi_ul_config_request_t *ul_req_tmp = &mac->UL_req_tmp[CC_id][subframeP];
nfapi_ul_config_request_t *ul_req = &mac->UL_req[CC_id]; nfapi_ul_config_request_t *ul_req = &mac->UL_req[CC_id];
nfapi_ul_config_request_pdu_t *ul_req_pdu = ul_req->ul_config_request_body.ul_config_pdu_list; nfapi_ul_config_request_pdu_t *ul_req_pdu = ul_req->ul_config_request_body.ul_config_pdu_list;
...@@ -594,7 +594,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -594,7 +594,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
eNB->frame = frameP; eNB->frame = frameP;
eNB->subframe = subframeP; eNB->subframe = subframeP;
for (CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
mbsfn_status[CC_id] = 0; mbsfn_status[CC_id] = 0;
/* Clear vrb_maps */ /* Clear vrb_maps */
memset(cc[CC_id].vrb_map, 0, 100); memset(cc[CC_id].vrb_map, 0, 100);
...@@ -620,7 +620,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -620,7 +620,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
} }
} }
for (CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
/* Refresh UE list based on UEs dropped by PHY in previous subframe */ /* Refresh UE list based on UEs dropped by PHY in previous subframe */
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (UE_info->active[CC_id][UE_id]) { if (UE_info->active[CC_id][UE_id]) {
...@@ -988,7 +988,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -988,7 +988,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
} }
int do_fembms_si=0; int do_fembms_si=0;
for (CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
if (cc[CC_id].MBMS_flag > 0) { if (cc[CC_id].MBMS_flag > 0) {
start_meas(&RC.mac[module_idP]->schedule_mch); start_meas(&RC.mac[module_idP]->schedule_mch);
int(*schedule_mch)(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_frame_t subframe) = NULL; int(*schedule_mch)(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_frame_t subframe) = NULL;
...@@ -1082,7 +1082,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -1082,7 +1082,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
} }
/* Allocate CCEs for good after scheduling is done */ /* Allocate CCEs for good after scheduling is done */
for (CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
if (cc[CC_id].tdd_Config == NULL || !(is_UL_sf(&cc[CC_id],subframeP))) { if (cc[CC_id].tdd_Config == NULL || !(is_UL_sf(&cc[CC_id],subframeP))) {
int rc = allocate_CCEs(module_idP, CC_id, frameP, subframeP, 2); int rc = allocate_CCEs(module_idP, CC_id, frameP, subframeP, 2);
if (rc < 0) if (rc < 0)
......
...@@ -1283,7 +1283,7 @@ schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) { ...@@ -1283,7 +1283,7 @@ schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
uint8_t i; uint8_t i;
start_meas(&mac->schedule_ra); start_meas(&mac->schedule_ra);
for (CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
// skip UL component carriers if TDD // skip UL component carriers if TDD
if (is_UL_sf(&cc[CC_id], subframeP) == 1) if (is_UL_sf(&cc[CC_id], subframeP) == 1)
continue; continue;
......
...@@ -95,7 +95,7 @@ schedule_SIB1_MBMS(module_id_t module_idP, ...@@ -95,7 +95,7 @@ schedule_SIB1_MBMS(module_id_t module_idP,
int k = 0, rvidx; int k = 0, rvidx;
uint16_t sfn_sf = frameP<<4|subframeP; uint16_t sfn_sf = frameP<<4|subframeP;
for (CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
cc = &eNB->common_channels[CC_id]; cc = &eNB->common_channels[CC_id];
vrb_map = (void *) &cc->vrb_map; vrb_map = (void *) &cc->vrb_map;
N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth); N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
...@@ -327,7 +327,7 @@ schedule_SIB1_BR(module_id_t module_idP, ...@@ -327,7 +327,7 @@ schedule_SIB1_BR(module_id_t module_idP,
int k = 0, rvidx; int k = 0, rvidx;
uint16_t sfn_sf = frameP<<4|subframeP; uint16_t sfn_sf = frameP<<4|subframeP;
for (CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
cc = &eNB->common_channels[CC_id]; cc = &eNB->common_channels[CC_id];
vrb_map = (void *) &cc->vrb_map; vrb_map = (void *) &cc->vrb_map;
N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth); N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
...@@ -558,7 +558,7 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP, ...@@ -558,7 +558,7 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
int rvidx; int rvidx;
int absSF = (frameP*10)+subframeP; int absSF = (frameP*10)+subframeP;
for (CC_id=0; CC_id<RC.nb_CC[module_idP]; CC_id++) { for (CC_id=0; CC_id<RC.nb_mac_CC[module_idP]; CC_id++) {
cc = &eNB->common_channels[CC_id]; cc = &eNB->common_channels[CC_id];
vrb_map = (void *)&cc->vrb_map; vrb_map = (void *)&cc->vrb_map;
N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth); N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
...@@ -753,7 +753,7 @@ schedule_SI_MBMS(module_id_t module_idP, frame_t frameP, ...@@ -753,7 +753,7 @@ schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
// Only schedule LTE System Information in subframe 0 // Only schedule LTE System Information in subframe 0
if (subframeP == 0) { if (subframeP == 0) {
for (CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
cc = &eNB->common_channels[CC_id]; cc = &eNB->common_channels[CC_id];
//printf("*cc->sib1_MBMS->si_WindowLength_r14 %d \n", *cc->sib1_MBMS->si_WindowLength_r14); //printf("*cc->sib1_MBMS->si_WindowLength_r14 %d \n", *cc->sib1_MBMS->si_WindowLength_r14);
vrb_map = (void *) &cc->vrb_map; vrb_map = (void *) &cc->vrb_map;
...@@ -950,7 +950,7 @@ schedule_fembms_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframe ...@@ -950,7 +950,7 @@ schedule_fembms_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframe
AssertFatal(subframeP == 0, "Subframe must be 0\n"); AssertFatal(subframeP == 0, "Subframe must be 0\n");
AssertFatal((frameP & 15) == 0, "Frame must be a multiple of 16\n"); AssertFatal((frameP & 15) == 0, "Frame must be a multiple of 16\n");
for (CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
dl_config_request = &eNB->DL_req[CC_id]; dl_config_request = &eNB->DL_req[CC_id];
dl_req = &dl_config_request->dl_config_request_body; dl_req = &dl_config_request->dl_config_request_body;
cc = &eNB->common_channels[CC_id]; cc = &eNB->common_channels[CC_id];
...@@ -1009,7 +1009,7 @@ schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) { ...@@ -1009,7 +1009,7 @@ schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
AssertFatal(subframeP == 0, "Subframe must be 0\n"); AssertFatal(subframeP == 0, "Subframe must be 0\n");
AssertFatal((frameP & 3) == 0, "Frame must be a multiple of 4\n"); AssertFatal((frameP & 3) == 0, "Frame must be a multiple of 4\n");
for (CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
dl_config_request = &eNB->DL_req[CC_id]; dl_config_request = &eNB->DL_req[CC_id];
dl_req = &dl_config_request->dl_config_request_body; dl_req = &dl_config_request->dl_config_request_body;
cc = &eNB->common_channels[CC_id]; cc = &eNB->common_channels[CC_id];
...@@ -1077,7 +1077,7 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) ...@@ -1077,7 +1077,7 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
// Only schedule LTE System Information in subframe 5 // Only schedule LTE System Information in subframe 5
if (subframeP == 5) { if (subframeP == 5) {
for (CC_id = 0; CC_id < RC.nb_CC[module_idP]; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
cc = &eNB->common_channels[CC_id]; cc = &eNB->common_channels[CC_id];
vrb_map = (void *) &cc->vrb_map; vrb_map = (void *) &cc->vrb_map;
N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth); N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
......
...@@ -129,7 +129,7 @@ void ss_port_man_send_cnf(struct SYSTEM_CTRL_CNF recvCnf) ...@@ -129,7 +129,7 @@ void ss_port_man_send_cnf(struct SYSTEM_CTRL_CNF recvCnf)
cnf.Common.Result.d = recvCnf.Common.Result.d; cnf.Common.Result.d = recvCnf.Common.Result.d;
cnf.Common.Result.v.Success = recvCnf.Common.Result.v.Success; cnf.Common.Result.v.Success = recvCnf.Common.Result.v.Success;
cnf.Confirm.d = recvCnf.Confirm.d; cnf.Confirm.d = recvCnf.Confirm.d;
LOG_A(ENB_SS_PORTMAN, "Attn CNF received cellId %d result %d type %d \n", LOG_A(ENB_SS_PORTMAN, "SYS_CNF received cellId %d result %d type %d \n",
cnf.Common.CellId,cnf.Common.Result.d, recvCnf.Confirm.d); cnf.Common.CellId,cnf.Common.Result.d, recvCnf.Confirm.d);
switch (recvCnf.Confirm.d) switch (recvCnf.Confirm.d)
{ {
...@@ -523,6 +523,9 @@ void *ss_port_man_process_itti_msg(void *notUsed) ...@@ -523,6 +523,9 @@ void *ss_port_man_process_itti_msg(void *notUsed)
received_msg = NULL; received_msg = NULL;
} }
/* Now handle notifications for other sockets */
ss_eNB_read_from_socket(ctx_g);
LOG_D(ENB_SS_PORTMAN, "Exit from fxn:%s\n", __FUNCTION__); LOG_D(ENB_SS_PORTMAN, "Exit from fxn:%s\n", __FUNCTION__);
return NULL; return NULL;
} }
...@@ -539,6 +542,7 @@ void *ss_port_man_process_itti_msg(void *notUsed) ...@@ -539,6 +542,7 @@ void *ss_port_man_process_itti_msg(void *notUsed)
*/ */
void *ss_eNB_port_man_eNB_task(void *arg) void *ss_eNB_port_man_eNB_task(void *arg)
{ {
ss_eNB_port_man_init();
while (1) while (1)
{ {
/* Now handle notifications for other sockets */ /* Now handle notifications for other sockets */
...@@ -551,11 +555,12 @@ void *ss_eNB_port_man_eNB_task(void *arg) ...@@ -551,11 +555,12 @@ void *ss_eNB_port_man_eNB_task(void *arg)
void *ss_eNB_port_man_acp_task(void *arg) void *ss_eNB_port_man_acp_task(void *arg)
{ {
ss_eNB_port_man_init(); // ss_eNB_port_man_init();
while (1) while (1)
{ {
/* Now handle notifications for other sockets */ /* Now handle notifications for other sockets */
ss_eNB_read_from_socket(ctx_g); // ss_eNB_read_from_socket(ctx_g);
sleep(1000);
} }
return NULL; return NULL;
......
...@@ -963,7 +963,7 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType, ...@@ -963,7 +963,7 @@ static void send_sys_cnf(enum ConfirmationResult_Type_Sel resType,
if (message_p) if (message_p)
{ {
LOG_A(ENB_SS_SYS_TASK, "Send SS_SYS_PORT_MSG_CNF\n"); LOG_A(ENB_SS_SYS_TASK, "Send SS_SYS_PORT_MSG_CNF cnf_Type %d, res_Type %d\n",cnfType,resType);
msgCnf->Common.CellId = SS_context.SSCell_list[cell_index].eutra_cellId; msgCnf->Common.CellId = SS_context.SSCell_list[cell_index].eutra_cellId;
msgCnf->Common.Result.d = resType; msgCnf->Common.Result.d = resType;
msgCnf->Common.Result.v.Success = resVal; msgCnf->Common.Result.v.Success = resVal;
...@@ -1082,7 +1082,7 @@ int sys_handle_cell_config_req(struct SYSTEM_CTRL_REQ *req) ...@@ -1082,7 +1082,7 @@ int sys_handle_cell_config_req(struct SYSTEM_CTRL_REQ *req)
} else { } else {
RC.nb_CC[0] ++; RC.nb_CC[0] ++;
//Set the number of MAC_CC to current configured CC value //Set the number of MAC_CC to current configured CC value
*RC.nb_mac_CC= RC.nb_CC[0]; //*RC.nb_mac_CC= RC.nb_CC[0];
LOG_I (ENB_SS_SYS_TASK,"[SYS] CC-MGMT nb_cc is incremented current Configured CC are %d current CC_index %d nb_mac_CC %d\n", LOG_I (ENB_SS_SYS_TASK,"[SYS] CC-MGMT nb_cc is incremented current Configured CC are %d current CC_index %d nb_mac_CC %d\n",
RC.nb_CC[0],cell_index,*RC.nb_mac_CC); RC.nb_CC[0],cell_index,*RC.nb_mac_CC);
......
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