diff --git a/openair2/LAYER2/MAC/defs.h b/openair2/LAYER2/MAC/defs.h index 2c8b613b1d2125da385099465fff3211423c4628..075c6113452278d798c7f9ff0c6a6ce810c4dea3 100644 --- a/openair2/LAYER2/MAC/defs.h +++ b/openair2/LAYER2/MAC/defs.h @@ -752,6 +752,13 @@ typedef struct { #ifdef LOCALIZATION eNB_UE_estimated_distances distance; #endif + +#ifdef Rel14 + uint8_t rach_resource_type; + + +#endif + } UE_TEMPLATE; /*! \brief scheduling control information set through an API (not used)*/ diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index 1b835de69c5ec60a0a92da24fad36b4510f323e6..969895f18c5aee3d024353b3a390d12c0fdd5f76 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -710,7 +710,11 @@ void dump_ue_list(UE_list_t *listP, int ul_flag) } } -int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP,int harq_pidP) +int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP,int harq_pidP + #ifdef Rel14 + ,uint8_t rach_resource_type + #endif + ) { int UE_id; int i, j; @@ -732,6 +736,11 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP,int harq_pidP) UE_list->ordered_ULCCids[0][UE_id] = cc_idP; UE_list->num_UEs++; UE_list->active[UE_id] = TRUE; + +#ifdef Rel14 + UE_list->UE_template[cc_idP][UE_id].rach_resource_type = rach_resource_type ; +#endif + memset((void*)&UE_list->UE_sched_ctrl[UE_id],0,sizeof(UE_sched_ctrl)); memset((void*)&UE_list->eNB_UE_stats[cc_idP][UE_id],0,sizeof(eNB_UE_STATS)); diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 2851c91db63f463b857f0e1592b2a03cc5354d34..6621a7276666bc64e9b00da2d1f780ebb6f2590a 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -370,7 +370,11 @@ void rx_sdu(const module_id_t enb_mod_idP, LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d CCCH: Received Msg3: length %d, offset %ld\n", enb_mod_idP,CC_idP,frameP,rx_lengths[i],payload_ptr-sduP); - if ((UE_id=add_new_ue(enb_mod_idP,CC_idP,RA_template->rnti,harq_pid)) == -1 ) { + if ((UE_id=add_new_ue(enb_mod_idP,CC_idP,eNB->common_channels[CC_idP].RA_template[ii].rnti,harq_pid + #ifdef Rel14 + ,eNB->common_channels[CC_idP].RA_template[ii].rach_resource_type + #endif + )) == -1 ) { AssertFatal(1==0,"[MAC][eNB] Max user count reached\n"); // kill RA procedure } else diff --git a/openair2/LAYER2/MAC/proto.h b/openair2/LAYER2/MAC/proto.h index 66e7226d238a66f0d9ca8c3eeaf95db813aac3bc..b64a02ad288039c523378343561051d77d215443 100644 --- a/openair2/LAYER2/MAC/proto.h +++ b/openair2/LAYER2/MAC/proto.h @@ -521,7 +521,11 @@ int to_prb(int); int to_rbg(int); int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, uint8_t HO_active); int mac_init(void); -int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti,int harq_pid); +int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti,int harq_pid + #ifdef Rel14 + ,uint8_t rach_resource_type + #endif + ); int rrc_mac_remove_ue(module_id_t Mod_id, rnti_t rntiP);