Commit 6f11dc77 authored by Raymond Knopp's avatar Raymond Knopp

removed assertion in MAC layer and adjusted generation of MSG4 to handle when...

removed assertion in MAC layer and adjusted generation of MSG4 to handle when CCCH message is not present. UL CCCH is now received in CU, but asserts. Need to add code in DU to handle scheduling of DL-CCCH in later subframe. In current state, DL-CCCH will only come out if it is ready for MSG$ transmission.
parent fc6afc81
...@@ -55,6 +55,7 @@ void du_f1ap_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint ...@@ -55,6 +55,7 @@ void du_f1ap_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint
sctp_data_req->buffer_length = buffer_length; sctp_data_req->buffer_length = buffer_length;
sctp_data_req->stream = stream; sctp_data_req->stream = stream;
printf("Sending ITTI message to SCTP Task\n");
itti_send_msg_to_task(TASK_SCTP, instance, message_p); itti_send_msg_to_task(TASK_SCTP, instance, message_p);
} }
......
...@@ -1009,13 +1009,14 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, ...@@ -1009,13 +1009,14 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
#endif #endif
{ {
// This is normal LTE case // This is normal LTE case
LOG_D(MAC, "generate_Msg4 1 ra->Msg4_frame SFN/SF: %d.%d, frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP); LOG_I(MAC, "generate_Msg4 ra->Msg4_frame SFN/SF: %d.%d, frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP);
if ((ra->Msg4_frame == frameP) && (ra->Msg4_subframe == subframeP)) { if ((ra->Msg4_frame == frameP) && (ra->Msg4_subframe == subframeP)) {
// Get RRCConnectionSetup for Piggyback // Get RRCConnectionSetup for Piggyback
/*rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block /*rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], ENB_FLAG_YES, module_idP, 0); // not used in this case*/ &cc[CC_idP].CCCH_pdu.payload[0], ENB_FLAG_YES, module_idP, 0); // not used in this case*/
// check if there's data on the CCCH to send with Msg4
rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case &cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case
...@@ -1023,14 +1024,17 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, ...@@ -1023,14 +1024,17 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n", "[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n",
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length); module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);
AssertFatal(rrc_sdu_length > 0, // AssertFatal(rrc_sdu_length > 0,
"[MAC][eNB Scheduler] CCCH not allocated, rrc_sdu_length: %d\n", rrc_sdu_length); // "[MAC][eNB Scheduler] CCCH not allocated, rrc_sdu_length: %d\n", rrc_sdu_length);
LOG_D(MAC, if (rrc_sdu_length > 0) LOG_I(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RNTI %x)\n", "[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RNTI %x)\n",
module_idP, CC_idP, frameP, subframeP, ra->rnti); module_idP, CC_idP, frameP, subframeP, ra->rnti);
else LOG_I(MAC,
"eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 without RRC Piggyback (RNTI %x)\n",
module_idP, CC_idP, frameP, subframeP, ra->rnti);
/// Choose first 4 RBs for Msg4, should really check that these are free! /// Choose first 4 RBs for Msg4, should really check that these are free!
first_rb = 0; first_rb = 0;
...@@ -1128,7 +1132,9 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, ...@@ -1128,7 +1132,9 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
msg4_padding, msg4_post_padding); msg4_padding, msg4_post_padding);
DevAssert(UE_id != UE_INDEX_INVALID); // FIXME not sure how to gracefully return DevAssert(UE_id != UE_INDEX_INVALID); // FIXME not sure how to gracefully return
// CHECK THIS: &cc[CC_idP].CCCH_pdu.payload[0] // CHECK THIS: &cc[CC_idP].CCCH_pdu.payload[0]
offset = generate_dlsch_header((unsigned char *) mac->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char) UE_id].payload[0], 1, //num_sdus int num_sdus = rrc_sdu_length > 0 ? 1 : 0;
offset = generate_dlsch_header((unsigned char *) mac->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char) UE_id].payload[0],
num_sdus, //num_sdus
(unsigned short *) &rrc_sdu_length, // (unsigned short *) &rrc_sdu_length, //
&lcid, // sdu_lcid &lcid, // sdu_lcid
255, // no drx 255, // no drx
......
...@@ -838,6 +838,7 @@ void *sctp_eNB_task(void *arg) ...@@ -838,6 +838,7 @@ void *sctp_eNB_task(void *arg)
break; break;
case SCTP_DATA_REQ: { case SCTP_DATA_REQ: {
printf("SCTP: Sending message via SCTP\n");
sctp_send_data(ITTI_MESSAGE_GET_INSTANCE(received_msg), sctp_send_data(ITTI_MESSAGE_GET_INSTANCE(received_msg),
ITTI_MSG_ORIGIN_ID(received_msg), ITTI_MSG_ORIGIN_ID(received_msg),
&received_msg->ittiMsg.sctp_data_req); &received_msg->ittiMsg.sctp_data_req);
......
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