Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
cac00e34
Commit
cac00e34
authored
Feb 19, 2016
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temporary commit for debugging on another computer
parent
fdb81c23
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
115 additions
and
76 deletions
+115
-76
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+25
-25
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+2
-2
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+1
-1
openair1/PHY/impl_defs_top.h
openair1/PHY/impl_defs_top.h
+1
-1
openair1/SCHED/defs.h
openair1/SCHED/defs.h
+1
-1
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+9
-9
openair2/LAYER2/MAC/eNB_scheduler.c
openair2/LAYER2/MAC/eNB_scheduler.c
+3
-3
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+20
-26
openair2/LAYER2/MAC/main.c
openair2/LAYER2/MAC/main.c
+1
-0
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+1
-1
openair2/PHY_INTERFACE/defs.h
openair2/PHY_INTERFACE/defs.h
+1
-1
openair2/RRC/LITE/L2_interface.c
openair2/RRC/LITE/L2_interface.c
+32
-4
openair2/RRC/LITE/defs.h
openair2/RRC/LITE/defs.h
+1
-0
openair2/RRC/LITE/rrc_common.c
openair2/RRC/LITE/rrc_common.c
+16
-1
openair2/RRC/LITE/rrc_eNB.c
openair2/RRC/LITE/rrc_eNB.c
+1
-1
No files found.
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
cac00e34
...
...
@@ -44,6 +44,7 @@
#include "PHY/CODING/extern.h"
#include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/LTE_TRANSPORT/defs.h"
#include "PHY/LTE_TRANSPORT/proto.h"
#include "defs.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
...
...
@@ -91,11 +92,11 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch)
#endif
for
(
r
=
0
;
r
<
MAX_NUM_DLSCH_SEGMENTS
;
r
++
)
{
#ifdef DEBUG_DLSCH_FREE
msg
(
"Freeing dlsch process %d c[%d] (%p)
\n
"
,
i
,
r
,
dlsch
->
harq_processes
[
i
]
->
c
[
r
]);
#endif
if
(
dlsch
->
harq_processes
[
i
]
->
c
[
r
])
{
free16
(
dlsch
->
harq_processes
[
i
]
->
c
[
r
],((
r
==
0
)
?
8
:
0
)
+
3
+
768
);
dlsch
->
harq_processes
[
i
]
->
c
[
r
]
=
NULL
;
...
...
@@ -104,17 +105,17 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch)
free16
(
dlsch
->
harq_processes
[
i
]
->
d
[
r
],(
96
+
12
+
3
+
(
3
*
6144
)));
dlsch
->
harq_processes
[
i
]
->
d
[
r
]
=
NULL
;
}
}
free16
(
dlsch
->
harq_processes
[
i
],
sizeof
(
LTE_DL_eNB_HARQ_t
));
dlsch
->
harq_processes
[
i
]
=
NULL
;
}
free16
(
dlsch
->
harq_processes
[
i
],
sizeof
(
LTE_DL_eNB_HARQ_t
));
dlsch
->
harq_processes
[
i
]
=
NULL
;
}
}
free16
(
dlsch
,
sizeof
(
LTE_eNB_DLSCH_t
));
dlsch
=
NULL
;
}
}
}
LTE_eNB_DLSCH_t
*
new_eNB_dlsch
(
unsigned
char
Kmimo
,
unsigned
char
Mdlharq
,
uint32_t
Nsoft
,
unsigned
char
N_RB_DL
,
uint8_t
abstraction_flag
)
...
...
@@ -204,28 +205,28 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_
for
(
i
=
0
;
i
<
Mdlharq
;
i
++
)
{
dlsch
->
harq_processes
[
i
]
->
round
=
0
;
if
(
abstraction_flag
==
0
)
{
for
(
j
=
0
;
j
<
96
;
j
++
)
for
(
r
=
0
;
r
<
MAX_NUM_DLSCH_SEGMENTS
/
bw_scaling
;
r
++
)
{
// printf("dlsch->harq_processes[%d]->d[%d] %p\n",i,r,dlsch->harq_processes[i]->d[r]);
dlsch
->
harq_processes
[
i
]
->
d
[
r
][
j
]
=
LTE_NULL
;
}
}
for
(
j
=
0
;
j
<
96
;
j
++
)
for
(
r
=
0
;
r
<
MAX_NUM_DLSCH_SEGMENTS
/
bw_scaling
;
r
++
)
{
// printf("dlsch->harq_processes[%d]->d[%d] %p\n",i,r,dlsch->harq_processes[i]->d[r]);
if
(
dlsch
->
harq_processes
[
i
]
->
d
[
r
])
dlsch
->
harq_processes
[
i
]
->
d
[
r
][
j
]
=
LTE_NULL
;
}
}
return
(
dlsch
);
}
}
LOG_D
(
PHY
,
"new_eNB_dlsch exit flag %d, size of %ld
\n
"
,
exit_flag
,
sizeof
(
LTE_eNB_DLSCH_t
));
LOG_D
(
PHY
,
"new_eNB_dlsch exit flag %d, size of %ld
\n
"
,
exit_flag
,
sizeof
(
LTE_eNB_DLSCH_t
));
free_eNB_dlsch
(
dlsch
);
return
(
NULL
);
}
void
clean_eNb_dlsch
(
LTE_eNB_DLSCH_t
*
dlsch
,
uint8_t
abstraction_flag
)
void
clean_eNb_dlsch
(
LTE_eNB_DLSCH_t
*
dlsch
)
{
unsigned
char
Mdlharq
;
...
...
@@ -245,12 +246,11 @@ void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch, uint8_t abstraction_flag)
dlsch
->
harq_processes
[
i
]
->
status
=
0
;
dlsch
->
harq_processes
[
i
]
->
round
=
0
;
if
(
abstraction_flag
==
0
)
{
for
(
j
=
0
;
j
<
96
;
j
++
)
for
(
r
=
0
;
r
<
MAX_NUM_DLSCH_SEGMENTS
;
r
++
)
if
(
dlsch
->
harq_processes
[
i
]
->
d
[
r
])
dlsch
->
harq_processes
[
i
]
->
d
[
r
][
j
]
=
LTE_NULL
;
}
for
(
j
=
0
;
j
<
96
;
j
++
)
for
(
r
=
0
;
r
<
MAX_NUM_DLSCH_SEGMENTS
;
r
++
)
if
(
dlsch
->
harq_processes
[
i
]
->
d
[
r
])
dlsch
->
harq_processes
[
i
]
->
d
[
r
][
j
]
=
LTE_NULL
;
}
}
}
...
...
openair1/PHY/LTE_TRANSPORT/proto.h
View file @
cac00e34
...
...
@@ -54,7 +54,7 @@
*/
void
free_eNB_dlsch
(
LTE_eNB_DLSCH_t
*
dlsch
);
void
clean_eNb_dlsch
(
LTE_eNB_DLSCH_t
*
dlsch
,
uint8_t
abstraction_flag
);
void
clean_eNb_dlsch
(
LTE_eNB_DLSCH_t
*
dlsch
);
/** \fn new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t abstraction_flag)
\brief This function allocates structures for a particular DLSCH at eNB
...
...
@@ -85,7 +85,7 @@ void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch);
LTE_UE_DLSCH_t
*
new_ue_dlsch
(
uint8_t
Kmimo
,
uint8_t
Mdlharq
,
uint32_t
Nsoft
,
uint8_t
max_turbo_iterations
,
uint8_t
N_RB_DL
,
uint8_t
abstraction_flag
);
void
clean_eNb_ulsch
(
LTE_eNB_ULSCH_t
*
ulsch
,
uint8_t
abstraction_flag
);
void
clean_eNb_ulsch
(
LTE_eNB_ULSCH_t
*
ulsch
);
void
free_ue_ulsch
(
LTE_UE_ULSCH_t
*
ulsch
);
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
View file @
cac00e34
...
...
@@ -179,7 +179,7 @@ LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t Mdlharq,uint8_t max_turbo_iterations,uint
return
(
NULL
);
}
void
clean_eNb_ulsch
(
LTE_eNB_ULSCH_t
*
ulsch
,
uint8_t
abstraction_flag
)
void
clean_eNb_ulsch
(
LTE_eNB_ULSCH_t
*
ulsch
)
{
unsigned
char
Mdlharq
;
...
...
openair1/PHY/impl_defs_top.h
View file @
cac00e34
...
...
@@ -256,7 +256,7 @@
#define AMP_OVER_2 (AMP>>1)
/// Threshold for PUCCH Format 1 detection
#define PUCCH1_THRES
10
#define PUCCH1_THRES
7
/// Threshold for PUCCH Format 1a/1b detection
#define PUCCH1a_THRES 4
...
...
openair1/SCHED/defs.h
View file @
cac00e34
...
...
@@ -405,7 +405,7 @@ void remove_harq_pid_from_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid);
int8_t
find_ue
(
uint16_t
rnti
,
PHY_VARS_eNB
*
phy_vars_eNB
);
int32_t
add_ue
(
int16_t
rnti
,
PHY_VARS_eNB
*
phy_vars_eNB
);
int
32_t
remove_ue
(
uint16_t
rnti
,
PHY_VARS_eNB
*
phy_vars_eNB
,
uint8_t
abstraction_flag
);
int
mac_phy_remove_ue
(
module_id_t
Mod_idP
,
rnti_t
rnti
);
void
process_timing_advance
(
module_id_t
Mod_id
,
uint8_t
CC_id
,
int16_t
timing_advance
);
void
process_timing_advance_rar
(
PHY_VARS_UE
*
phy_vars_ue
,
uint16_t
timing_advance
);
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
cac00e34
...
...
@@ -198,10 +198,10 @@ int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB)
return
(
-
1
);
}
int32_t
remove_ue
(
uint16_t
rnti
,
PHY_VARS_eNB
*
phy_vars_eNB
,
uint8_t
abstraction_flag
)
{
int
mac_phy_remove_ue
(
module_id_t
Mod_idP
,
rnti_t
rntiP
)
{
uint8_t
i
;
int
j
;
PHY_VARS_eNB
*
phy_vars_eNB
=
PHY_vars_eNB_g
[
Mod_idP
];
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
if
((
phy_vars_eNB
->
dlsch_eNB
[
i
]
==
NULL
)
||
(
phy_vars_eNB
->
ulsch_eNB
[
i
]
==
NULL
))
{
...
...
@@ -209,14 +209,14 @@ int32_t remove_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB, uint8_t abstraction
LOG_E
(
PHY
,
"Can't remove UE, not enough memory allocated
\n
"
);
return
(
-
1
);
}
else
{
if
(
phy_vars_eNB
->
eNB_UE_stats
[
i
].
crnti
==
rnti
)
{
MSC_LOG_EVENT
(
MSC_PHY_ENB
,
"0 Removed ue %"
PRIx16
" "
,
rnti
);
if
(
phy_vars_eNB
->
eNB_UE_stats
[
i
].
crnti
==
rnti
P
)
{
MSC_LOG_EVENT
(
MSC_PHY_ENB
,
"0 Removed ue %"
PRIx16
" "
,
rnti
P
);
#ifdef DEBUG_PHY_PROC
LOG_I
(
PHY
,
"eNB %d removing UE %d with rnti %x
\n
"
,
phy_vars_eNB
->
Mod_id
,
i
,
rnti
);
#endif
//msg("[PHY] UE_id %d\n",i);
clean_eNb_dlsch
(
phy_vars_eNB
->
dlsch_eNB
[
i
][
0
]
,
abstraction_flag
);
clean_eNb_ulsch
(
phy_vars_eNB
->
ulsch_eNB
[
i
]
,
abstraction_flag
);
clean_eNb_dlsch
(
phy_vars_eNB
->
dlsch_eNB
[
i
][
0
]);
clean_eNb_ulsch
(
phy_vars_eNB
->
ulsch_eNB
[
i
]);
//phy_vars_eNB->eNB_UE_stats[i].crnti = 0;
memset
(
&
phy_vars_eNB
->
eNB_UE_stats
[
i
],
0
,
sizeof
(
LTE_eNB_UE_stats
));
// mac_exit_wrapper("Removing UE");
...
...
@@ -232,7 +232,7 @@ int32_t remove_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB, uint8_t abstraction
}
}
MSC_LOG_EVENT
(
MSC_PHY_ENB
,
"0 Failed remove ue %"
PRIx16
" (not found)"
,
rnti
);
MSC_LOG_EVENT
(
MSC_PHY_ENB
,
"0 Failed remove ue %"
PRIx16
" (not found)"
,
rnti
P
);
return
(
-
1
);
}
...
...
@@ -3523,7 +3523,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
frame
,
phy_vars_eNB
->
eNB_UE_stats
[
i
].
crnti
);
#endif
remove_ue
(
phy_vars_eNB
->
eNB_UE_stats
[
i
].
crnti
,
phy_vars_eNB
,
abstraction_flag
);
mac_phy_remove_ue
(
phy_vars_eNB
->
eNB_UE_stats
[
i
].
crnti
,
phy_vars_eNB
);
phy_vars_eNB
->
ulsch_eNB
[(
uint32_t
)
i
]
->
Msg3_active
=
0
;
//phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->phich_active = 0;
...
...
@@ -3670,7 +3670,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
phy_vars_eNB
->
CC_id
,
frame
,
phy_vars_eNB
->
eNB_UE_stats
[
i
].
crnti
);
remove_ue
(
phy_vars_eNB
->
eNB_UE_stats
[
i
].
crnti
,
phy_vars_eNB
,
abstraction_flag
);
mac_phy_remove_ue
(
phy_vars_eNB
->
eNB_UE_stats
[
i
].
crnti
,
phy_vars_eNB
);
phy_vars_eNB
->
ulsch_eNB
[(
uint32_t
)
i
]
->
Msg3_active
=
0
;
}
...
...
openair2/LAYER2/MAC/eNB_scheduler.c
View file @
cac00e34
...
...
@@ -127,9 +127,9 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
// increment this, it is cleared when we receive an sdu
eNB_mac_inst
[
module_idP
].
UE_list
.
UE_sched_ctrl
[
i
].
ul_inactivity_timer
++
;
if
(
mac_xface
->
get_eNB_UE_stats
(
module_idP
,
CC_id
,
rnti
)
==
NULL
)
{
mac_remove_ue
(
module_idP
,
i
,
frameP
,
subframeP
);
//
mac_remove_ue(module_idP, i, frameP, subframeP);
}
else
{
// check uplink failure
...
...
@@ -210,7 +210,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
0
);
}
else
{
// ra_pdcch_sent==1
LOG_
I
(
MAC
,
"UE %d rnti %x: sent PDCCH order for RAPROC waiting (failure timer %d)
\n
"
,
i
,
rnti
,
UE_list
->
UE_sched_ctrl
[
i
].
ul_failure_timer
);
LOG_
D
(
MAC
,
"UE %d rnti %x: sent PDCCH order for RAPROC waiting (failure timer %d)
\n
"
,
i
,
rnti
,
UE_list
->
UE_sched_ctrl
[
i
].
ul_failure_timer
);
if
((
UE_list
->
UE_sched_ctrl
[
i
].
ul_failure_timer
%
40
)
==
0
)
UE_list
->
UE_sched_ctrl
[
i
].
ra_pdcch_order_sent
=
0
;
// resend every 4 frames
}
...
...
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
View file @
cac00e34
...
...
@@ -287,44 +287,38 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP,int harq_pidP)
}
//------------------------------------------------------------------------------
int
mac_remove_ue
(
module_id_t
mod_idP
,
int
ue_idP
,
int
frameP
,
sub_frame_t
subframeP
)
int
rrc_mac_remove_ue
(
module_id_t
mod_idP
,
rnti_t
rntiP
)
//------------------------------------------------------------------------------
{
int
prev
,
i
,
ret
=-
1
;
rnti_t
rnti
;
UE_list_t
*
UE_list
=
&
eNB_mac_inst
[
mod_idP
].
UE_list
;
int
pCC_id
=
UE_PCCID
(
mod_idP
,
ue_idP
);
int
UE_id
=
find_UE_id
(
mod_idP
,
rntiP
);
int
pCC_id
=
UE_PCCID
(
mod_idP
,
UE_id
);
rnti
=
UE_list
->
UE_template
[
pCC_id
][
ue_idP
].
rnti
;
LOG_I
(
MAC
,
"Removing UE %d from Primary CC_id %d (rnti %x)
\n
"
,
ue_idP
,
pCC_id
,
rnti
);
LOG_I
(
MAC
,
"Removing UE %d from Primary CC_id %d (rnti %x)
\n
"
,
UE_id
,
pCC_id
,
rntiP
);
dump_ue_list
(
UE_list
,
0
);
// clear all remaining pending transmissions
UE_list
->
UE_template
[
pCC_id
][
ue_idP
].
bsr_info
[
LCGID0
]
=
0
;
UE_list
->
UE_template
[
pCC_id
][
ue_idP
].
bsr_info
[
LCGID1
]
=
0
;
UE_list
->
UE_template
[
pCC_id
][
ue_idP
].
bsr_info
[
LCGID2
]
=
0
;
UE_list
->
UE_template
[
pCC_id
][
ue_idP
].
bsr_info
[
LCGID3
]
=
0
;
UE_list
->
UE_template
[
pCC_id
][
ue_idP
].
ul_SR
=
0
;
UE_list
->
UE_template
[
pCC_id
][
ue_idP
].
rnti
=
NOT_A_RNTI
;
UE_list
->
UE_template
[
pCC_id
][
ue_idP
].
ul_active
=
FALSE
;
eNB_ulsch_info
[
mod_idP
][
pCC_id
][
ue_idP
].
rnti
=
NOT_A_RNTI
;
eNB_ulsch_info
[
mod_idP
][
pCC_id
][
ue_idP
].
status
=
S_UL_NONE
;
eNB_dlsch_info
[
mod_idP
][
pCC_id
][
ue_idP
].
rnti
=
NOT_A_RNTI
;
eNB_dlsch_info
[
mod_idP
][
pCC_id
][
ue_idP
].
status
=
S_DL_NONE
;
rrc_eNB_free_UE
(
mod_idP
,
rnti
,
frameP
,
subframeP
);
UE_list
->
UE_template
[
pCC_id
][
UE_id
].
bsr_info
[
LCGID0
]
=
0
;
UE_list
->
UE_template
[
pCC_id
][
UE_id
].
bsr_info
[
LCGID1
]
=
0
;
UE_list
->
UE_template
[
pCC_id
][
UE_id
].
bsr_info
[
LCGID2
]
=
0
;
UE_list
->
UE_template
[
pCC_id
][
UE_id
].
bsr_info
[
LCGID3
]
=
0
;
UE_list
->
UE_template
[
pCC_id
][
UE_id
].
ul_SR
=
0
;
UE_list
->
UE_template
[
pCC_id
][
UE_id
].
rnti
=
NOT_A_RNTI
;
UE_list
->
UE_template
[
pCC_id
][
UE_id
].
ul_active
=
FALSE
;
eNB_ulsch_info
[
mod_idP
][
pCC_id
][
UE_id
].
rnti
=
NOT_A_RNTI
;
eNB_ulsch_info
[
mod_idP
][
pCC_id
][
UE_id
].
status
=
S_UL_NONE
;
eNB_dlsch_info
[
mod_idP
][
pCC_id
][
UE_id
].
rnti
=
NOT_A_RNTI
;
eNB_dlsch_info
[
mod_idP
][
pCC_id
][
UE_id
].
status
=
S_DL_NONE
;
prev
=
UE_list
->
head
;
for
(
i
=
UE_list
->
head
;
i
>=
0
;
i
=
UE_list
->
next
[
i
])
{
if
(
i
==
ue_idP
)
{
if
(
i
==
UE_id
)
{
// link prev to next in Active list
//if (prev==UE_list->head)
if
(
i
==
UE_list
->
head
)
{
...
...
@@ -349,7 +343,7 @@ int mac_remove_ue(module_id_t mod_idP, int ue_idP, int frameP, sub_frame_t subfr
prev
=
UE_list
->
head_ul
;
for
(
i
=
UE_list
->
head_ul
;
i
>=
0
;
i
=
UE_list
->
next_ul
[
i
])
{
if
(
i
==
ue_idP
)
{
if
(
i
==
UE_id
)
{
// link prev to next in Active list
if
(
prev
==
UE_list
->
head_ul
)
{
UE_list
->
head_ul
=
UE_list
->
next_ul
[
i
];
...
...
@@ -370,7 +364,7 @@ int mac_remove_ue(module_id_t mod_idP, int ue_idP, int frameP, sub_frame_t subfr
return
(
0
);
}
LOG_E
(
MAC
,
"error in mac_remove_ue(), could not find previous to %d in UE_list, should never happen, Dumping UE list
\n
"
,
ue_idP
);
LOG_E
(
MAC
,
"error in mac_remove_ue(), could not find previous to %d in UE_list, should never happen, Dumping UE list
\n
"
,
UE_id
);
dump_ue_list
(
UE_list
,
0
);
mac_xface
->
macphy_exit
(
"mac_remove_ue: Problem in UE_list"
);
return
(
-
1
);
...
...
openair2/LAYER2/MAC/main.c
View file @
cac00e34
...
...
@@ -476,6 +476,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui
mac_xface
->
Msg1_transmitted
=
Msg1_tx
;
mac_xface
->
ra_failed
=
ra_failed
;
mac_xface
->
ra_succeeded
=
ra_succeeded
;
mac_xface
->
mac_phy_remove_ue
=
mac_phy_remove_ue
;
LOG_I
(
MAC
,
"[MAIN] init UE MAC functions
\n
"
);
mac_xface
->
ue_decode_si
=
ue_decode_si
;
...
...
openair2/LAYER2/MAC/proto.h
View file @
cac00e34
...
...
@@ -499,7 +499,7 @@ uint8_t *parse_ulsch_header(uint8_t *mac_header,
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
mac_remove_ue
(
module_id_t
Mod_id
,
int
UE_id
,
int
frameP
,
sub_frame_t
subframe
P
);
int
rrc_mac_remove_ue
(
module_id_t
Mod_id
,
rnti_t
rnti
P
);
int
maxround
(
module_id_t
Mod_id
,
uint16_t
rnti
,
int
frame
,
sub_frame_t
subframe
,
uint8_t
ul_flag
);
...
...
openair2/PHY_INTERFACE/defs.h
View file @
cac00e34
...
...
@@ -134,7 +134,7 @@ typedef struct {
/// get delta mcs for fast UL AMC
int16_t
(
*
estimate_ue_tx_power
)(
uint32_t
tbs
,
uint32_t
nb_rb
,
uint8_t
control_only
,
lte_prefix_type_t
ncp
,
uint8_t
use_srs
);
int
(
*
mac_phy_remove_ue
)(
module_id_t
Mod_idP
,
rnti_t
rntiP
);
/// UE functions
/// reset the ue phy
...
...
openair2/RRC/LITE/L2_interface.c
View file @
cac00e34
...
...
@@ -716,19 +716,47 @@ mac_eNB_get_rrc_status(
}
void
mac_eNB_rrc_ul_failure
(
const
module_id_t
Mod_instP
,
const
int
CC_id
,
const
int
CC_id
P
,
const
frame_t
frameP
,
const
sub_frame_t
subframeP
,
const
rnti_t
rnti
)
{
const
rnti_t
rnti
P
)
{
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
Mod_instP
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
LOG_I
(
RRC
,
"Frame %d, Subframe %d: UE %x UL failure, activating timer
\n
"
,
rntiP
);
ue_context_p
->
ue_context
.
ul_failure_timer
=
1
;
}
else
{
LOG_E
(
RRC
,
"Frame %d, Subframe %d: UE %x unknown
\n
"
,
rntiP
);
}
return
;
}
void
mac_eNB_rrc_ul_in_sync
(
const
module_id_t
Mod_instP
,
const
int
CC_id
,
const
int
CC_id
P
,
const
frame_t
frameP
,
const
sub_frame_t
subframeP
,
const
rnti_t
rnti
)
{
const
rnti_t
rntiP
)
{
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
Mod_instP
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
LOG_I
(
RRC
,
"Frame %d, Subframe %d: UE %x to UL in synch
\n
"
,
rntiP
);
ue_context_p
->
ue_context
.
ul_failure_timer
=
0
;
}
else
{
LOG_E
(
RRC
,
"Frame %d, Subframe %d: UE %x unknown
\n
"
,
rntiP
);
}
return
;
}
...
...
openair2/RRC/LITE/defs.h
View file @
cac00e34
...
...
@@ -357,6 +357,7 @@ typedef struct eNB_RRC_UE_s {
transport_layer_addr_t
enb_gtp_addrs
[
S1AP_MAX_E_RAB
];
rb_id_t
enb_gtp_ebi
[
S1AP_MAX_E_RAB
];
#endif
uint32_t
ul_failure_timer
;
}
eNB_RRC_UE_t
;
typedef
uid_t
ue_uid_t
;
...
...
openair2/RRC/LITE/rrc_common.c
View file @
cac00e34
...
...
@@ -414,9 +414,10 @@ rrc_rx_tx(
uint8_t
UE_id
;
int32_t
current_timestamp_ms
,
ref_timestamp_ms
;
struct
timeval
ts
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
#ifdef LOCALIZATION
double
estimated_distance
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
protocol_ctxt_t
ctxt
;
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_RX_TX
,
VCD_FUNCTION_IN
);
...
...
@@ -517,6 +518,20 @@ rrc_rx_tx(
}
else
{
// eNB
check_handovers
(
ctxt_pP
);
// counetr, and get the value and aggregate
// check for UL failure
RB_FOREACH
(
ue_context_p
,
rrc_ue_tree_s
,
&
(
eNB_rrc_inst
[
ctxt_pP
->
module_id
].
rrc_ue_head
))
{
if
(
ue_context_p
->
ue_context
.
ul_failure_timer
>
0
)
{
ue_context_p
->
ue_context
.
ul_failure_timer
++
;
if
(
ue_context_p
->
ue_context
.
ul_failure_timer
==
1000
)
{
// remove UE after 1 second after MAC has indicated UL failure
LOG_I
(
RRC
,
"Removing UE %x instance
\n
"
,
ue_context_p
->
ue_context
.
rnti
);
}
}
}
#ifdef LOCALIZATION
/* for the localization, only primary CC_id might be relevant*/
...
...
openair2/RRC/LITE/rrc_eNB.c
View file @
cac00e34
...
...
@@ -790,7 +790,6 @@ rrc_eNB_free_mem_UE_context(
}
//-----------------------------------------------------------------------------
// called by MAC layer only
// should be called when UE is lost by eNB
void
rrc_eNB_free_UE
(
...
...
@@ -836,6 +835,7 @@ rrc_eNB_free_UE(
#endif
ue_context_p
->
ue_context
.
Status
=
RRC_IDLE
;
rrc_mac_remove_ue
(
enb_mod_idP
,
rntiP
);
rrc_rlc_remove_ue
(
&
ctxt
);
pdcp_remove_UE
(
&
ctxt
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment