Sebastian Held patches15/0045-reformatted.patch
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7347 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -557,7 +557,7 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
|
||||
GTPU_DEBUG("Received T-PDU over tunnel end-point '%x' of size %u (%u) (decapsulated %u)from "NW_IPV4_ADDR"\n",
|
||||
ntohl(msgHdr->teid), gpduLen, pMsg->msgLen, pMsg->msgBufLen, NW_IPV4_ADDR_FORMAT((peerIp)));
|
||||
#endif
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
|
||||
NULL,
|
||||
@@ -569,14 +569,14 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
|
||||
rc = nwGtpSessionSendMsgApiToUlpEntity(pTunnelEndPoint, pMsg);
|
||||
}
|
||||
} else {
|
||||
MSC_LOG_RX_DISCARDED_MESSAGE(
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
|
||||
NULL,
|
||||
0,
|
||||
" G-PDU ltid %u size %u",
|
||||
tunnelEndPointKey.teid,
|
||||
gpduLen);
|
||||
MSC_LOG_RX_DISCARDED_MESSAGE(
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
|
||||
NULL,
|
||||
0,
|
||||
" G-PDU ltid %u size %u",
|
||||
tunnelEndPointKey.teid,
|
||||
gpduLen);
|
||||
GTPU_ERROR("Received T-PDU over non-existent tunnel end-point '%x' from "NW_IPV4_ADDR"\n",
|
||||
ntohl(msgHdr->teid), NW_IPV4_ADDR_FORMAT((peerIp)));
|
||||
}
|
||||
@@ -609,12 +609,12 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
|
||||
seqNum = ntohs(*(NwU16T *) (msgBuf + (((*msgBuf) & 0x02) ? 8 : 4)));
|
||||
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
|
||||
NULL,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" ECHO-REQ seq %u size %u",
|
||||
0,0,seqNum, msgBufLen);
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
|
||||
NULL,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" ECHO-REQ seq %u size %u",
|
||||
0,0,seqNum, msgBufLen);
|
||||
/* Send Echo Response */
|
||||
|
||||
rc = nwGtpv1uMsgNew( (NwGtpv1uStackHandleT)thiz,
|
||||
@@ -651,12 +651,12 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
|
||||
seqNum);
|
||||
#endif
|
||||
MSC_LOG_TX_MESSAGE(
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
|
||||
NULL,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" ECHO-RSP seq %u",
|
||||
0,0,seqNum);
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
|
||||
NULL,
|
||||
0,
|
||||
MSC_AS_TIME_FMT" ECHO-RSP seq %u",
|
||||
0,0,seqNum);
|
||||
rc = nwGtpv1uCreateAndSendMsg(
|
||||
thiz,
|
||||
peerIp,
|
||||
@@ -687,8 +687,8 @@ nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, NwU32T stac
|
||||
memset(thiz, 0, sizeof(NwGtpv1uStackT));
|
||||
|
||||
if(thiz) {
|
||||
thiz->id = (NwPtrT)thiz;
|
||||
thiz->stackType = stackType;
|
||||
thiz->id = (NwPtrT)thiz;
|
||||
thiz->stackType = stackType;
|
||||
thiz->seq = (NwU16T) ((NwU32T)thiz) ; // FIXME interesting casts... don't know what this is good for...
|
||||
RB_INIT(&(thiz->outstandingTxSeqNumMap));
|
||||
RB_INIT(&(thiz->outstandingRxSeqNumMap));
|
||||
|
||||
@@ -73,10 +73,10 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
/* char fname[100],vname[100];*/
|
||||
|
||||
|
||||
for (i=0;i<38400*4;i+=3072) { // steps of 200 us with 100 us overlap, 0 to 5s
|
||||
// write_output("rxsig0.m","rxs0",ue->lte_ue_common_vars.rxdata[0],30720,1,1);
|
||||
for (i=0; i<38400*4; i+=3072) { // steps of 200 us with 100 us overlap, 0 to 5s
|
||||
// write_output("rxsig0.m","rxs0",ue->lte_ue_common_vars.rxdata[0],30720,1,1);
|
||||
|
||||
//for (i = 15360-3072*2; i<15360+3072+1; i+=3072) {
|
||||
//for (i = 15360-3072*2; i<15360+3072+1; i+=3072) {
|
||||
|
||||
|
||||
//compute frequency-domain representation of 6144-sample chunk
|
||||
@@ -92,17 +92,17 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
|
||||
|
||||
/*
|
||||
printf("i %d: sp %p\n",i,sp);
|
||||
if (i==12288) {
|
||||
printf("i %d: sp %p\n",i,sp);
|
||||
if (i==12288) {
|
||||
write_output("scan6144F.m","s6144F",sp,6144,1,1);
|
||||
write_output("scan6144.m","s6144",rxp,6144,1,1);
|
||||
write_output("pss0_6144.m","pss0",pss6144_0_0,256,1,1);
|
||||
}*/
|
||||
write_output("pss0_6144.m","pss0",pss6144_0_0,256,1,1);
|
||||
}*/
|
||||
|
||||
for (f = -2000; f<2000; f++) { // this is -10MHz to 10 MHz in 5 kHz steps
|
||||
|
||||
if ((f<-256)||(f>=0)) { // no split around DC
|
||||
// printf("No split, f %d (%d)\n",f,f&3);
|
||||
// printf("No split, f %d (%d)\n",f,f&3);
|
||||
|
||||
// align filters and input buffer pointer to 128-bit
|
||||
switch (f&3) {
|
||||
@@ -138,7 +138,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
re256=32;
|
||||
|
||||
for (re = 0; re<256/4; re++) { // loop over 256 points of upsampled PSS
|
||||
// printf("f %d, re %d\n",f,re);
|
||||
// printf("f %d, re %d\n",f,re);
|
||||
s = sp2[re];
|
||||
mmtmp00 = _mm_srai_epi32(_mm_madd_epi16(((__m128i*)pss6144_0)[re],s),15);
|
||||
mmtmp01 = _mm_srai_epi32(_mm_madd_epi16(((__m128i*)pss6144_1)[re],s),15);
|
||||
@@ -158,7 +158,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
re256 = (re256+1)&0x3f;
|
||||
}
|
||||
} else { // Split around DC, this is the negative frequencies
|
||||
// printf("split around DC, f %d (f/4 %d, f&3 %d)\n",f,f>>2,f&3);
|
||||
// printf("split around DC, f %d (f/4 %d, f&3 %d)\n",f,f>>2,f&3);
|
||||
|
||||
// align filters and input buffer pointer to 128-bit
|
||||
switch (f&3) {
|
||||
@@ -195,9 +195,9 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
|
||||
for (re = 0; re<(-f+3)/4; re++) { // loop over 256 points of upsampled PSS
|
||||
s = sp2[re];
|
||||
/* printf("re %d, %p\n",re,&sp2[re]);
|
||||
print_shorts("s",&s);
|
||||
print_shorts("pss",&((__m128i*)pss6144_0)[re]);*/
|
||||
/* printf("re %d, %p\n",re,&sp2[re]);
|
||||
print_shorts("s",&s);
|
||||
print_shorts("pss",&((__m128i*)pss6144_0)[re]);*/
|
||||
|
||||
mmtmp00 = _mm_srai_epi32(_mm_madd_epi16(((__m128i*)pss6144_0)[re],s),15);
|
||||
mmtmp01 = _mm_srai_epi32(_mm_madd_epi16(((__m128i*)pss6144_1)[re],s),15);
|
||||
@@ -250,9 +250,9 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
|
||||
for (re = 0; re<(256+f)/4; re++) { // loop over 256 points of upsampled PSS
|
||||
s = sp2[re];
|
||||
/* printf("re %d %p\n",re,&sp2[re]);
|
||||
print_shorts("s",&s);
|
||||
print_shorts("pss",&((__m128i*)pss6144_0)[re]);*/
|
||||
/* printf("re %d %p\n",re,&sp2[re]);
|
||||
print_shorts("s",&s);
|
||||
print_shorts("pss",&((__m128i*)pss6144_0)[re]);*/
|
||||
mmtmp00 = _mm_srai_epi32(_mm_madd_epi16(((__m128i*)pss6144_0)[re],s),15);
|
||||
mmtmp01 = _mm_srai_epi32(_mm_madd_epi16(((__m128i*)pss6144_1)[re],s),15);
|
||||
mmtmp02 = _mm_srai_epi32(_mm_madd_epi16(((__m128i*)pss6144_2)[re],s),15);
|
||||
@@ -275,15 +275,15 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
|
||||
// ifft, accumulate energy over two half-frames
|
||||
idft256((int16_t*)autocorr0,(int16_t*)tmp_t,1);
|
||||
/*
|
||||
if (i==12288) {
|
||||
sprintf(fname,"corr256F_%d.m",abs(f));
|
||||
sprintf(vname,"c256F_%d",abs(f));
|
||||
write_output(fname,vname,autocorr0,256,1,1);
|
||||
sprintf(fname,"corr256_%d.m",abs(f));
|
||||
sprintf(vname,"c256_%d",abs(f));
|
||||
write_output(fname,vname,tmp_t,256,1,1);
|
||||
}*/
|
||||
/*
|
||||
if (i==12288) {
|
||||
sprintf(fname,"corr256F_%d.m",abs(f));
|
||||
sprintf(vname,"c256F_%d",abs(f));
|
||||
write_output(fname,vname,autocorr0,256,1,1);
|
||||
sprintf(fname,"corr256_%d.m",abs(f));
|
||||
sprintf(vname,"c256_%d",abs(f));
|
||||
write_output(fname,vname,tmp_t,256,1,1);
|
||||
}*/
|
||||
|
||||
memset((void*)autocorr0_t,0,256*4);
|
||||
memset((void*)autocorr1_t,0,256*4);
|
||||
@@ -335,7 +335,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
if (maxcorr[pssind]>minamp) {
|
||||
scan_info->amp[pssind][pos]=maxcorr[pssind];
|
||||
scan_info->freq_offset_Hz[pssind][pos]=((f+128)*5000)+DL_freq;
|
||||
printf("pss %d, amp %d (%d>%d) freq %u (%d), i %d\n",pssind,dB_fixed(maxcorr[pssind]),maxcorr[pssind],minamp,((f+128)*5000)+DL_freq,f,i);
|
||||
printf("pss %d, amp %d (%d>%d) freq %u (%d), i %d\n",pssind,dB_fixed(maxcorr[pssind]),maxcorr[pssind],minamp,((f+128)*5000)+DL_freq,f,i);
|
||||
}
|
||||
} // loop on pss index
|
||||
}
|
||||
@@ -351,8 +351,10 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
|
||||
for (band_idx=0; band_idx<10; band_idx++)
|
||||
printf("pss 0: level %d dB, freq %u\n", dB_fixed(scan_info->amp[0][band_idx]),scan_info->freq_offset_Hz[0][band_idx]);
|
||||
|
||||
for (band_idx=0; band_idx<10; band_idx++)
|
||||
printf("pss 1: level %d dB, freq %u\n", dB_fixed(scan_info->amp[1][band_idx]),scan_info->freq_offset_Hz[1][band_idx]);
|
||||
|
||||
for (band_idx=0; band_idx<10; band_idx++)
|
||||
printf("pss 2: level %d dB, freq %u\n", dB_fixed(scan_info->amp[2][band_idx]),scan_info->freq_offset_Hz[2][band_idx]);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -691,6 +691,7 @@ int32_t generate_prach( PHY_VARS_UE *phy_vars_ue, uint8_t eNB_id, uint8_t subfra
|
||||
u = prach_root_sequence_map[index];
|
||||
|
||||
uint16_t n_group_ra = 0;
|
||||
|
||||
if ( (du[u]<(N_ZC/3)) && (du[u]>=NCS) ) {
|
||||
n_shift_ra = du[u]/NCS;
|
||||
d_start = (du[u]<<1) + (n_shift_ra * NCS);
|
||||
@@ -1218,6 +1219,7 @@ void rx_prach(PHY_VARS_eNB *phy_vars_eNB,uint8_t subframe,uint16_t *preamble_ene
|
||||
u = prach_root_sequence_map[index];
|
||||
|
||||
uint16_t n_group_ra = 0;
|
||||
|
||||
if ( (du[u]<(N_ZC/3)) && (du[u]>=NCS) ) {
|
||||
n_shift_ra = du[u]/NCS;
|
||||
d_start = (du[u]<<1) + (n_shift_ra * NCS);
|
||||
@@ -1577,6 +1579,7 @@ void compute_prach_seq(PRACH_CONFIG_COMMON *prach_config_common,
|
||||
u = prach_root_sequence_map[index];
|
||||
|
||||
uint16_t n_group_ra = 0;
|
||||
|
||||
if ( (du[u]<(N_ZC/3)) && (du[u]>=NCS) ) {
|
||||
n_shift_ra = du[u]/NCS;
|
||||
d_start = (du[u]<<1) + (n_shift_ra * NCS);
|
||||
|
||||
@@ -71,9 +71,9 @@ static inline unsigned long long rdtsc_oai(void)
|
||||
static inline unsigned long long rdtsc_oai(void) __attribute__((always_inline));
|
||||
static inline unsigned long long rdtsc_oai(void)
|
||||
{
|
||||
uint32_t r = 0;
|
||||
asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r"(r) );
|
||||
return (unsigned long long)r;
|
||||
uint32_t r = 0;
|
||||
asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r"(r) );
|
||||
return (unsigned long long)r;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB)
|
||||
return(-1);
|
||||
} else {
|
||||
if (phy_vars_eNB->eNB_UE_stats[i].crnti==0) {
|
||||
MSC_LOG_EVENT(MSC_PHY_ENB, "Add ue %"PRIx16" ", rnti);
|
||||
MSC_LOG_EVENT(MSC_PHY_ENB, "Add ue %"PRIx16" ", rnti);
|
||||
LOG_I(PHY,"UE_id %d associated with rnti %x\n",i, rnti);
|
||||
phy_vars_eNB->dlsch_eNB[i][0]->rnti = rnti;
|
||||
phy_vars_eNB->ulsch_eNB[i]->rnti = rnti;
|
||||
@@ -192,6 +192,7 @@ int32_t remove_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB, uint8_t abstraction
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MSC_LOG_EVENT(MSC_PHY_ENB, "Failed remove ue %"PRIx16" (not found)", rnti);
|
||||
return(-1);
|
||||
}
|
||||
@@ -2788,8 +2789,8 @@ void process_HARQ_feedback(uint8_t UE_id,
|
||||
dlsch->rnti,dl_harq_pid[m]);
|
||||
#endif
|
||||
MSC_LOG_EVENT(MSC_PHY_ENB, "HARQ DLSCH Failed RNTI %"PRIx16" round %u",
|
||||
dlsch->rnti,
|
||||
dlsch_harq_proc->round);
|
||||
dlsch->rnti,
|
||||
dlsch_harq_proc->round);
|
||||
|
||||
dlsch_harq_proc->round = 0;
|
||||
ue_stats->dlsch_l2_errors[dl_harq_pid[m]]++;
|
||||
|
||||
@@ -349,6 +349,7 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un
|
||||
((DCI1A_20MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=9;
|
||||
TBsize = 57;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -384,13 +385,13 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un
|
||||
&eNB->common_channels[CC_id].CCCH_pdu.payload[0],
|
||||
rrc_sdu_length);
|
||||
|
||||
if (opt_enabled==1){
|
||||
trace_pdu(1, (uint8_t *)eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0],
|
||||
rrc_sdu_length, UE_id, 3, UE_RNTI(module_idP, UE_id),
|
||||
eNB->subframe,0,0);
|
||||
LOG_D(OPT,"[eNB %d][DLSCH] Frame %d trace pdu for rnti %x with size %d\n",
|
||||
module_idP, frameP, UE_RNTI(module_idP,UE_id), rrc_sdu_length);
|
||||
}
|
||||
if (opt_enabled==1) {
|
||||
trace_pdu(1, (uint8_t *)eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0],
|
||||
rrc_sdu_length, UE_id, 3, UE_RNTI(module_idP, UE_id),
|
||||
eNB->subframe,0,0);
|
||||
LOG_D(OPT,"[eNB %d][DLSCH] Frame %d trace pdu for rnti %x with size %d\n",
|
||||
module_idP, frameP, UE_RNTI(module_idP,UE_id), rrc_sdu_length);
|
||||
}
|
||||
|
||||
nprb[CC_id]= nprb[CC_id] + 3;
|
||||
nCCE[CC_id] = nCCE[CC_id] + 4;
|
||||
|
||||
@@ -123,15 +123,15 @@ schedule_next_dlue(
|
||||
//------------------------------------------------------------------------------
|
||||
unsigned char
|
||||
generate_dlsch_header(
|
||||
unsigned char* mac_header,
|
||||
unsigned char num_sdus,
|
||||
unsigned short *sdu_lengths,
|
||||
unsigned char *sdu_lcids,
|
||||
unsigned char drx_cmd,
|
||||
short timing_advance_cmd,
|
||||
unsigned char *ue_cont_res_id,
|
||||
unsigned char short_padding,
|
||||
unsigned short post_padding
|
||||
unsigned char* mac_header,
|
||||
unsigned char num_sdus,
|
||||
unsigned short *sdu_lengths,
|
||||
unsigned char *sdu_lcids,
|
||||
unsigned char drx_cmd,
|
||||
short timing_advance_cmd,
|
||||
unsigned char *ue_cont_res_id,
|
||||
unsigned char short_padding,
|
||||
unsigned short post_padding
|
||||
)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
@@ -419,12 +419,12 @@ set_ul_DAI(
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
schedule_ue_spec(
|
||||
module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP,
|
||||
unsigned int *nb_rb_used0,
|
||||
unsigned int *nCCE_used,
|
||||
int* mbsfn_flag
|
||||
module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP,
|
||||
unsigned int *nb_rb_used0,
|
||||
unsigned int *nCCE_used,
|
||||
int* mbsfn_flag
|
||||
)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
@@ -1077,12 +1077,13 @@ schedule_ue_spec(
|
||||
NULL, // contention res id
|
||||
padding,
|
||||
post_padding);
|
||||
|
||||
//#ifdef DEBUG_eNB_SCHEDULER
|
||||
if (ta_update) {
|
||||
LOG_I(MAC,
|
||||
"[eNB %d][DLSCH] Frame %d Generate header for UE_id %d on CC_id %d: sdu_length_total %d, num_sdus %d, sdu_lengths[0] %d, sdu_lcids[0] %d => payload offset %d,timing advance value : %d, padding %d,post_padding %d,(mcs %d, TBS %d, nb_rb %d),header_dcch %d, header_dtch %d\n",
|
||||
module_idP,frameP, UE_id, CC_id, sdu_length_total,num_sdus,sdu_lengths[0],sdu_lcids[0],offset,
|
||||
ta_update,padding,post_padding,mcs,TBS,nb_rb,header_len_dcch,header_len_dtch);
|
||||
"[eNB %d][DLSCH] Frame %d Generate header for UE_id %d on CC_id %d: sdu_length_total %d, num_sdus %d, sdu_lengths[0] %d, sdu_lcids[0] %d => payload offset %d,timing advance value : %d, padding %d,post_padding %d,(mcs %d, TBS %d, nb_rb %d),header_dcch %d, header_dtch %d\n",
|
||||
module_idP,frameP, UE_id, CC_id, sdu_length_total,num_sdus,sdu_lengths[0],sdu_lcids[0],offset,
|
||||
ta_update,padding,post_padding,mcs,TBS,nb_rb,header_len_dcch,header_len_dtch);
|
||||
}
|
||||
|
||||
//#endif
|
||||
@@ -1105,14 +1106,15 @@ schedule_ue_spec(
|
||||
}
|
||||
|
||||
//eNB_mac_inst[0].DLSCH_pdu[0][0].payload[0][offset+sdu_lengths[0]+j] = (char)(taus()&0xff);
|
||||
if (opt_enabled == 1){
|
||||
trace_pdu(1, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
|
||||
TBS, module_idP, 3, UE_RNTI(module_idP,UE_id),
|
||||
eNB->subframe,0,0);
|
||||
LOG_D(OPT,"[eNB %d][DLSCH] Frame %d rnti %x with size %d\n",
|
||||
module_idP, frameP, UE_RNTI(module_idP,UE_id), TBS);
|
||||
}
|
||||
aggregation = process_ue_cqi(module_idP,UE_id);
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(1, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
|
||||
TBS, module_idP, 3, UE_RNTI(module_idP,UE_id),
|
||||
eNB->subframe,0,0);
|
||||
LOG_D(OPT,"[eNB %d][DLSCH] Frame %d rnti %x with size %d\n",
|
||||
module_idP, frameP, UE_RNTI(module_idP,UE_id), TBS);
|
||||
}
|
||||
|
||||
aggregation = process_ue_cqi(module_idP,UE_id);
|
||||
nCCE[CC_id]-=(1<<aggregation); // adjust the remaining nCCE
|
||||
nCCE_used[CC_id]+=(1<<aggregation); // adjust the remaining nCCE
|
||||
UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid] = nb_rb;
|
||||
@@ -2085,7 +2087,7 @@ fill_DLSCH_dci(
|
||||
|
||||
if(rballoc_sub[i] == 1) {
|
||||
rballoc[CC_id] |= (0x0001<<i); // TO be FIXED!!!!!!
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2408,9 +2410,9 @@ update_ul_dci(
|
||||
//------------------------------------------------------------------------------
|
||||
void set_ue_dai(
|
||||
sub_frame_t subframeP,
|
||||
uint8_t tdd_config,
|
||||
int UE_id,
|
||||
uint8_t CC_id,
|
||||
uint8_t tdd_config,
|
||||
int UE_id,
|
||||
uint8_t CC_id,
|
||||
UE_list_t* UE_list
|
||||
)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -78,8 +78,7 @@ int8_t get_mbsfn_sf_alloction (module_id_t module_idP, uint8_t CC_id, uint8_t mb
|
||||
return -1;
|
||||
} else if (eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[mbsfn_sync_area] != NULL) {
|
||||
return mbsfn_sync_area;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
LOG_W(MAC,"[eNB %d] MBSFN Subframe Config pattern %d not found \n ", module_idP, mbsfn_sync_area);
|
||||
return -1;
|
||||
}
|
||||
@@ -620,14 +619,16 @@ int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_fra
|
||||
for (j=0; j<(TBS-sdu_length_total-offset); j++) {
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.payload[offset+sdu_length_total+j] = (char)(taus()&0xff);
|
||||
}
|
||||
|
||||
/* Tracing of PDU is done on UE side */
|
||||
if (opt_enabled ==1 ){
|
||||
if (opt_enabled ==1 ) {
|
||||
trace_pdu(1, (uint8_t *)eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.payload,
|
||||
TBS, module_idP, 6, 0xffff, // M_RNTI = 6 in wirehsark
|
||||
eNB_mac_inst[module_idP].subframe,0,0);
|
||||
TBS, module_idP, 6, 0xffff, // M_RNTI = 6 in wirehsark
|
||||
eNB_mac_inst[module_idP].subframe,0,0);
|
||||
LOG_D(OPT,"[eNB %d][MCH] Frame %d : MAC PDU with size %d\n",
|
||||
module_idP, frameP, TBS);
|
||||
module_idP, frameP, TBS);
|
||||
}
|
||||
|
||||
/*
|
||||
for (j=0;j<sdu_length_total;j++)
|
||||
printf("%2x.",eNB_mac_inst[module_idP].MCH_pdu.payload[j+offset]);
|
||||
|
||||
@@ -70,14 +70,14 @@
|
||||
uint8_t rb_table[33] = {1,2,3,4,5,6,8,9,10,12,15,16,18,20,24,25,27,30,32,36,40,45,48,50,54,60,72,75,80,81,90,96,100};
|
||||
|
||||
void rx_sdu(
|
||||
const module_id_t enb_mod_idP,
|
||||
const int CC_idP,
|
||||
const frame_t frameP,
|
||||
const rnti_t rntiP,
|
||||
uint8_t *sduP,
|
||||
const uint16_t sdu_lenP,
|
||||
const int harq_pidP,
|
||||
uint8_t *msg3_flagP)
|
||||
const module_id_t enb_mod_idP,
|
||||
const int CC_idP,
|
||||
const frame_t frameP,
|
||||
const rnti_t rntiP,
|
||||
uint8_t *sduP,
|
||||
const uint16_t sdu_lenP,
|
||||
const int harq_pidP,
|
||||
uint8_t *msg3_flagP)
|
||||
{
|
||||
|
||||
unsigned char rx_ces[MAX_NUM_CE],num_ce,num_sdu,i,*payload_ptr;
|
||||
@@ -274,11 +274,11 @@ void rx_sdu(
|
||||
frameP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
rx_lcids[i],
|
||||
(char *)payload_ptr,
|
||||
rx_lengths[i],
|
||||
1,
|
||||
NULL);//(unsigned int*)crc_status);
|
||||
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];
|
||||
|
||||
@@ -310,11 +310,11 @@ void rx_sdu(
|
||||
frameP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
DTCH,
|
||||
(char *)payload_ptr,
|
||||
rx_lengths[i],
|
||||
1,
|
||||
NULL);//(unsigned int*)crc_status);
|
||||
DTCH,
|
||||
(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];
|
||||
}
|
||||
@@ -1116,7 +1116,7 @@ void schedule_ulsch_cba_rnti(module_id_t module_idP, unsigned char cooperation_f
|
||||
//weight[cba_group] = floor(total_UEs/active_groups);//find_num_active_UEs_in_cbagroup(module_idP, cba_group);
|
||||
|
||||
for (UE_id=UE_list->head_ul; UE_id>=0; UE_id=UE_list->next_ul[UE_id]) {
|
||||
if (UE_RNTI(module_idP,UE_id)==NOT_A_RNTI)
|
||||
if (UE_RNTI(module_idP,UE_id)==NOT_A_RNTI)
|
||||
continue;
|
||||
|
||||
// simple UE identity based grouping
|
||||
|
||||
@@ -312,7 +312,7 @@ void sort_UEs (module_id_t Mod_idP,
|
||||
|
||||
rnti1 = UE_RNTI(Mod_idP,i);
|
||||
|
||||
if(rnti1 == NOT_A_RNTI)
|
||||
if(rnti1 == NOT_A_RNTI)
|
||||
continue;
|
||||
|
||||
UE_id1 = i;
|
||||
@@ -409,16 +409,16 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
// Initialize scheduling information for all active UEs
|
||||
|
||||
dlsch_scheduler_pre_processor_reset(
|
||||
UE_id,
|
||||
CC_id,
|
||||
N_RBG[CC_id],
|
||||
dl_pow_off,
|
||||
nb_rbs_required,
|
||||
pre_nb_available_rbs,
|
||||
nb_rbs_required_remaining,
|
||||
rballoc_sub_UE,
|
||||
rballoc_sub,
|
||||
MIMO_mode_indicator);
|
||||
UE_id,
|
||||
CC_id,
|
||||
N_RBG[CC_id],
|
||||
dl_pow_off,
|
||||
nb_rbs_required,
|
||||
pre_nb_available_rbs,
|
||||
nb_rbs_required_remaining,
|
||||
rballoc_sub_UE,
|
||||
rballoc_sub,
|
||||
MIMO_mode_indicator);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -494,6 +494,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
// extend nb_rbs_required to capture per LCID RB required
|
||||
for(i=UE_list->head; i>=0; i=UE_list->next[i]) {
|
||||
rnti = UE_RNTI(Mod_id,i);
|
||||
|
||||
for (ii=0; ii<UE_num_active_CC(UE_list,i); ii++) {
|
||||
CC_id = UE_list->ordered_CCids[ii][i];
|
||||
|
||||
@@ -846,7 +847,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
|
||||
rnti = UE_RNTI(module_idP,i);
|
||||
|
||||
if (rnti==NOT_A_RNTI)
|
||||
if (rnti==NOT_A_RNTI)
|
||||
continue;
|
||||
|
||||
UE_id = i;
|
||||
@@ -872,12 +873,11 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
} else if (total_ue_count == 1 ) { // increase the available RBs, special case,
|
||||
average_rbs_per_user[CC_id] = frame_parms->N_RB_UL-first_rb[CC_id]+1;
|
||||
} else if( (total_ue_count <= (frame_parms->N_RB_DL-first_rb[CC_id])) &&
|
||||
(total_ue_count <= max_num_ue_to_be_scheduled)) {
|
||||
(total_ue_count <= max_num_ue_to_be_scheduled)) {
|
||||
average_rbs_per_user[CC_id] = (uint16_t) floor((frame_parms->N_RB_UL-first_rb[CC_id])/total_ue_count);
|
||||
} else if (max_num_ue_to_be_scheduled > 0 ) {
|
||||
average_rbs_per_user[CC_id] = (uint16_t) floor((frame_parms->N_RB_UL-first_rb[CC_id])/max_num_ue_to_be_scheduled);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
average_rbs_per_user[CC_id]=1;
|
||||
LOG_W(MAC,"[eNB %d] frame %d subframe %d: UE %d CC %d: can't get average rb per user (should not be here)\n",
|
||||
module_idP,frameP,subframeP,UE_id,CC_id);
|
||||
@@ -922,7 +922,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
for (i=UE_list->head_ul; i>=0; i=UE_list->next_ul[i]) {
|
||||
rnti = UE_RNTI(module_idP,i);
|
||||
|
||||
if (rnti==NOT_A_RNTI)
|
||||
if (rnti==NOT_A_RNTI)
|
||||
continue;
|
||||
|
||||
UE_id = i;
|
||||
@@ -1035,6 +1035,7 @@ void assign_max_mcs_min_rb(module_id_t module_idP,int frameP, sub_frame_t subfra
|
||||
for (n=0; n<UE_list->numactiveULCCs[UE_id]; n++) {
|
||||
// This is the actual CC_id in the list
|
||||
CC_id = UE_list->ordered_ULCCids[n][UE_id];
|
||||
|
||||
if (CC_id >= MAX_NUM_CCs) {
|
||||
LOG_E( MAC, "CC_id %u should be < %u, loop n=%u < numactiveULCCs[%u]=%u",
|
||||
CC_id,
|
||||
@@ -1124,7 +1125,7 @@ void sort_ue_ul (module_id_t module_idP,int frameP, sub_frame_t subframeP)
|
||||
|
||||
rnti1 = UE_RNTI(module_idP,i);
|
||||
|
||||
if(rnti1 == NOT_A_RNTI)
|
||||
if(rnti1 == NOT_A_RNTI)
|
||||
continue;
|
||||
|
||||
UE_id1 = i;
|
||||
|
||||
@@ -130,8 +130,7 @@ void get_prach_resources(module_id_t module_idP,
|
||||
|
||||
if (UE_mac_inst[module_idP].radioResourceConfigCommon) {
|
||||
rach_ConfigCommon = &UE_mac_inst[module_idP].radioResourceConfigCommon->rach_ConfigCommon;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
LOG_E(MAC,"[UE %d] FATAL radioResourceConfigCommon is NULL !!!\n",module_idP);
|
||||
mac_xface->macphy_exit("MAC FATAL radioResourceConfigCommon is NULL");
|
||||
return; // not reached
|
||||
|
||||
@@ -633,8 +633,7 @@ int8_t ue_get_mbsfn_sf_alloction (module_id_t module_idP, uint8_t mbsfn_sync_are
|
||||
return -1;
|
||||
} else if (UE_mac_inst[module_idP].mbsfn_SubframeConfig[mbsfn_sync_area] != NULL) {
|
||||
return mbsfn_sync_area;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
LOG_W( MAC, "[UE %"PRIu8"] MBSFN Subframe Config pattern %"PRIu8" not found \n", module_idP, mbsfn_sync_area );
|
||||
return -1;
|
||||
}
|
||||
@@ -1449,8 +1448,8 @@ void ue_get_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subf
|
||||
trace_pdu(0, ulsch_buffer, buflen, module_idP, 3, UE_mac_inst[module_idP].crnti, subframe, 0, 0);
|
||||
}
|
||||
|
||||
LOG_D(OPT,"[UE %d][ULSCH] Frame %d trace pdu for rnti %x with size %d\n",
|
||||
module_idP, frameP, UE_mac_inst[module_idP].crnti, buflen);
|
||||
LOG_D(OPT,"[UE %d][ULSCH] Frame %d trace pdu for rnti %x with size %d\n",
|
||||
module_idP, frameP, UE_mac_inst[module_idP].crnti, buflen);
|
||||
#endif
|
||||
|
||||
LOG_D(MAC,"[UE %d][SR] Gave SDU to PHY, clearing any scheduling request\n",
|
||||
@@ -1691,7 +1690,7 @@ ue_scheduler(
|
||||
UE_mac_inst[module_idP].PHR_reporting_active = 1;
|
||||
} else if (UE_mac_inst[module_idP].PHR_reporting_active == 0 ) {
|
||||
UE_mac_inst[module_idP].scheduling_info.periodicPHR_SF--;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // release / nothing
|
||||
UE_mac_inst[module_idP].PHR_reporting_active = 0; // release PHR
|
||||
|
||||
@@ -192,7 +192,7 @@ rrc_ue_process_measConfig(
|
||||
void rrc_ue_process_radioResourceConfigDedicated(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
uint8_t eNB_index,
|
||||
RadioResourceConfigDedicated_t *radioResourceConfigDedicated);
|
||||
RadioResourceConfigDedicated_t *radioResourceConfigDedicated);
|
||||
|
||||
// eNB/CH RRC Procedures
|
||||
|
||||
@@ -445,8 +445,8 @@ uint8_t check_trigger_meas_event(
|
||||
uint8_t eNB_index,
|
||||
uint8_t ue_cnx_index,
|
||||
uint8_t meas_index,
|
||||
Q_OffsetRange_t ofn, Q_OffsetRange_t ocn, Hysteresis_t hys,
|
||||
Q_OffsetRange_t ofs, Q_OffsetRange_t ocs, long a3_offset, TimeToTrigger_t ttt);
|
||||
Q_OffsetRange_t ofn, Q_OffsetRange_t ocn, Hysteresis_t hys,
|
||||
Q_OffsetRange_t ofs, Q_OffsetRange_t ocs, long a3_offset, TimeToTrigger_t ttt);
|
||||
|
||||
//void rrc_ue_process_ueCapabilityEnquiry(uint8_t module_idP,uint32_t frame,UECapabilityEnquiry_t *UECapabilityEnquiry,uint8_t eNB_index);
|
||||
/*void
|
||||
|
||||
+36
-36
@@ -583,7 +583,7 @@ rrc_ue_decode_ccch(
|
||||
rrc_ue_process_radioResourceConfigDedicated(
|
||||
ctxt_pP,
|
||||
eNB_index,
|
||||
&dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup.criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated);
|
||||
&dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup.criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated);
|
||||
|
||||
rrc_set_state (ctxt_pP->module_id, RRC_STATE_CONNECTED);
|
||||
rrc_set_sub_state (ctxt_pP->module_id, RRC_SUB_STATE_CONNECTED);
|
||||
@@ -1199,7 +1199,7 @@ rrc_ue_process_radioResourceConfigDedicated(
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
ctxt_pP->rnti,
|
||||
UE_rrc_inst[ctxt_pP->module_id].ciphering_algorithm |
|
||||
(UE_rrc_inst[ctxt_pP->module_id].integrity_algorithm << 4));
|
||||
(UE_rrc_inst[ctxt_pP->module_id].integrity_algorithm << 4));
|
||||
|
||||
// Refresh DRBs
|
||||
rrc_pdcp_config_asn1_req(ctxt_pP,
|
||||
@@ -1431,8 +1431,8 @@ rrc_ue_process_securityModeCommand(
|
||||
buffer,
|
||||
PDCP_TRANSMISSION_MODE_CONTROL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
@@ -1546,7 +1546,7 @@ rrc_ue_process_ueCapabilityEnquiry(
|
||||
void
|
||||
rrc_ue_process_rrcConnectionReconfiguration(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
RRCConnectionReconfiguration_t *rrcConnectionReconfiguration,
|
||||
RRCConnectionReconfiguration_t *rrcConnectionReconfiguration,
|
||||
uint8_t eNB_index
|
||||
)
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1960,7 +1960,7 @@ rrc_ue_decode_dcch(
|
||||
rrc_ue_generate_RRCConnectionReconfigurationComplete(
|
||||
ctxt_pP,
|
||||
target_eNB_index,
|
||||
dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.rrc_TransactionIdentifier);
|
||||
dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.rrc_TransactionIdentifier);
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_indexP].State = RRC_HO_EXECUTION;
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[target_eNB_index].State = RRC_RECONFIGURED;
|
||||
LOG_I(RRC, "[UE %d] State = RRC_RECONFIGURED during HO (eNB %d)\n",
|
||||
@@ -2017,7 +2017,7 @@ rrc_ue_decode_dcch(
|
||||
rrc_ue_generate_RRCConnectionReconfigurationComplete(
|
||||
ctxt_pP,
|
||||
eNB_indexP,
|
||||
dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.rrc_TransactionIdentifier);
|
||||
dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.rrc_TransactionIdentifier);
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_indexP].State = RRC_RECONFIGURED;
|
||||
LOG_I(RRC, "[UE %d] State = RRC_RECONFIGURED (eNB %d)\n",
|
||||
ctxt_pP->module_id,
|
||||
@@ -2444,27 +2444,27 @@ decode_SIB1(
|
||||
|
||||
plmn_Identity = &(*sib1)->cellAccessRelatedInfo.plmn_IdentityList.list.array[plmn]->plmn_Identity;
|
||||
|
||||
if (
|
||||
(
|
||||
(plmn_Identity->mcc == NULL)
|
||||
||
|
||||
(
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit1 == *(plmn_Identity->mcc->list.array[0])) &&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit2 == *(plmn_Identity->mcc->list.array[1])) &&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit3 == *(plmn_Identity->mcc->list.array[2]))
|
||||
)
|
||||
)
|
||||
&&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit1 == *(plmn_Identity->mnc.list.array[0]))
|
||||
&&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit2 == *(plmn_Identity->mnc.list.array[1]))
|
||||
&&
|
||||
(
|
||||
((UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit3 == 0xf) && (plmn_Identity->mnc.list.count == 2))
|
||||
||
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit3 == *(plmn_Identity->mnc.list.array[2]))
|
||||
)
|
||||
) {
|
||||
if (
|
||||
(
|
||||
(plmn_Identity->mcc == NULL)
|
||||
||
|
||||
(
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit1 == *(plmn_Identity->mcc->list.array[0])) &&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit2 == *(plmn_Identity->mcc->list.array[1])) &&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit3 == *(plmn_Identity->mcc->list.array[2]))
|
||||
)
|
||||
)
|
||||
&&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit1 == *(plmn_Identity->mnc.list.array[0]))
|
||||
&&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit2 == *(plmn_Identity->mnc.list.array[1]))
|
||||
&&
|
||||
(
|
||||
((UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit3 == 0xf) && (plmn_Identity->mnc.list.count == 2))
|
||||
||
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit3 == *(plmn_Identity->mnc.list.array[2]))
|
||||
)
|
||||
) {
|
||||
/* PLMN match, send a confirmation to NAS */
|
||||
MessageDef *msg_p;
|
||||
|
||||
@@ -3473,7 +3473,7 @@ void
|
||||
RRC_MAC_MCCH_DATA_IND (msg_p).enb_index,
|
||||
RRC_MAC_MCCH_DATA_IND (msg_p).sdu,
|
||||
RRC_MAC_MCCH_DATA_IND (msg_p).sdu_size,
|
||||
RRC_MAC_MCCH_DATA_IND (msg_p).mbsfn_sync_area);
|
||||
RRC_MAC_MCCH_DATA_IND (msg_p).mbsfn_sync_area);
|
||||
break;
|
||||
# endif
|
||||
|
||||
@@ -3485,7 +3485,7 @@ void
|
||||
msg_name,
|
||||
RRC_DCCH_DATA_IND (msg_p).frame,
|
||||
RRC_DCCH_DATA_IND (msg_p).dcch_index,
|
||||
RRC_DCCH_DATA_IND (msg_p).eNB_index);
|
||||
RRC_DCCH_DATA_IND (msg_p).eNB_index);
|
||||
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT"Received %s DCCH %d, eNB %d",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(&ctxt),
|
||||
@@ -3521,13 +3521,13 @@ void
|
||||
UE_rrc_inst[ue_mod_id].plmnID = NAS_CELL_SELECTION_REQ (msg_p).plmnID;
|
||||
UE_rrc_inst[ue_mod_id].rat = NAS_CELL_SELECTION_REQ (msg_p).rat;
|
||||
LOG_I(RRC, "[UE %d] Save cell selection criterion MCC %X%X%X MNC %X%X%X\n",
|
||||
ue_mod_id,
|
||||
UE_rrc_inst[ue_mod_id].plmnID.MCCdigit1,
|
||||
UE_rrc_inst[ue_mod_id].plmnID.MCCdigit2,
|
||||
UE_rrc_inst[ue_mod_id].plmnID.MCCdigit3,
|
||||
UE_rrc_inst[ue_mod_id].plmnID.MNCdigit1,
|
||||
UE_rrc_inst[ue_mod_id].plmnID.MNCdigit2,
|
||||
UE_rrc_inst[ue_mod_id].plmnID.MNCdigit3);
|
||||
ue_mod_id,
|
||||
UE_rrc_inst[ue_mod_id].plmnID.MCCdigit1,
|
||||
UE_rrc_inst[ue_mod_id].plmnID.MCCdigit2,
|
||||
UE_rrc_inst[ue_mod_id].plmnID.MCCdigit3,
|
||||
UE_rrc_inst[ue_mod_id].plmnID.MNCdigit1,
|
||||
UE_rrc_inst[ue_mod_id].plmnID.MNCdigit2,
|
||||
UE_rrc_inst[ue_mod_id].plmnID.MNCdigit3);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+85
-83
@@ -197,9 +197,9 @@ init_SI(
|
||||
&eNB_rrc_inst[ctxt_pP->module_id].siblock1,
|
||||
&eNB_rrc_inst[ctxt_pP->module_id].sib1
|
||||
#if defined(ENABLE_ITTI)
|
||||
, configuration
|
||||
, configuration
|
||||
#endif
|
||||
);
|
||||
);
|
||||
else {
|
||||
LOG_E(RRC, PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1 allocated\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
|
||||
@@ -221,7 +221,7 @@ init_SI(
|
||||
if (eNB_rrc_inst[ctxt_pP->module_id].SIB23) {
|
||||
eNB_rrc_inst[ctxt_pP->module_id].sizeof_SIB23 = do_SIB23(
|
||||
ctxt_pP->module_id,
|
||||
mac_xface->lte_frame_parms,
|
||||
mac_xface->lte_frame_parms,
|
||||
eNB_rrc_inst[ctxt_pP->module_id].SIB23,
|
||||
&eNB_rrc_inst[ctxt_pP->module_id].systemInformation,
|
||||
&eNB_rrc_inst[ctxt_pP->module_id].sib2,
|
||||
@@ -231,9 +231,9 @@ init_SI(
|
||||
eNB_rrc_inst[ctxt_pP->module_id].MBMS_flag
|
||||
#endif
|
||||
#if defined(ENABLE_ITTI)
|
||||
, configuration
|
||||
, configuration
|
||||
#endif
|
||||
);
|
||||
);
|
||||
|
||||
/*
|
||||
eNB_rrc_inst[ctxt_pP->module_id].sizeof_SIB23 = do_SIB2_AT4(ctxt_pP->module_id,
|
||||
@@ -561,7 +561,7 @@ rrc_eNB_get_next_free_ue_context(
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" Cannot create new UE context, no memory\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
ue_context_p->ue_id_rnti = ctxt_pP->rnti; // here ue_id_rnti is just a key, may be something else
|
||||
ue_context_p->ue_context.rnti = ctxt_pP->rnti; // yes duplicate, 1 may be removed
|
||||
@@ -610,7 +610,7 @@ void rrc_eNB_emulation_notify_ue_module_id(
|
||||
|
||||
if (NULL != ue_context_p) {
|
||||
oai_emulation.info.eNB_ue_local_uid_to_ue_module_id[enb_module_id][ue_context_p->local_uid] = ue_module_idP;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -656,7 +656,8 @@ rrc_eNB_free_mem_UE_context(
|
||||
if (ue_context_pP->ue_context.physicalConfigDedicated) {
|
||||
ASN_STRUCT_FREE(asn_DEF_PhysicalConfigDedicated, ue_context_pP->ue_context.physicalConfigDedicated);
|
||||
ue_context_pP->ue_context.physicalConfigDedicated = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (ue_context_pP->ue_context.sps_Config) {
|
||||
ASN_STRUCT_FREE(asn_DEF_SPS_Config, ue_context_pP->ue_context.sps_Config);
|
||||
ue_context_pP->ue_context.sps_Config = NULL;
|
||||
@@ -667,7 +668,7 @@ rrc_eNB_free_mem_UE_context(
|
||||
ASN_STRUCT_FREE(asn_DEF_MeasObjectToAddMod, ue_context_pP->ue_context.MeasObj[i]);
|
||||
ue_context_pP->ue_context.MeasObj[i] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0; i < MAX_MEAS_CONFIG; i++) {
|
||||
if (ue_context_pP->ue_context.ReportConfig[i] != NULL) {
|
||||
@@ -698,7 +699,7 @@ rrc_eNB_free_mem_UE_context(
|
||||
if (ue_context_pP->ue_context.measConfig) {
|
||||
ASN_STRUCT_FREE(asn_DEF_MeasConfig, ue_context_pP->ue_context.measConfig);
|
||||
ue_context_pP->ue_context.measConfig = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (ue_context_pP->ue_context.measConfig) {
|
||||
ASN_STRUCT_FREE(asn_DEF_MeasConfig, ue_context_pP->ue_context.measConfig);
|
||||
@@ -758,12 +759,12 @@ rrc_eNB_free_UE(
|
||||
|
||||
#if defined(ENABLE_USE_MME)
|
||||
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP, ue_context_p, S1AP_CAUSE_RADIO_NETWORK, 21); // send cause 21: connection with ue lost
|
||||
/* From 3GPP 36300v10 p129 : 19.2.2.2.2 S1 UE Context Release Request (eNB triggered)
|
||||
* If the E-UTRAN internal reason is a radio link failure detected in the eNB, the eNB shall wait a sufficient time before
|
||||
* triggering the S1 UE Context Release Request procedure
|
||||
* in order to allow the UE to perform the NAS recovery
|
||||
* procedure, see TS 23.401 [17].
|
||||
*/
|
||||
/* From 3GPP 36300v10 p129 : 19.2.2.2.2 S1 UE Context Release Request (eNB triggered)
|
||||
* If the E-UTRAN internal reason is a radio link failure detected in the eNB, the eNB shall wait a sufficient time before
|
||||
* triggering the S1 UE Context Release Request procedure
|
||||
* in order to allow the UE to perform the NAS recovery
|
||||
* procedure, see TS 23.401 [17].
|
||||
*/
|
||||
#else
|
||||
AssertFatal(ue_context_p->local_uid < NUMBER_OF_UE_MAX, "local_uid invalid (%d<%d) for UE %x!", ue_context_p->local_uid, NUMBER_OF_UE_MAX, rntiP);
|
||||
ue_module_id = oai_emulation.info.eNB_ue_local_uid_to_ue_module_id[enb_mod_idP][ue_context_p->local_uid];
|
||||
@@ -773,8 +774,8 @@ rrc_eNB_free_UE(
|
||||
#endif
|
||||
ue_context_p->ue_context.Status = RRC_IDLE;
|
||||
|
||||
rrc_rlc_remove_ue(&ctxt);
|
||||
pdcp_remove_UE(&ctxt);
|
||||
rrc_rlc_remove_ue(&ctxt);
|
||||
pdcp_remove_UE(&ctxt);
|
||||
|
||||
rrc_eNB_remove_ue_context(
|
||||
&ctxt,
|
||||
@@ -1498,9 +1499,9 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(
|
||||
|
||||
/* TODO parameters yet to process ... */
|
||||
{
|
||||
// ue_context_pP->ue_context.e_rab[i].param.qos;
|
||||
// ue_context_pP->ue_context.e_rab[i].param.sgw_addr;
|
||||
// ue_context_pP->ue_context.e_rab[i].param.gtp_teid;
|
||||
// ue_context_pP->ue_context.e_rab[i].param.qos;
|
||||
// ue_context_pP->ue_context.e_rab[i].param.sgw_addr;
|
||||
// ue_context_pP->ue_context.e_rab[i].param.gtp_teid;
|
||||
}
|
||||
|
||||
/* TODO should test if e RAB are Ok before! */
|
||||
@@ -2207,10 +2208,10 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
|
||||
(RadioResourceConfigCommonSIB_t*) NULL,
|
||||
ue_context_pP->ue_context.physicalConfigDedicated,
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **) NULL,
|
||||
(MeasObjectToAddMod_t **) NULL,
|
||||
ue_context_pP->ue_context.mac_MainConfig,
|
||||
1,
|
||||
SRB1_logicalChannelConfig,
|
||||
@@ -2222,14 +2223,14 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
(MBSFN_SubframeConfigList_t *) NULL
|
||||
(MBSFN_SubframeConfigList_t *) NULL
|
||||
#ifdef Rel10
|
||||
, 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL
|
||||
, 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL
|
||||
#endif
|
||||
#ifdef CBA
|
||||
, eNB_rrc_inst[ctxt_pP->module_id].num_active_cba_groups, eNB_rrc_inst[ctxt_pP->module_id].cba_rnti[0]
|
||||
#endif
|
||||
);
|
||||
);
|
||||
|
||||
// Configure target eNB SRB2
|
||||
/// SRB2
|
||||
@@ -2729,7 +2730,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
|
||||
SRB_configList2,
|
||||
DRB_configList2,
|
||||
NULL, // DRB2_list,
|
||||
NULL, //*sps_Config,
|
||||
NULL, //*sps_Config,
|
||||
ue_context_pP->ue_context.physicalConfigDedicated,
|
||||
MeasObj_list,
|
||||
ReportConfig_list,
|
||||
@@ -2743,9 +2744,9 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
|
||||
NULL,
|
||||
dedicatedInfoNASList
|
||||
#ifdef Rel10
|
||||
, NULL // SCellToAddMod_r10_t
|
||||
, NULL // SCellToAddMod_r10_t
|
||||
#endif
|
||||
);
|
||||
);
|
||||
|
||||
LOG_I(RRC,
|
||||
"[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate RRCConnectionReconfiguration for handover (bytes %d, UE rnti %x)\n",
|
||||
@@ -2774,27 +2775,27 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
|
||||
ENB_FLAG_YES,
|
||||
ue_context_pP->ue_context.rnti,
|
||||
0,
|
||||
(RadioResourceConfigCommonSIB_t *) NULL,
|
||||
(RadioResourceConfigCommonSIB_t *) NULL,
|
||||
ue_context_pP->ue_context.physicalConfigDedicated,
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **) NULL,
|
||||
(MeasObjectToAddMod_t **) NULL,
|
||||
ue_context_pP->ue_context.mac_MainConfig,
|
||||
1,
|
||||
SRB1_logicalChannelConfig,
|
||||
1,
|
||||
SRB1_logicalChannelConfig,
|
||||
ue_context_pP->ue_context.measGapConfig,
|
||||
(TDD_Config_t *) NULL,
|
||||
(MobilityControlInfo_t *) mobilityInfo,
|
||||
(uint8_t *) NULL, (uint16_t *) NULL, NULL, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL
|
||||
(TDD_Config_t *) NULL,
|
||||
(MobilityControlInfo_t *) mobilityInfo,
|
||||
(uint8_t *) NULL, (uint16_t *) NULL, NULL, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL
|
||||
#ifdef Rel10
|
||||
, 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL
|
||||
, 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL
|
||||
#endif
|
||||
#ifdef CBA
|
||||
, 0, 0
|
||||
, 0, 0
|
||||
#endif
|
||||
);
|
||||
);
|
||||
|
||||
/*
|
||||
handoverCommand.criticalExtensions.present = HandoverCommand__criticalExtensions_PR_c1;
|
||||
@@ -3174,28 +3175,28 @@ rrc_eNB_generate_RRCConnectionSetup(
|
||||
ENB_FLAG_YES,
|
||||
ue_context_pP->ue_context.rnti,
|
||||
0,
|
||||
(RadioResourceConfigCommonSIB_t *) NULL,
|
||||
(RadioResourceConfigCommonSIB_t *) NULL,
|
||||
ue_context_pP->ue_context.physicalConfigDedicated,
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **) NULL,
|
||||
(MeasObjectToAddMod_t **) NULL,
|
||||
ue_context_pP->ue_context.mac_MainConfig,
|
||||
1,
|
||||
SRB1_logicalChannelConfig,
|
||||
1,
|
||||
SRB1_logicalChannelConfig,
|
||||
ue_context_pP->ue_context.measGapConfig,
|
||||
(TDD_Config_t *) NULL,
|
||||
NULL,
|
||||
(uint8_t *) NULL,
|
||||
(uint16_t *) NULL, NULL, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL
|
||||
(TDD_Config_t *) NULL,
|
||||
NULL,
|
||||
(uint8_t *) NULL,
|
||||
(uint16_t *) NULL, NULL, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL
|
||||
#ifdef Rel10
|
||||
, 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL
|
||||
, 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL
|
||||
#endif
|
||||
#ifdef CBA
|
||||
, 0, 0
|
||||
, 0, 0
|
||||
#endif
|
||||
);
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3518,7 +3519,7 @@ rrc_eNB_decode_ccch(
|
||||
{
|
||||
memcpy(((uint8_t*) & random_value) + 3,
|
||||
rrcConnectionRequest->ue_Identity.choice.randomValue.buf,
|
||||
rrcConnectionRequest->ue_Identity.choice.randomValue.size);
|
||||
rrcConnectionRequest->ue_Identity.choice.randomValue.size);
|
||||
ue_context_p = rrc_eNB_get_next_free_ue_context(ctxt_pP, random_value);
|
||||
}
|
||||
LOG_D(RRC,
|
||||
@@ -3530,18 +3531,18 @@ rrc_eNB_decode_ccch(
|
||||
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
/* Check s-TMSI presence in message */
|
||||
/* Check s-TMSI presence in message */
|
||||
ue_context_p->ue_context.Initialue_identity_s_TMSI.presence =
|
||||
(rrcConnectionRequest->ue_Identity.present == InitialUE_Identity_PR_s_TMSI);
|
||||
(rrcConnectionRequest->ue_Identity.present == InitialUE_Identity_PR_s_TMSI);
|
||||
|
||||
if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence) {
|
||||
/* Save s-TMSI */
|
||||
S_TMSI_t s_TMSI = rrcConnectionRequest->ue_Identity.choice.s_TMSI;
|
||||
/* Save s-TMSI */
|
||||
S_TMSI_t s_TMSI = rrcConnectionRequest->ue_Identity.choice.s_TMSI;
|
||||
|
||||
ue_context_p->ue_context.Initialue_identity_s_TMSI.mme_code =
|
||||
BIT_STRING_to_uint8(&s_TMSI.mmec);
|
||||
BIT_STRING_to_uint8(&s_TMSI.mmec);
|
||||
ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi =
|
||||
BIT_STRING_to_uint32(&s_TMSI.m_TMSI);
|
||||
BIT_STRING_to_uint32(&s_TMSI.m_TMSI);
|
||||
|
||||
MSC_LOG_RX_DISCARDED_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
@@ -3567,10 +3568,10 @@ rrc_eNB_decode_ccch(
|
||||
ue_context_p->ue_context.rnti,
|
||||
dec_rval.consumed,
|
||||
ue_context_p->ue_context.random_ue_identity);
|
||||
}
|
||||
}
|
||||
|
||||
ue_context_p->ue_context.establishment_cause =
|
||||
rrcConnectionRequest->establishmentCause;
|
||||
rrcConnectionRequest->establishmentCause;
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Accept new connection from UE random UE identity (0x%" PRIx64 ") MME code %u TMSI %u cause %u\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||
ue_context_p->ue_context.random_ue_identity,
|
||||
@@ -3597,27 +3598,27 @@ rrc_eNB_decode_ccch(
|
||||
send_msg(&S_rrc, msg_rrc_MR_attach_ind(ctxt_pP->module_id, Mac_id));
|
||||
#else
|
||||
|
||||
//LG COMMENT Idx = (ue_mod_idP * NB_RB_MAX) + DCCH;
|
||||
Idx = DCCH;
|
||||
// SRB1
|
||||
//LG COMMENT Idx = (ue_mod_idP * NB_RB_MAX) + DCCH;
|
||||
Idx = DCCH;
|
||||
// SRB1
|
||||
ue_context_p->ue_context.Srb1.Active = 1;
|
||||
ue_context_p->ue_context.Srb1.Srb_info.Srb_id = Idx;
|
||||
memcpy(&ue_context_p->ue_context.Srb1.Srb_info.Lchan_desc[0],
|
||||
&DCCH_LCHAN_DESC,
|
||||
LCHAN_DESC_SIZE);
|
||||
LCHAN_DESC_SIZE);
|
||||
memcpy(&ue_context_p->ue_context.Srb1.Srb_info.Lchan_desc[1],
|
||||
&DCCH_LCHAN_DESC,
|
||||
LCHAN_DESC_SIZE);
|
||||
LCHAN_DESC_SIZE);
|
||||
|
||||
// SRB2
|
||||
// SRB2
|
||||
ue_context_p->ue_context.Srb2.Active = 1;
|
||||
ue_context_p->ue_context.Srb2.Srb_info.Srb_id = Idx;
|
||||
memcpy(&ue_context_p->ue_context.Srb2.Srb_info.Lchan_desc[0],
|
||||
&DCCH_LCHAN_DESC,
|
||||
LCHAN_DESC_SIZE);
|
||||
LCHAN_DESC_SIZE);
|
||||
memcpy(&ue_context_p->ue_context.Srb2.Srb_info.Lchan_desc[1],
|
||||
&DCCH_LCHAN_DESC,
|
||||
LCHAN_DESC_SIZE);
|
||||
LCHAN_DESC_SIZE);
|
||||
|
||||
rrc_eNB_generate_RRCConnectionSetup(ctxt_pP, ue_context_p);
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT"CALLING RLC CONFIG SRB1 (rbid %d)\n",
|
||||
@@ -3635,25 +3636,25 @@ rrc_eNB_decode_ccch(
|
||||
|
||||
rrc_pdcp_config_asn1_req(ctxt_pP,
|
||||
ue_context_p->ue_context.SRB_configList,
|
||||
(DRB_ToAddModList_t *) NULL,
|
||||
(DRB_ToAddModList_t *) NULL,
|
||||
(DRB_ToReleaseList_t*) NULL,
|
||||
0xff,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
# ifdef Rel10
|
||||
, (PMCH_InfoList_r9_t *) NULL
|
||||
, (PMCH_InfoList_r9_t *) NULL
|
||||
# endif
|
||||
);
|
||||
);
|
||||
|
||||
rrc_rlc_config_asn1_req(ctxt_pP,
|
||||
ue_context_p->ue_context.SRB_configList,
|
||||
(DRB_ToAddModList_t*) NULL,
|
||||
(DRB_ToReleaseList_t*) NULL
|
||||
# ifdef Rel10
|
||||
, (PMCH_InfoList_r9_t *) NULL
|
||||
, (PMCH_InfoList_r9_t *) NULL
|
||||
# endif
|
||||
);
|
||||
);
|
||||
#endif //NO_RRM
|
||||
|
||||
break;
|
||||
@@ -3755,6 +3756,7 @@ rrc_eNB_decode_dcch(
|
||||
dec_rval.consumed);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ue_context_p = rrc_eNB_get_ue_context(
|
||||
&eNB_rrc_inst[ctxt_pP->module_id],
|
||||
ctxt_pP->rnti);
|
||||
@@ -3778,8 +3780,8 @@ rrc_eNB_decode_dcch(
|
||||
rrc_eNB_process_MeasurementReport(
|
||||
ctxt_pP,
|
||||
ue_context_p,
|
||||
&ul_dcch_msg->message.choice.c1.choice.measurementReport.
|
||||
criticalExtensions.choice.c1.choice.measurementReport_r8.measResults);
|
||||
&ul_dcch_msg->message.choice.c1.choice.measurementReport.
|
||||
criticalExtensions.choice.c1.choice.measurementReport_r8.measResults);
|
||||
break;
|
||||
|
||||
case UL_DCCH_MessageType__c1_PR_rrcConnectionReconfigurationComplete:
|
||||
@@ -3815,10 +3817,10 @@ rrc_eNB_decode_dcch(
|
||||
rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
ctxt_pP,
|
||||
ue_context_p,
|
||||
&ul_dcch_msg->message.choice.c1.choice.
|
||||
rrcConnectionReconfigurationComplete.
|
||||
criticalExtensions.choice.
|
||||
rrcConnectionReconfigurationComplete_r8);
|
||||
&ul_dcch_msg->message.choice.c1.choice.
|
||||
rrcConnectionReconfigurationComplete.
|
||||
criticalExtensions.choice.
|
||||
rrcConnectionReconfigurationComplete_r8);
|
||||
ue_context_p->ue_context.Status = RRC_RECONFIGURED;
|
||||
LOG_I(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED \n",
|
||||
|
||||
@@ -102,10 +102,10 @@ rrc_eNB_S1AP_compare_ue_ids(
|
||||
|
||||
if (c1_pP->ue_initial_id < c2_pP->ue_initial_id) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (c1_pP->eNB_ue_s1ap_id > c2_pP->eNB_ue_s1ap_id) {
|
||||
return 1;
|
||||
@@ -138,7 +138,7 @@ rrc_eNB_S1AP_get_ue_ids(
|
||||
temp.ue_initial_id = ue_initial_id;
|
||||
temp.eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
return RB_FIND(rrc_rnti_tree_s, &rrc_instance_pP->rrc_rnti_head, &temp);
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
rrc_eNB_S1AP_remove_ue_ids(
|
||||
@@ -150,7 +150,8 @@ rrc_eNB_S1AP_remove_ue_ids(
|
||||
if (rrc_instance_pP == NULL) {
|
||||
LOG_E(RRC, "Bad RRC instance\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (ue_ids_pP == NULL) {
|
||||
LOG_E(RRC, "Trying to free a NULL S1AP UE IDs\n");
|
||||
return;
|
||||
@@ -181,7 +182,7 @@ get_next_ue_initial_id(
|
||||
}
|
||||
|
||||
return ue_initial_id[mod_id];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -212,7 +213,7 @@ rrc_eNB_get_ue_context_from_s1ap_ids(
|
||||
// found by ue_initial_id, fill now eNB_ue_s1ap_idP
|
||||
if (temp->eNB_ue_s1ap_id != eNB_ue_s1ap_idP) {
|
||||
temp->eNB_ue_s1ap_id = eNB_ue_s1ap_idP;
|
||||
}
|
||||
}
|
||||
|
||||
return rrc_eNB_get_ue_context(
|
||||
&eNB_rrc_inst[ENB_INSTANCE_TO_MODULE_ID(instanceP)],
|
||||
@@ -426,24 +427,25 @@ rrc_pdcp_config_security(
|
||||
|
||||
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
pdcp_config_set_security(
|
||||
pdcp_config_set_security(
|
||||
ctxt_pP,
|
||||
pdcp_p,
|
||||
DCCH,
|
||||
DCCH+2,
|
||||
(send_security_mode_command == TRUE) ?
|
||||
pdcp_p,
|
||||
DCCH,
|
||||
DCCH+2,
|
||||
(send_security_mode_command == TRUE) ?
|
||||
0 | (ue_context_pP->ue_context.integrity_algorithm << 4) :
|
||||
(ue_context_pP->ue_context.ciphering_algorithm ) |
|
||||
(ue_context_pP->ue_context.integrity_algorithm << 4),
|
||||
kRRCenc,
|
||||
kRRCint,
|
||||
kUPenc);
|
||||
kRRCenc,
|
||||
kRRCint,
|
||||
kUPenc);
|
||||
} else {
|
||||
LOG_E(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT"Could not get PDCP instance for SRB DCCH %u\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||
DCCH);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -710,10 +712,10 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ(
|
||||
s1ap_eNB_new_data_request (
|
||||
ctxt_pP->module_id,
|
||||
ue_context_pP,
|
||||
rrcConnectionSetupComplete->dedicatedInfoNAS.
|
||||
buf,
|
||||
rrcConnectionSetupComplete->dedicatedInfoNAS.
|
||||
size);
|
||||
rrcConnectionSetupComplete->dedicatedInfoNAS.
|
||||
buf,
|
||||
rrcConnectionSetupComplete->dedicatedInfoNAS.
|
||||
size);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -784,6 +786,7 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
|
||||
return (-1);
|
||||
} else {
|
||||
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0);
|
||||
|
||||
/* Is it the first income from S1AP ? */
|
||||
if (ue_context_p->ue_context.eNB_ue_s1ap_id == 0) {
|
||||
ue_context_p->ue_context.eNB_ue_s1ap_id = S1AP_DOWNLINK_NAS (msg_p).eNB_ue_s1ap_id;
|
||||
@@ -805,8 +808,8 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
|
||||
instance,
|
||||
&buffer,
|
||||
rrc_eNB_get_next_transaction_identifier (instance),
|
||||
S1AP_DOWNLINK_NAS (msg_p).nas_pdu.length,
|
||||
S1AP_DOWNLINK_NAS (msg_p).nas_pdu.buffer);
|
||||
S1AP_DOWNLINK_NAS (msg_p).nas_pdu.length,
|
||||
S1AP_DOWNLINK_NAS (msg_p).nas_pdu.buffer);
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
int i=0;
|
||||
@@ -894,7 +897,7 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
|
||||
|
||||
/* TODO parameters yet to process ... */
|
||||
{
|
||||
// S1AP_INITIAL_CONTEXT_SETUP_REQ(msg_p).ue_ambr;
|
||||
// S1AP_INITIAL_CONTEXT_SETUP_REQ(msg_p).ue_ambr;
|
||||
}
|
||||
|
||||
rrc_eNB_process_security (
|
||||
@@ -970,7 +973,7 @@ int rrc_eNB_process_S1AP_UE_CTXT_MODIFICATION_REQ(MessageDef *msg_p, const char
|
||||
/* TODO parameters yet to process ... */
|
||||
{
|
||||
if (S1AP_UE_CTXT_MODIFICATION_REQ(msg_p).present & S1AP_UE_CONTEXT_MODIFICATION_UE_AMBR) {
|
||||
// S1AP_UE_CTXT_MODIFICATION_REQ(msg_p).ue_ambr;
|
||||
// S1AP_UE_CTXT_MODIFICATION_REQ(msg_p).ue_ambr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1903,11 +1903,13 @@ static void get_options (int argc, char **argv)
|
||||
case LONG_OPTION_RXGAIN:
|
||||
for (i=0; i<4; i++)
|
||||
rx_gain[0][i] = atof(optarg);
|
||||
|
||||
break;
|
||||
|
||||
case LONG_OPTION_TXGAIN:
|
||||
for (i=0; i<4; i++)
|
||||
tx_gain[0][i] = atof(optarg);
|
||||
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
@@ -2009,6 +2011,7 @@ static void get_options (int argc, char **argv)
|
||||
|
||||
case 'r':
|
||||
UE_scan = 0;
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
switch(atoi(optarg)) {
|
||||
case 6:
|
||||
@@ -2665,7 +2668,7 @@ int main( int argc, char **argv )
|
||||
#ifdef ETHERNET
|
||||
|
||||
if (frame_parms[0]->N_RB_DL == 6) openair0_cfg[0].samples_per_packet = 256;
|
||||
else openair0_cfg[0].samples_per_packet = 1536;
|
||||
else openair0_cfg[0].samples_per_packet = 1536;
|
||||
|
||||
printf("HW: samples_per_packet %d\n",openair0_cfg[0].samples_per_packet);
|
||||
#endif
|
||||
@@ -2778,9 +2781,9 @@ int main( int argc, char **argv )
|
||||
if (UE_flag==1) {
|
||||
fill_ue_band_info();
|
||||
mac_xface->dl_phy_sync_success (0, 0, 0, 1);
|
||||
}
|
||||
else
|
||||
} else
|
||||
mac_xface->mrbch_phy_sync_failure (0, 0, 0);
|
||||
|
||||
#endif
|
||||
|
||||
/* #ifdef OPENAIR2
|
||||
|
||||
+20
-17
@@ -231,10 +231,10 @@ static void *UE_thread_synch(void *arg)
|
||||
|
||||
if (UE->UE_scan == 0) {
|
||||
do {
|
||||
current_band = eutra_bands[ind].band;
|
||||
printf( "Scanning band %d, dl_min %"PRIu32"\n", current_band, eutra_bands[ind].dl_min );
|
||||
current_band = eutra_bands[ind].band;
|
||||
printf( "Scanning band %d, dl_min %"PRIu32"\n", current_band, eutra_bands[ind].dl_min );
|
||||
|
||||
if ((eutra_bands[ind].dl_min <= downlink_frequency[0][0]) && (eutra_bands[ind].dl_max >= downlink_frequency[0][0])) {
|
||||
if ((eutra_bands[ind].dl_min <= downlink_frequency[0][0]) && (eutra_bands[ind].dl_max >= downlink_frequency[0][0])) {
|
||||
for (card=0; card<MAX_NUM_CCs; card++)
|
||||
for (i=0; i<4; i++)
|
||||
uplink_frequency_offset[card][i] = eutra_bands[ind].ul_min - eutra_bands[ind].dl_min;
|
||||
@@ -244,24 +244,26 @@ static void *UE_thread_synch(void *arg)
|
||||
}
|
||||
|
||||
ind++;
|
||||
} while (current_band < sizeof(eutra_bands) / sizeof(eutra_bands[0]));
|
||||
} while (current_band < sizeof(eutra_bands) / sizeof(eutra_bands[0]));
|
||||
|
||||
if (found == 0) {
|
||||
exit_fun("Can't find EUTRA band for frequency");
|
||||
return &UE_thread_synch_retval;
|
||||
return &UE_thread_synch_retval;
|
||||
}
|
||||
|
||||
#ifdef OAI_USRP
|
||||
// now we know the uplink_frequency_offset
|
||||
// set the correct TX frequency
|
||||
for (i=0; i<openair0_cfg[card].tx_num_channels; i++) {
|
||||
openair0_cfg[0].tx_freq[i] = downlink_frequency[0][i] + uplink_frequency_offset[0][i];
|
||||
}
|
||||
openair0_set_frequencies( &openair0, &openair0_cfg[0] );
|
||||
|
||||
// now we know the uplink_frequency_offset
|
||||
// set the correct TX frequency
|
||||
for (i=0; i<openair0_cfg[card].tx_num_channels; i++) {
|
||||
openair0_cfg[0].tx_freq[i] = downlink_frequency[0][i] + uplink_frequency_offset[0][i];
|
||||
}
|
||||
|
||||
openair0_set_frequencies( &openair0, &openair0_cfg[0] );
|
||||
#endif
|
||||
}
|
||||
|
||||
else if (UE->UE_scan == 1) {
|
||||
else if (UE->UE_scan == 1) {
|
||||
current_band=0;
|
||||
|
||||
for (card=0; card<MAX_CARDS; card++) {
|
||||
@@ -383,7 +385,7 @@ static void *UE_thread_synch(void *arg)
|
||||
printf("UE synch: setting RX gain (%d,%d) to %f\n",card,i,openair0_cfg[card].rx_gain[i]);
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef EXMIMO
|
||||
//openair0_config(&openair0_cfg[card],1);
|
||||
@@ -477,6 +479,7 @@ static void *UE_thread_synch(void *arg)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SYNCH, 0 );
|
||||
|
||||
if (pthread_mutex_lock(&UE->mutex_synch) != 0) {
|
||||
@@ -996,7 +999,7 @@ void *UE_thread(void *arg)
|
||||
UE->PHY_measurements.rx_power_avg_dB[0] - rx_input_level_dBm,
|
||||
UE->rx_total_gain_dB,
|
||||
openair0_cfg[0].rx_gain[0]
|
||||
);
|
||||
);
|
||||
exit_fun("[HW][UE] UE in RX calibration mode, exiting");
|
||||
return &UE_thread_retval;
|
||||
}
|
||||
@@ -1384,7 +1387,7 @@ void *UE_thread(void *arg)
|
||||
UE->PHY_measurements.rx_power_avg_dB[0] - rx_input_level_dBm,
|
||||
UE->rx_total_gain_dB,
|
||||
openair0_cfg[0].rx_gain[0]
|
||||
);
|
||||
);
|
||||
exit_fun("[HW][UE] UE in RX calibration mode, exiting");
|
||||
}
|
||||
}
|
||||
@@ -1420,8 +1423,8 @@ void *UE_thread(void *arg)
|
||||
}
|
||||
|
||||
/*
|
||||
if ((slot%2000)<10)
|
||||
LOG_D(HW,"fun0: doing very hard work\n");
|
||||
if ((slot%2000)<10)
|
||||
LOG_D(HW,"fun0: doing very hard work\n");
|
||||
*/
|
||||
// now increment slot and frame counters
|
||||
slot++;
|
||||
|
||||
Reference in New Issue
Block a user