Commit 4d685a00 authored by matzakos's avatar matzakos

Proper separation of handling DCCH SRB1 and DTCH LCIDs at MAC gNB

-Remove redundant calls to mac_rlc_data_ind for DTCH case
parent 09652d29
......@@ -179,6 +179,29 @@ void nr_process_mac_pdu(
// end of MAC PDU, can ignore the rest.
break;
case UL_SCH_LCID_SRB1:
if(((NR_MAC_SUBHEADER_SHORT *)pdu_ptr)->F){
//mac_sdu_len |= (uint16_t)(((NR_MAC_SUBHEADER_LONG *)pdu_ptr)->L2)<<8;
mac_subheader_len = 3;
mac_sdu_len = ((uint16_t)(((NR_MAC_SUBHEADER_LONG *) pdu_ptr)->L1 & 0x7f) << 8)
| ((uint16_t)((NR_MAC_SUBHEADER_LONG *) pdu_ptr)->L2 & 0xff);
} else {
mac_sdu_len = (uint16_t)((NR_MAC_SUBHEADER_SHORT *)pdu_ptr)->L;
mac_subheader_len = 2;
}
LOG_I(MAC, "[UE %d] Frame %d : ULSCH -> UL-DCCH %d (gNB %d, %d bytes), rnti: %d \n", module_idP, frameP, rx_lcid, module_idP, mac_sdu_len, rnti);
mac_rlc_data_ind(module_idP,
rnti,
module_idP,
frameP,
ENB_FLAG_YES,
MBMS_FLAG_NO,
rx_lcid,
(char *) (pdu_ptr + mac_subheader_len),
mac_sdu_len,
1,
NULL);
break;
case UL_SCH_LCID_SRB2:
// todo
break;
......@@ -192,10 +215,6 @@ void nr_process_mac_pdu(
// todo
mac_subheader_len = 2;
break;
// MAC SDUs
case UL_SCH_LCID_SRB1:
//break;
case UL_SCH_LCID_DTCH:
// check if LCID is valid at current time.
if(((NR_MAC_SUBHEADER_SHORT *)pdu_ptr)->F){
......@@ -216,33 +235,6 @@ void nr_process_mac_pdu(
log_dump(MAC, pdu_ptr + mac_subheader_len, 32, LOG_DUMP_CHAR, "\n");
#endif
if(IS_SOFTMODEM_NOS1){
mac_rlc_data_ind(module_idP,
0x1234,
module_idP,
frameP,
ENB_FLAG_YES,
MBMS_FLAG_NO,
rx_lcid,
(char *) (pdu_ptr + mac_subheader_len),
mac_sdu_len,
1,
NULL);
}
else{
mac_rlc_data_ind(module_idP,
0x1234,
module_idP,
frameP,
ENB_FLAG_YES,
MBMS_FLAG_NO,
rx_lcid,
(char *) (pdu_ptr + mac_subheader_len),
mac_sdu_len,
1,
NULL);
}
mac_rlc_data_ind(module_idP,
rnti,
module_idP,
......@@ -254,7 +246,6 @@ void nr_process_mac_pdu(
mac_sdu_len,
1,
NULL);
break;
default:
......
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