Commit 4861a362 authored by Vaibhav Shrivastava's avatar Vaibhav Shrivastava

DRB Uplink Path Code Changes

parent 8c6a71a7
......@@ -169,6 +169,8 @@ typedef struct ss_drb_pdu_ind_s {
uint8_t drb_id;
uint32_t sdu_size;
uint8_t sdu[SDU_SIZE];
frame_t frame; /*!< \brief LTE frame number.*/
sub_frame_t subframe; /*!< \brief LTE sub frame number.*/
} ss_drb_pdu_ind_t;
typedef enum carrierBandwidthEUTRA_dl_Bandwidth_e {
......
......@@ -1049,7 +1049,30 @@ pdcp_data_ind(
* from its second byte (skipping 0th and 1st octets, i.e.
* PDCP header)
*/
if (RC.ss.mode >= SS_SOFTMODEM) {
if ((TRUE == ctxt_pP->enb_flag) && (FALSE == srb_flagP)) {
LOG_A(PDCP, "Sending packet to SS, Calling SS_DRB_PDU_IND ue %x drb id %ld len %u\n",
ctxt_pP->rnti,
rb_id,
sdu_buffer_sizeP - payload_offset );
MessageDef *message_p = itti_alloc_new_message (TASK_SS_DRB, 0, SS_DRB_PDU_IND);
if (message_p) {
/* Populate the message to SS */
SS_DRB_PDU_IND (message_p).sdu_size = sdu_buffer_sizeP - payload_offset;
SS_DRB_PDU_IND (message_p).drb_id = rb_id;
memset(SS_DRB_PDU_IND (message_p).sdu, 0, SS_DRB_PDU_IND (message_p).sdu_size);
memcpy(&SS_DRB_PDU_IND (message_p).sdu, &sdu_buffer_pP->data[payload_offset], SS_DRB_PDU_IND (message_p).sdu_size);
SS_DRB_PDU_IND (message_p).frame = ctxt_pP->frame;
SS_DRB_PDU_IND (message_p).subframe = ctxt_pP->subframe;
int send_res = itti_send_msg_to_task (TASK_SS_DRB, INSTANCE_DEFAULT, message_p);
if(send_res < 0) {
LOG_E(RRC,"Error in itti_send_msg_to_task");
}
}
}
} else {
if (LINK_ENB_PDCP_TO_GTPV1U) {
if ((TRUE == ctxt_pP->enb_flag) && (FALSE == srb_flagP)) {
LOG_D(PDCP, "Sending packet to GTP, Calling GTPV1U_ENB_TUNNEL_DATA_REQ ue %x rab %ld len %u\n",
......@@ -1074,6 +1097,7 @@ pdcp_data_ind(
} else {
packet_forwarded = FALSE;
}
}
#ifdef MBMS_MULTICAST_OUT
......
......@@ -90,13 +90,13 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind){
//Populated the Timing Info
ind.Common.TimingInfo.d = TimingInfo_Type_SubFrame;
ind.Common.TimingInfo.v.SubFrame.SFN.d = SystemFrameNumberInfo_Type_Number;
ind.Common.TimingInfo.v.SubFrame.SFN.v.Number = 0; //Need to check what value needs to be sent
ind.Common.TimingInfo.v.SubFrame.SFN.v.Number = pdu_ind->frame;
ind.Common.TimingInfo.v.SubFrame.Subframe.d = SubFrameInfo_Type_Number;
ind.Common.TimingInfo.v.SubFrame.Subframe.v.Number = 0; //Need to check what value needs to be sent
ind.Common.TimingInfo.v.SubFrame.Subframe.v.Number = pdu_ind->subframe;
ind.Common.TimingInfo.v.SubFrame.HSFN.d = SystemFrameNumberInfo_Type_Number;
ind.Common.TimingInfo.v.SubFrame.HSFN.v.Number = 0; //Need to check what value needs to be sent
ind.Common.TimingInfo.v.SubFrame.HSFN.v.Number = 0;
ind.Common.TimingInfo.v.SubFrame.Slot.d = SlotTimingInfo_Type_Any;
ind.Common.TimingInfo.v.SubFrame.Slot.v.Any = true;
......@@ -114,8 +114,10 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind){
ind.U_Plane.SubframeData.PduSduList.v.PdcpSdu.d = 1;
LOG_A(ENB_APP, "[SS_DRB][DRB_COMMON_IND] PDCP SDU Count: %d\n", ind.U_Plane.SubframeData.PduSduList.v.PdcpSdu.d);
for(int i = 0; i < ind.U_Plane.SubframeData.PduSduList.v.PdcpSdu.d; i++){
ind.U_Plane.SubframeData.PduSduList.v.PdcpSdu.v[i].d = pdu_ind->sdu_size;
ind.U_Plane.SubframeData.PduSduList.v.PdcpSdu.v = CALLOC(1,(ind.U_Plane.SubframeData.PduSduList.v.PdcpSdu.d)*(sizeof(PDCP_SDU_Type)));
DevAssert(ind.U_Plane.SubframeData.PduSduList.v.PdcpSdu.v != NULL);
ind.U_Plane.SubframeData.PduSduList.v.PdcpSdu.v[i].d = pdu_ind->sdu_size;
ind.U_Plane.SubframeData.PduSduList.v.PdcpSdu.v[i].v = CALLOC(1,ind.U_Plane.SubframeData.PduSduList.v.PdcpSdu.v[i].d);
memcpy(ind.U_Plane.SubframeData.PduSduList.v.PdcpSdu.v[i].v, pdu_ind->sdu, pdu_ind->sdu_size);
}
......
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