Commit 0cf85158 authored by Louis Adrien Dufrene's avatar Louis Adrien Dufrene

Merge branch 'DRX_develop' into...

Merge branch 'DRX_develop' into 374-missing-rrc-inactivity-timer-missing-default-drx-ie-in-s1-setup-ue-s1-id-unknown-after-detach-for-switch-off
parents 2f115419 9a080ade
......@@ -141,7 +141,7 @@ x_image *x_create_image(x_connection *_x, unsigned char *data,
ret = calloc(1, sizeof(struct x_image)); if (ret == NULL) OOM;
template.class = TrueColor;
template.depth = 24;
template.depth = 32;
template.red_mask = 0xff0000;
template.green_mask = 0x00ff00;
template.blue_mask = 0x0000ff;
......
......@@ -65,7 +65,7 @@ typedef int32_t sdu_size_t;
typedef uint32_t frame_t;
typedef int32_t sframe_t;
typedef uint32_t sub_frame_t;
typedef uint16_t module_id_t;
typedef uint16_t module_id_t;
typedef uint8_t slice_id_t;
typedef uint8_t eNB_index_t;
typedef uint16_t ue_id_t;
......
This diff is collapsed.
......@@ -466,6 +466,8 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
int header_length_last;
int header_length_total;
rrc_eNB_ue_context_t *ue_contextP = NULL;
start_meas(&eNB->schedule_dlsch);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_IN);
......@@ -1033,68 +1035,86 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
// TODO: check if the lcid is active
LOG_D(MAC, "[eNB %d], Frame %d, DTCH%d->DLSCH, Checking RLC status (tbs %d, len %d)\n",
module_idP, frameP, lcid, TBS,
TBS - ta_len - header_length_total - sdu_length_total - 3);
module_idP,
frameP,
lcid,
TBS,
TBS - ta_len - header_length_total - sdu_length_total - 3);
if (TBS - ta_len - header_length_total - sdu_length_total - 3 > 0) {
rlc_status = mac_rlc_status_ind(module_idP,
rnti,
module_idP,
frameP,
subframeP,
ENB_FLAG_YES,
MBMS_FLAG_NO,
lcid,
TBS - ta_len - header_length_total - sdu_length_total - 3
rnti,
module_idP,
frameP,
subframeP,
ENB_FLAG_YES,
MBMS_FLAG_NO,
lcid,
TBS - ta_len - header_length_total - sdu_length_total - 3
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
, 0, 0
#endif
);
);
if (rlc_status.bytes_in_buffer > 0) {
LOG_D(MAC,
"[eNB %d][USER-PLANE DEFAULT DRB] Frame %d : DTCH->DLSCH, Requesting %d bytes from RLC (lcid %d total hdr len %d)\n",
module_idP, frameP,
TBS - ta_len - header_length_total - sdu_length_total - 3,
LOG_D(MAC, "[eNB %d][USER-PLANE DEFAULT DRB] Frame %d : DTCH->DLSCH, Requesting %d bytes from RLC (lcid %d total hdr len %d)\n",
module_idP,
frameP,
TBS - ta_len - header_length_total - sdu_length_total - 3,
lcid,
header_length_total);
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, lcid,
TBS, //not used
(char *)&dlsch_buffer[sdu_length_total]
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,
rnti,
module_idP,
frameP,
ENB_FLAG_YES,
MBMS_FLAG_NO,
lcid,
TBS, //not used
(char *)&dlsch_buffer[sdu_length_total]
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
, 0, 0
#endif
);
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
T_INT(subframeP), T_INT(harq_pid),
T_INT(lcid), T_INT(sdu_lengths[num_sdus]));
LOG_D(MAC,
"[eNB %d][USER-PLANE DEFAULT DRB] Got %d bytes for DTCH %d \n",
module_idP, sdu_lengths[num_sdus], lcid);
);
T(T_ENB_MAC_UE_DL_SDU,
T_INT(module_idP),
T_INT(CC_id),
T_INT(rnti),
T_INT(frameP),
T_INT(subframeP),
T_INT(harq_pid),
T_INT(lcid),
T_INT(sdu_lengths[num_sdus]));
LOG_D(MAC, "[eNB %d][USER-PLANE DEFAULT DRB] Got %d bytes for DTCH %d \n",
module_idP,
sdu_lengths[num_sdus],
lcid);
sdu_lcids[num_sdus] = lcid;
sdu_length_total += sdu_lengths[num_sdus];
UE_list->eNB_UE_stats[CC_id][UE_id].num_pdu_tx[lcid]++;
UE_list->eNB_UE_stats[CC_id][UE_id].lcid_sdu[num_sdus] = lcid;
UE_list->eNB_UE_stats[CC_id][UE_id].sdu_length_tx[lcid] = sdu_lengths[num_sdus];
UE_list->eNB_UE_stats[CC_id][UE_id].lcid_sdu[num_sdus] = lcid;
UE_list->eNB_UE_stats[CC_id][UE_id].sdu_length_tx[lcid] = sdu_lengths[num_sdus];
UE_list->eNB_UE_stats[CC_id][UE_id].num_bytes_tx[lcid] += sdu_lengths[num_sdus];
header_length_last = 1 + 1 + (sdu_lengths[num_sdus] >= 128);
header_length_total += header_length_last;
header_length_last = 1 + 1 + (sdu_lengths[num_sdus] >= 128);
header_length_total += header_length_last;
num_sdus++;
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
}
} else {
// no TBS left
break;
// reset RRC inactivity timer after uplane activity
ue_contextP = rrc_eNB_get_ue_context(RC.rrc[module_idP], rnti);
ue_contextP->ue_context.ue_rrc_inactivity_timer = 1;
} // end if (rlc_status.bytes_in_buffer > 0)
} else { // no TBS left
break; // break for (lcid = NB_RB_MAX - 1; lcid >= DTCH; lcid--)
}
}
......
......@@ -1404,85 +1404,95 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
header_len_dtch = 0;
header_len_dtch_last = 0; // the header length of the last mac sdu
// lcid has to be sorted before the actual allocation (similar struct as ue_list).
/* TODO limited lcid for performance */
for (lcid = DTCH; lcid >= DTCH; lcid--) {
// TBD: check if the lcid is active
header_len_dtch += 3;
header_len_dtch_last = 3;
LOG_D(MAC,
"[eNB %d], Frame %d, DTCH%d->DLSCH, Checking RLC status (tbs %d, len %d)\n",
module_idP, frameP, lcid, TBS,
TBS - ta_len - header_len_dcch -
sdu_length_total - header_len_dtch);
if (TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch > 0) { // NN: > 2 ?
rlc_status = mac_rlc_status_ind(module_idP,
rnti,
module_idP,
frameP,
subframeP,
ENB_FLAG_YES,
MBMS_FLAG_NO,
lcid,
TBS - ta_len -
header_len_dcch -
sdu_length_total -
header_len_dtch
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
/* TODO limited lcid for performance */
for (lcid = DTCH; lcid >= DTCH; lcid--) {
// TBD: check if the lcid is active
header_len_dtch += 3;
header_len_dtch_last = 3;
LOG_D(MAC, "[eNB %d], Frame %d, DTCH%d->DLSCH, Checking RLC status (tbs %d, len %d)\n",
module_idP,
frameP,
lcid,
TBS,
TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch);
if (TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch > 0) { // NN: > 2 ?
rlc_status = mac_rlc_status_ind(module_idP,
rnti,
module_idP,
frameP,
subframeP,
ENB_FLAG_YES,
MBMS_FLAG_NO,
lcid,
TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch
#ifdef Rel14
, 0, 0
#endif
);
);
if (rlc_status.bytes_in_buffer > 0) {
LOG_D(MAC,
"[eNB %d][USER-PLANE DEFAULT DRB] Frame %d : DTCH->DLSCH, Requesting %d bytes from RLC (lcid %d total hdr len %d)\n",
module_idP, frameP,
TBS - header_len_dcch -
sdu_length_total - header_len_dtch, lcid,
if (rlc_status.bytes_in_buffer > 0) {
LOG_D(MAC,"[eNB %d][USER-PLANE DEFAULT DRB] Frame %d : DTCH->DLSCH, Requesting %d bytes from RLC (lcid %d total hdr len %d)\n",
module_idP,
frameP,
TBS - header_len_dcch - sdu_length_total - header_len_dtch,
lcid,
header_len_dtch);
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, lcid, TBS, //not used
(char
*)
&dlsch_buffer
[sdu_length_total]
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,
rnti,
module_idP,
frameP,
ENB_FLAG_YES,
MBMS_FLAG_NO,
lcid,
TBS, //not used
(char *)&dlsch_buffer[sdu_length_total]
#ifdef Rel14
, 0, 0
#endif
);
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
T_INT(subframeP), T_INT(harq_pid),
T_INT(lcid), T_INT(sdu_lengths[num_sdus]));
);
T(T_ENB_MAC_UE_DL_SDU,
T_INT(module_idP),
T_INT(CC_id),
T_INT(rnti),
T_INT(frameP),
T_INT(subframeP),
T_INT(harq_pid),
T_INT(lcid),
T_INT(sdu_lengths[num_sdus]));
LOG_D(MAC, "[eNB %d][USER-PLANE DEFAULT DRB] Got %d bytes for DTCH %d \n",
module_idP,
sdu_lengths[num_sdus],
lcid);
LOG_D(MAC,
"[eNB %d][USER-PLANE DEFAULT DRB] Got %d bytes for DTCH %d \n",
module_idP, sdu_lengths[num_sdus], lcid);
sdu_lcids[num_sdus] = lcid;
sdu_length_total += sdu_lengths[num_sdus];
UE_list->
eNB_UE_stats[CC_id][UE_id].num_pdu_tx[lcid]
+= 1;
UE_list->
eNB_UE_stats[CC_id][UE_id].num_bytes_tx
[lcid] += sdu_lengths[num_sdus];
if (sdu_lengths[num_sdus] < 128) {
header_len_dtch--;
header_len_dtch_last--;
UE_list->eNB_UE_stats[CC_id][UE_id].num_pdu_tx[lcid] += 1;
UE_list->eNB_UE_stats[CC_id][UE_id].num_bytes_tx[lcid] += sdu_lengths[num_sdus];
if (sdu_lengths[num_sdus] < 128) {
header_len_dtch--;
header_len_dtch_last--;
}
num_sdus++;
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
} // no data for this LCID
else {
header_len_dtch -= 3;
}
} // no TBS left
else {
header_len_dtch -= 3;
break;
}
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
} else { // no data for this LCID
header_len_dtch -= 3;
}
} else { // no TBS left
header_len_dtch -= 3;
break;
}
}
if (header_len_dtch == 0)
header_len_dtch_last = 0;
......
......@@ -111,6 +111,8 @@ rx_sdu(const module_id_t enb_mod_idP,
(RA_t *) & RC.mac[enb_mod_idP]->common_channels[CC_idP].ra[0];
int first_rb = 0;
rrc_eNB_ue_context_t *ue_contextP = NULL;
start_meas(&mac->rx_ulsch_sdu);
if ((UE_id > MAX_MOBILES_PER_ENB) || (UE_id == -1))
......@@ -672,69 +674,92 @@ rx_sdu(const module_id_t enb_mod_idP,
// }
break;
// all the DRBS
// all the DRBS
case DTCH:
default:
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
LOG_T(MAC, "offset: %d\n",
(unsigned char) ((unsigned char *) payload_ptr - sduP));
(unsigned char) ((unsigned char *) payload_ptr - sduP));
for (j = 0; j < 32; j++) {
LOG_T(MAC, "%x ", payload_ptr[j]);
LOG_T(MAC, "%x ", payload_ptr[j]);
}
LOG_T(MAC, "\n");
#endif
if (rx_lcids[i] < NB_RB_MAX) {
LOG_D(MAC,
"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DTCH, received %d bytes from UE %d for lcid %d\n",
enb_mod_idP, CC_idP, frameP, rx_lengths[i], UE_id,
rx_lcids[i]);
if (UE_id != -1) {
// adjust buffer occupancy of the correponding logical channel group
LOG_D(MAC,
"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DTCH, received %d bytes from UE %d for lcid %d, removing from LCGID %ld, %d\n",
enb_mod_idP, CC_idP, frameP, rx_lengths[i],
UE_id, rx_lcids[i],
UE_list->UE_template[CC_idP][UE_id].
lcgidmap[rx_lcids[i]],
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_info[UE_list->UE_template[CC_idP]
[UE_id].lcgidmap[rx_lcids[i]]]);
if (rx_lcids[i] < NB_RB_MAX) {
LOG_D(MAC, "[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DTCH, received %d bytes from UE %d for lcid %d\n",
enb_mod_idP,
CC_idP,
frameP,
rx_lengths[i],
UE_id,
rx_lcids[i]);
if (UE_id != -1) {
// adjust buffer occupancy of the correponding logical channel group
LOG_D(MAC, "[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DTCH, received %d bytes from UE %d for lcid %d, removing from LCGID %ld, %d\n",
enb_mod_idP,
CC_idP,
frameP,
rx_lengths[i],
UE_id,
rx_lcids[i],
UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]],
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]]);
if (lcgid_updated[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] == 0) {
if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] >= rx_lengths[i])
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] -= rx_lengths[i];
else
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] = 0;
if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] >= rx_lengths[i]) {
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] -= rx_lengths[i];
} else {
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] = 0;
}
UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer =
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[0] +
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[1] +
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[2] +
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[3];
//UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer += UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer / 4;
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[0] +
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[1] +
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[2] +
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[3];
}
if ((rx_lengths[i] < SCH_PAYLOAD_SIZE_MAX) && (rx_lengths[i] > 0)) { // MAX SIZE OF transport block
mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL); //(unsigned int*)crc_status);
UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]] += 1;
UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
//clear uplane_inactivity_timer
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
} else { /* rx_length[i] */
UE_list->eNB_UE_stats[CC_idP][UE_id].num_errors_rx += 1;
LOG_E(MAC,
"[eNB %d] CC_id %d Frame %d : Max size of transport block reached LCID %d from UE %d ",
enb_mod_idP, CC_idP, frameP, rx_lcids[i],
UE_id);
}
} else { /*(UE_id != -1 */
LOG_E(MAC,
"[eNB %d] CC_id %d Frame %d : received unsupported or unknown LCID %d from UE %d ",
enb_mod_idP, CC_idP, frameP, rx_lcids[i], UE_id);
}
if ((rx_lengths[i] < SCH_PAYLOAD_SIZE_MAX) && (rx_lengths[i] > 0)) { // MAX SIZE OF transport block
mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL);
UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]] += 1;
UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
//clear uplane_inactivity_timer
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
// reset RRC inactivity timer after uplane activity
ue_contextP = rrc_eNB_get_ue_context(RC.rrc[enb_mod_idP], rntiP);
ue_contextP->ue_context.ue_rrc_inactivity_timer = 1;
} else { /* rx_length[i] */
UE_list->eNB_UE_stats[CC_idP][UE_id].num_errors_rx += 1;
LOG_E(MAC, "[eNB %d] CC_id %d Frame %d : Max size of transport block reached LCID %d from UE %d ",
enb_mod_idP,
CC_idP,
frameP,
rx_lcids[i],
UE_id);
}
} else { // end if (UE_id != -1)
LOG_E(MAC,"[eNB %d] CC_id %d Frame %d : received unsupported or unknown LCID %d from UE %d ",
enb_mod_idP,
CC_idP,
frameP,
rx_lcids[i],
UE_id);
}
}
break;
......
......@@ -279,6 +279,9 @@ mac_rrc_data_ind(
}
//------------------------------------------------------------------------------
/*
* Get RRC status (Connected, Idle...) of UE from RNTI
*/
int
mac_eNB_get_rrc_status(
const module_id_t Mod_idP,
......@@ -287,9 +290,7 @@ mac_eNB_get_rrc_status(
//------------------------------------------------------------------------------
{
struct rrc_eNB_ue_context_s* ue_context_p = NULL;
ue_context_p = rrc_eNB_get_ue_context(
RC.rrc[Mod_idP],
rntiP);
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP], rntiP);
if (ue_context_p != NULL) {
return(ue_context_p->ue_context.Status);
......
......@@ -184,43 +184,43 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
asn_enc_rval_t enc_rval;
LTE_BCCH_BCH_Message_t *mib=&carrier->mib ;
uint8_t sfn = (uint8_t)((frame>>2)&0xff);
uint16_t *spare= calloc(1, sizeof(uint16_t));
uint16_t *spare = calloc(1, sizeof(uint16_t));
if (spare == NULL) abort();
switch (N_RB_DL) {
case 6:
mib->message.dl_Bandwidth = LTE_MasterInformationBlock__dl_Bandwidth_n6;
break;
case 6:
mib->message.dl_Bandwidth = LTE_MasterInformationBlock__dl_Bandwidth_n6;
break;
case 15:
mib->message.dl_Bandwidth = LTE_MasterInformationBlock__dl_Bandwidth_n15;
break;
case 15:
mib->message.dl_Bandwidth = LTE_MasterInformationBlock__dl_Bandwidth_n15;
break;
case 25:
mib->message.dl_Bandwidth = LTE_MasterInformationBlock__dl_Bandwidth_n25;
break;
case 25:
mib->message.dl_Bandwidth = LTE_MasterInformationBlock__dl_Bandwidth_n25;
break;
case 50:
mib->message.dl_Bandwidth = LTE_MasterInformationBlock__dl_Bandwidth_n50;
break;
case 50:
mib->message.dl_Bandwidth = LTE_MasterInformationBlock__dl_Bandwidth_n50;
break;
case 75:
mib->message.dl_Bandwidth = LTE_MasterInformationBlock__dl_Bandwidth_n75;
break;
case 75:
mib->message.dl_Bandwidth = LTE_MasterInformationBlock__dl_Bandwidth_n75;
break;
case 100:
mib->message.dl_Bandwidth = LTE_MasterInformationBlock__dl_Bandwidth_n100;
break;
default:
AssertFatal(1==0,"Unknown dl_Bandwidth %d\n",N_RB_DL);
case 100:
mib->message.dl_Bandwidth = LTE_MasterInformationBlock__dl_Bandwidth_n100;
break;
default:
AssertFatal(1==0,"Unknown dl_Bandwidth %d\n",N_RB_DL);
}
AssertFatal(phich_Resource <= LTE_PHICH_Config__phich_Resource_two,"Illegal phich_Resource\n");
mib->message.phich_Config.phich_Resource = phich_Resource;
AssertFatal(phich_duration <= LTE_PHICH_Config__phich_Duration_extended,"Illegal phich_Duration\n");
mib->message.phich_Config.phich_Duration = phich_duration;
LOG_I(RRC,"[MIB] systemBandwidth %x, phich_duration %x, phich_resource %x,sfn %x\n",
LOG_I(RRC,"[MIB] systemBandwidth %x, phich_duration %x, phich_resource %x, sfn %x\n",
(uint32_t)mib->message.dl_Bandwidth,
(uint32_t)phich_duration,
(uint32_t)phich_Resource,
......@@ -704,6 +704,9 @@ uint8_t do_SIB23(uint8_t Mod_id,
= configuration->pcch_defaultPagingCycle[CC_id];
(*sib2)->radioResourceConfigCommon.pcch_Config.nB
= configuration->pcch_nB[CC_id];
LOG_I(RRC,"[SIB2] With ITTI. Basic config of paging cycle DRX: radio frame cycle length %x, paging occasion number %x\n",
(uint32_t)configuration->pcch_defaultPagingCycle[CC_id],
(uint32_t)configuration->pcch_nB[CC_id]);
// PRACH-Config
(*sib2)->radioResourceConfigCommon.prach_Config.rootSequenceIndex
......
......@@ -57,7 +57,7 @@ uint16_t get_adjacent_cell_id(uint8_t Mod_id,uint8_t index);
uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId);
/**
\brief Generate configuration for SIB1 (eNB).
\brief Generate configuration for MIB (eNB).
@param carrier pointer to Carrier information
@param N_RB_DL Number of downlink PRBs
@param phich_Resource PHICH resoure parameter
......
......@@ -735,7 +735,7 @@ Paging-v1130-IEs ::= SEQUENCE {
}
Paging-v1310-IEs ::= SEQUENCE {
redistributionIndication-r13 ENUMERATED {true} OPTIONAL, --Need ON
redistributionIndication-r13 ENUMERATED {true} OPTIONAL, -- Need ON
systemInfoModification-eDRX-r13 ENUMERATED {true} OPTIONAL, -- Need ON
nonCriticalExtension SEQUENCE {} OPTIONAL
}
......
......@@ -387,10 +387,10 @@ typedef enum SL_TRIGGER_e {
#define RRC_TRANSACTION_IDENTIFIER_NUMBER 3
typedef struct {
unsigned short transport_block_size; /*!< \brief Minimum PDU size in bytes provided by RLC to MAC layer interface */
unsigned short max_transport_blocks; /*!< \brief Maximum PDU size in bytes provided by RLC to MAC layer interface */
unsigned long Guaranteed_bit_rate; /*!< \brief Guaranteed Bit Rate (average) to be offered by MAC layer scheduling*/
unsigned long Max_bit_rate; /*!< \brief Maximum Bit Rate that can be offered by MAC layer scheduling*/
unsigned short transport_block_size; /*!< \brief Minimum PDU size in bytes provided by RLC to MAC layer interface */
unsigned short max_transport_blocks; /*!< \brief Maximum PDU size in bytes provided by RLC to MAC layer interface */
unsigned long Guaranteed_bit_rate; /*!< \brief Guaranteed Bit Rate (average) to be offered by MAC layer scheduling*/
unsigned long Max_bit_rate; /*!< \brief Maximum Bit Rate that can be offered by MAC layer scheduling*/
uint8_t Delay_class; /*!< \brief Delay class offered by MAC layer scheduling*/
uint8_t Target_bler; /*!< \brief Target Average Transport Block Error rate*/
uint8_t Lchan_t; /*!< \brief Logical Channel Type (BCCH,CCCH,DCCH,DTCH_B,DTCH,MRBCH)*/
......@@ -552,7 +552,7 @@ typedef struct eNB_RRC_UE_s {
LTE_CipheringAlgorithm_r12_t ciphering_algorithm;
e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
uint8_t Status;
uint8_t Status; // RRC status, type enum UE_STATE_t
rnti_t rnti;
uint64_t random_ue_identity;
......@@ -573,7 +573,7 @@ typedef struct eNB_RRC_UE_s {
security_capabilities_t security_capabilities;
/* Total number of e_rab already setup in the list */
uint8_t setup_e_rabs;
uint8_t setup_e_rabs;
/* Number of e_rab to be setup in the list */
uint8_t nb_of_e_rabs;
/* Number of e_rab to be modified in the list */
......@@ -599,6 +599,9 @@ typedef struct eNB_RRC_UE_s {
uint32_t ue_release_timer_thres_rrc;
uint32_t ue_reestablishment_timer;
uint32_t ue_reestablishment_timer_thres;
/* RRC inactivity timer: on timeout, should release RRC connection for inactivity on all E-RABs */
uint32_t ue_rrc_inactivity_timer;
uint32_t ue_rrc_inactivity_timer_thres;
uint8_t e_rab_release_command_flag;
int8_t reestablishment_xid;
} eNB_RRC_UE_t;
......
This diff is collapsed.
This diff is collapsed.
......@@ -444,16 +444,22 @@ void *s1ap_eNB_task(void *arg)
return NULL;
}
//-----------------------------------------------------------------------------
/*
* eNB generate a S1 setup request towards MME
*/
static int s1ap_eNB_generate_s1_setup_request(
s1ap_eNB_instance_t *instance_p, s1ap_eNB_mme_data_t *s1ap_mme_data_p)
s1ap_eNB_instance_t *instance_p,
s1ap_eNB_mme_data_t *s1ap_mme_data_p)
//-----------------------------------------------------------------------------
{
S1AP_S1AP_PDU_t pdu;
S1AP_S1SetupRequest_t *out;
S1AP_S1SetupRequestIEs_t *ie;
S1AP_SupportedTAs_Item_t *ta;
S1AP_PLMNidentity_t *plmn;
uint8_t *buffer;
uint32_t len;
S1AP_S1AP_PDU_t pdu;
S1AP_S1SetupRequest_t *out = NULL;
S1AP_S1SetupRequestIEs_t *ie = NULL;
S1AP_SupportedTAs_Item_t *ta = NULL;
S1AP_PLMNidentity_t *plmn = NULL;
uint8_t *buffer = NULL;
uint32_t len = 0;
int ret = 0;
DevAssert(instance_p != NULL);
......
......@@ -863,11 +863,7 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
"existing UE context 0x%06lx\n",
assoc_id,
enb_ue_s1ap_id);
/*MessageDef *msg_complete_p;
msg_complete_p = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CONTEXT_RELEASE_COMPLETE);
S1AP_UE_CONTEXT_RELEASE_COMPLETE(msg_complete_p).eNB_ue_s1ap_id = enb_ue_s1ap_id;
itti_send_msg_to_task(TASK_S1AP, ue_desc_p->eNB_instance->instance <=> 0, msg_complete_p);
*/
return -1;
} else {
MSC_LOG_TX_MESSAGE(
......@@ -877,6 +873,11 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
"0 S1AP_UE_CONTEXT_RELEASE_COMMAND/%d eNB_ue_s1ap_id "S1AP_UE_ID_FMT" ",
enb_ue_s1ap_id);
message_p = itti_alloc_new_message(TASK_S1AP, S1AP_UE_CONTEXT_RELEASE_COMMAND);
if (ue_desc_p->mme_ue_s1ap_id == 0) { // case of Detach Request and switch off from RRC_IDLE mode
ue_desc_p->mme_ue_s1ap_id = mme_ue_s1ap_id;
}
S1AP_UE_CONTEXT_RELEASE_COMMAND(message_p).eNB_ue_s1ap_id = enb_ue_s1ap_id;
itti_send_msg_to_task(TASK_RRC_ENB, ue_desc_p->eNB_instance->instance, message_p);
return 0;
......
......@@ -573,9 +573,6 @@ int s1ap_eNB_handle_nas_downlink(uint32_t assoc_id,
ie->value.choice.NAS_PDU.buf,
ie->value.choice.NAS_PDU.size);
// LG: Why set to 0 ??
//ue_desc_p->ue_initial_id = 0;
return 0;
}
......
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