Commit 586001bf authored by Anurag Asokan's avatar Anurag Asokan Committed by jperaldi

Initial Code changes to enhance SS=PROXY for Multi-Cell

parent 5cd6b770
......@@ -262,10 +262,10 @@ init_SI(
carrier->N_RB_DL = configuration->N_RB_DL[CC_id];
carrier->pbch_repetition = configuration->pbch_repetition[CC_id];
LOG_I(RRC, "configuration->schedulingInfoSIB1_BR_r13[CC_id] %d\n",(int)configuration->schedulingInfoSIB1_BR_r13[CC_id]);
LOG_A(RRC, "Configuring MIB (N_RB_DL %d,phich_Resource %d,phich_Duration %d)\n",
LOG_A(RRC, "Configuring MIB (N_RB_DL %d,phich_Resource %d,phich_Duration %d, CC_id: %d, MAX_NUM_CCs: %d)\n",
(int)configuration->N_RB_DL[CC_id],
(int)configuration->radioresourceconfig[CC_id].phich_resource,
(int)configuration->radioresourceconfig[CC_id].phich_duration);
(int)configuration->radioresourceconfig[CC_id].phich_duration,CC_id,MAX_NUM_CCs);
carrier->sizeof_MIB = do_MIB(&rrc->carrier[CC_id],
configuration->N_RB_DL[CC_id],
configuration->radioresourceconfig[CC_id].phich_resource,
......
......@@ -61,6 +61,7 @@ int get_cell_index(uint16_t cell_id, SS_Cell_Context_t SSCell_list[]){
for(int Cell_idx = 0; Cell_idx < 8; Cell_idx++){
if(SSCell_list[Cell_idx].cell_configured_flag == false){
SSCell_list[Cell_idx].cell_configured_flag = true;
SSCell_list[Cell_idx].eutra_cellId = cell_id;
return Cell_idx;
}
}
......
......@@ -50,6 +50,7 @@ typedef struct proxy_ss_header_s {
proxy_ss_msgs_e msg_id;
uint8_t cell_id;
uint16_t length; /** NOTE: Not needed */
uint8_t cell_index;
} proxy_ss_header_t,
*proxy_ss_header_p;
......
......@@ -540,12 +540,19 @@ int sys_add_reconfig_cell(struct CellConfigInfo_Type *AddOrReconfigure)
cellConfig->header.cell_id = SS_context.SSCell_list[cell_index].PhysicalCellId;
cellConfig->maxRefPower= SS_context.SSCell_list[cell_index].maxRefPower;
cellConfig->dl_earfcn = SS_context.SSCell_list[cell_index].dl_earfcn;
cellConfig->header.cell_index = cell_index;
LOG_A(ENB_SS,"=======Cell configuration received for cell_id: %d Initial attenuation: %d \
Max ref power: %d\n for DL_EARFCN: %d =================================== \n",
Max ref power: %d\n for DL_EARFCN: %d cell_index %d =================================== \n",
cellConfig->header.cell_id,
cellConfig->initialAttenuation, cellConfig->maxRefPower,
cellConfig->dl_earfcn);
cellConfig->dl_earfcn,cell_index);
//send_to_proxy();
printf("=======Cell configuration received for cell_id: %d Initial attenuation: %d \
Max ref power: %d\n for DL_EARFCN: %d cell_index %d =================================== \n",
cellConfig->header.cell_id,
cellConfig->initialAttenuation, cellConfig->maxRefPower,
cellConfig->dl_earfcn,cell_index);
sys_send_proxy((void *)cellConfig, sizeof(CellConfigReq_t));
}
return true;
......@@ -1206,6 +1213,8 @@ static void sys_cell_attn_update(uint8_t cellId, uint8_t attnVal)
attnConf->header.preamble = 0xFEEDC0DE;
attnConf->header.msg_id = SS_ATTN_LIST;
attnConf->header.cell_id = SS_context.SSCell_list[cell_index].PhysicalCellId;
attnConf->header.cell_index = cell_index;
printf("Attn send to proxy cell_index %d\n",cell_index);
attnConf->attnVal = attnVal;
IPV4_STR_ADDR_TO_INT_NWBO(local_address, peerIpAddr, " BAD IP Address");
......@@ -1626,6 +1635,8 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
cell_index = get_cell_index(req->Common.CellId, SS_context.SSCell_list);
SS_context.SSCell_list[cell_index].eutra_cellId = req->Common.CellId;
LOG_A(ENB_SS,"[SYS] cell_index: %d eutra_cellId: %d \n",cell_index,SS_context.SSCell_list[cell_index].eutra_cellId);
printf("[SYS] cell_index: %d eutra_cellId: %d \n",cell_index,SS_context.SSCell_list[cell_index].eutra_cellId);
}
int enterState = SS_context.SSCell_list[cell_index].State;
int exitState = SS_context.SSCell_list[cell_index].State;
......@@ -1935,13 +1946,14 @@ void *ss_eNB_sys_process_itti_msg(void *notUsed)
case SS_VNG_PROXY_REQ: {
LOG_A(ENB_SS, "[SYS] received %s from %s \n", ITTI_MSG_NAME(received_msg),
ITTI_MSG_ORIGIN_NAME(received_msg));
VngCmdReq_t *req = (VngCmdReq_t *)malloc(sizeof(VngCmdReq_t));
req->header.preamble = 0xFEEDC0DE;
req->header.msg_id = SS_VNG_CMD_REQ;
req->header.length = sizeof(proxy_ss_header_t);
req->header.cell_id = SS_VNG_PROXY_REQ(received_msg).cell_id;
req->header.cell_index = get_cell_index(req->header.cell_id , SS_context.SSCell_list);
printf("VNG send to proxy cell_index %d\n",req->header.cell_index);
req->bw = SS_VNG_PROXY_REQ(received_msg).bw;
req->cmd = SS_VNG_PROXY_REQ(received_msg).cmd;
req->NocLevel = SS_VNG_PROXY_REQ(received_msg).Noc_level;
......
......@@ -204,7 +204,7 @@ static inline void ss_send_vtp_resp(struct VirtualTimeInfo_Type *virtualTime)
req->header.msg_id = SS_VTP_RESP;
req->header.length = sizeof(proxy_ss_header_t);
req->header.cell_id = SS_context.SSCell_list[cellIndex].PhysicalCellId;
req->header.cell_index = cellIndex;
req->tinfo.sfn = virtualTime->TimingInfo.SFN.v.Number;
req->tinfo.sf = virtualTime->TimingInfo.Subframe.v.Number;
......
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