Commit 5f199877 authored by Fang-WANG's avatar Fang-WANG

srb ok

parent 96d09ce4
......@@ -4926,7 +4926,13 @@ void nr_ue_process_mac_pdu(module_id_t module_idP,
| ((uint16_t)((NR_MAC_SUBHEADER_LONG *) pdu_ptr)->L2 & 0xff);
mac_subheader_len = 3;
}
nr_mac_rrc_data_ind_ue(module_idP, CC_id, gNB_index, frameP, 0, mac->crnti, CCCH, pdu_ptr+2, pdu_len-2);
else
{
mac_sdu_len = ((NR_MAC_SUBHEADER_LONG *) pdu_ptr)->L1;
mac_subheader_len = 2;
}
nr_mac_rrc_data_ind_ue(module_idP, CC_id, gNB_index, frameP, 0, mac->crnti, CCCH, pdu_ptr+mac_subheader_len, mac_sdu_len);
break;
......@@ -5103,7 +5109,7 @@ void nr_ue_process_mac_pdu(module_id_t module_idP,
#endif
if (IS_SOFTMODEM_NOS1){
if (rx_lcid < NB_RB_MAX && rx_lcid >= DL_SCH_LCID_DTCH) {
if (rx_lcid < NB_RB_MAX && rx_lcid >= DL_SCH_LCID_DCCH) {
mac_rlc_data_ind(module_idP,
mac->crnti,
......
......@@ -1150,7 +1150,7 @@ nr_generate_Msg4(module_id_t module_id,
const int lcid = DL_SCH_LCID_CCCH;
if (sched_ctrl->num_total_bytes > 0) {
LOG_I(MAC,
"[gNB %d][USER-PLANE DEFAULT DRB] Frame %d : DTCH->DLSCH, Requesting "
"[gNB %d][MSG4] Frame %d : CCCH->DLSCH, Requesting "
"%d bytes from RLC (lcid %d total hdr len %d), TBS: %d \n \n",
module_id,
frame,
......
......@@ -219,7 +219,7 @@ void nr_process_mac_pdu(
mac_subheader_len = 2;
}
LOG_I(MAC, "[UE %d] Frame %d : ULSCH -> UL-DTCH %d (gNB %d, %d bytes)\n", module_idP, frameP, rx_lcid, module_idP, mac_sdu_len);
LOG_I(MAC, "[UE %d] Frame %d : ULSCH -> UL-DCCH %d (gNB %d, %d bytes)\n", module_idP, frameP, rx_lcid, module_idP, mac_sdu_len);
int UE_id = find_nr_UE_id(module_idP, rnti);
RC.nrmac[module_idP]->UE_info.mac_stats[UE_id].lc_bytes_rx[rx_lcid] += mac_sdu_len;
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
......
......@@ -520,7 +520,6 @@ static void deliver_sdu_drb(protocol_ctxt_t *ctxt_pP,void *_ue, nr_pdcp_entity_t
}
#else
printf("----------------%d send data to tun -----------------\n",ctxt_pP->enb_flag);
len = write(nas_sock_fd[0], buf, size);
if (len != size) {
LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
......@@ -600,7 +599,6 @@ rb_found:
enqueue_rlc_data_req(&ctxt, 0, MBMS_FLAG_NO, rb_id, sdu_id, 0, size, memblock, NULL, NULL);
}
static int ccch_or_dcch = 0;
static void deliver_sdu_srb(protocol_ctxt_t *ctxt_pP, void *_ue, nr_pdcp_entity_t *entity,
char *buf, int size)
{
......@@ -612,16 +610,19 @@ static void deliver_sdu_srb(protocol_ctxt_t *ctxt_pP, void *_ue, nr_pdcp_entity_
int srb_id;
int i;
if (ccch_or_dcch == 0)
{
nr_rrc_data_ind_ccch( ctxt_pP, 1, size, buf);
ccch_or_dcch = 1;
for (i = 0; i < 2; i++) {
if (entity == ue->srb[i]) {
srb_id = i+1;
goto rb_found;
}
else
{
nr_rrc_data_ind( ctxt_pP, 1, size, buf);
}
LOG_E(PDCP, "%s:%d:%s: fatal, no RB found for ue %d\n",
__FILE__, __LINE__, __FUNCTION__, ue->rnti);
exit(1);
rb_found:
nr_rrc_data_ind( ctxt_pP, srb_id, size, buf);
return;
}
......@@ -663,9 +664,6 @@ rb_found:
memblock = get_free_mem_block(size, __FUNCTION__);
memcpy(memblock->data, buf, size);
printf("!!!!!!! deliver_pdu_srb (srb %d) calling rlc_data_req size %d: ", srb_id, size);
//for (i = 0; i < size; i++) printf(" %2.2x", (unsigned char)memblock->data[i]);
printf("\n");
enqueue_rlc_data_req(&ctxt, 1, MBMS_FLAG_NO, srb_id, sdu_id, 0, size, memblock, NULL, NULL);
}
......
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