// In the NULL state the RLC entity does not exist and therefore it is not possible to transfer any data through it.
// Upon reception of a CRLC-CONFIG-Req from upper layer indicating establishment, the RLC entity:
// - is created; and
// - enters the DATA_TRANSFER_READY state.
break;
caseRLC_DATA_TRANSFER_READY_STATE:
// from 3GPP TS 25.322 V4.2.0
// In the DATA_TRANSFER_READY state, unacknowledged mode data can be exchanged between the entities according to subclause 11.2.
// Upon reception of a CRLC-CONFIG-Req from upper layer indicating release, the RLC entity:
// - enters the NULL state; and
// - is considered as being terminated.
// Upon reception of a CRLC-CONFIG-Req from upper layer indicating modification, the RLC entity:
// - stays in the DATA_TRANSFER_READY state;
// - modifies only the protocol parameters and timers as indicated by upper layers.
// Upon reception of a CRLC-SUSPEND-Req from upper layers, the RLC entity:
// - enters the LOCAL_SUSPEND state.
// SEND DATA TO MAC
#ifndef NO_THREAD_SAFE
pthread_mutex_lock(&rlc->mutex_input_buffer);
#endif
if(rlc->data_pdu_size>125){
rlc_um_segment_15(rlc);
}else{
rlc_um_segment_7(rlc);
}
#ifndef NO_THREAD_SAFE
pthread_mutex_unlock(&rlc->mutex_input_buffer);
#endif
break;
caseRLC_LOCAL_SUSPEND_STATE:
// from 3GPP TS 25.322 V4.2.0
// In the LOCAL_SUSPEND state, the RLC entity is suspended, i.e. it does not send UMD PDUs with SN greater than equal to certain specified value (see subclause 9.7.5).
// Upon reception of a CRLC-RESUME-Req from upper layers, the RLC entity:
// - enters the DATA_TRANSFER_READY state; and
// - resumes the data transmission.
// Upon reception of a CRLC-CONFIG-Req from upper layer indicating modification, the RLC entity:
// - stays in the LOCAL_SUSPEND state;
// - modifies only the protocol parameters and timers as indicated by upper layers.
// TO DO TAKE CARE OF SN : THE IMPLEMENTATION OF THIS FUNCTIONNALITY IS NOT CRITICAL
break;
default:
msg("[RLC_UM %p] MAC_DATA_REQ UNKNOWN PROTOCOL STATE %02X hex\n",rlc,rlc->protocol_state);
// In the NULL state the RLC entity does not exist and therefore it is not possible to transfer any data through it.
// Upon reception of a CRLC-CONFIG-Req from upper layer indicating establishment, the RLC entity:
// - is created; and
// - enters the DATA_TRANSFER_READY state.
msg("[RLC_UM_RX %p] ERROR MAC_DATA_IND IN RLC_NULL_STATE\n",argP);
free_up(&data_indP.data);
break;
caseRLC_DATA_TRANSFER_READY_STATE:
// from 3GPP TS 25.322 V4.2.0
// In the DATA_TRANSFER_READY state, unacknowledged mode data can be exchanged between the entities according to subclause 11.2.
// Upon reception of a CRLC-CONFIG-Req from upper layer indicating release, the RLC entity:
// - enters the NULL state; and
// - is considered as being terminated.
// Upon reception of a CRLC-CONFIG-Req from upper layer indicating modification, the RLC entity:
// - stays in the DATA_TRANSFER_READY state;
// - modifies only the protocol parameters and timers as indicated by upper layers.
// Upon reception of a CRLC-SUSPEND-Req from upper layers, the RLC entity:
// - enters the LOCAL_SUSPEND state.
data_indP.tb_size=(data_indP.tb_size+7)>>3;// from bits to bytes
if(data_indP.tb_size<=125){
rlc_um_receive_7(rlc,data_indP);
}else{
rlc_um_receive_15(rlc,data_indP);
}
break;
caseRLC_LOCAL_SUSPEND_STATE:
// from 3GPP TS 25.322 V4.2.0
// In the LOCAL_SUSPEND state, the RLC entity is suspended, i.e. it does not send UMD PDUs with SN greater than equal to certain specified value (see subclause 9.7.5).
// Upon reception of a CRLC-RESUME-Req from upper layers, the RLC entity:
// - enters the DATA_TRANSFER_READY state; and
// - resumes the data transmission.
// Upon reception of a CRLC-CONFIG-Req from upper layer indicating modification, the RLC entity:
// - stays in the LOCAL_SUSPEND state;
// - modifies only the protocol parameters and timers as indicated by upper layers.