Commit e095b532 authored by frtabu's avatar frtabu

Fix basic-simulator (pdcp.c)

parent f5afb90b
......@@ -440,7 +440,6 @@ pdcp_data_ind(
hashtable_rc_t h_rc;
uint8_t rb_offset= (srb_flagP == 0) ? DTCH -1 :0;
uint16_t pdcp_uid=0;
uint8_t oo_flag=0;
MessageDef *message_p = NULL;
uint8_t *gtpu_buffer_p = NULL;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_IN);
......@@ -574,8 +573,8 @@ pdcp_data_ind(
else
LOG_D(PDCP, "Passing piggybacked SDU to RRC ...\n");*/
} else {
oo_flag=1;
LOG_W(PDCP,
Pdcp_stats_rx_outoforder[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++;
LOG_E(PDCP,
PROTOCOL_PDCP_CTXT_FMT"Incoming PDU has an unexpected sequence number (%d), RX window synchronisation have probably been lost!\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
sequence_number);
......@@ -779,9 +778,13 @@ pdcp_data_ind(
#else
((pdcp_data_ind_header_t *) new_sdu_p->data)->inst = ctxt_pP->module_id;
#endif
} else {
((pdcp_data_ind_header_t *) new_sdu_p->data)->inst = 1;
}
} else { // nfapi_mode
if (UE_NAS_USE_TUN) {
((pdcp_data_ind_header_t *) new_sdu_p->data)->inst = ctxt_pP->module_id;
} else {
((pdcp_data_ind_header_t *) new_sdu_p->data)->inst = 1;
}
} // nfapi_mode
}
} else {
((pdcp_data_ind_header_t *) new_sdu_p->data)->rb_id = rb_id + (ctxt_pP->module_id * LTE_maxDRB);
......@@ -823,14 +826,6 @@ pdcp_data_ind(
Pdcp_stats_rx_bytes[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=(sdu_buffer_sizeP - payload_offset);
Pdcp_stats_rx_bytes_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=(sdu_buffer_sizeP - payload_offset);
Pdcp_stats_rx_sn[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]=sequence_number;
if (oo_flag == 1 ) {
Pdcp_stats_rx_outoforder[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++;
} else {
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" PDCP_DATA_IND SDU DROPPED, OUT OF ORDER \n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p));
}
Pdcp_stats_rx_aiat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+= (pdcp_enb[ctxt_pP->module_id].sfn - Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]);
Pdcp_stats_rx_aiat_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=(pdcp_enb[ctxt_pP->module_id].sfn - Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]);
Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]=pdcp_enb[ctxt_pP->module_id].sfn;
......
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