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
spbro
OpenXG-RAN
Commits
2eacb866
Commit
2eacb866
authored
May 24, 2021
by
Melissa Elkadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Filling ctxt in LTE UE RRC layer
parent
7224adba
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
15 deletions
+26
-15
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair1/SCHED_NR/nr_prach_procedures.c
openair1/SCHED_NR/nr_prach_procedures.c
+2
-1
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+3
-1
openair2/RRC/LTE/rrc_UE.c
openair2/RRC/LTE/rrc_UE.c
+20
-12
No files found.
cmake_targets/CMakeLists.txt
View file @
2eacb866
...
@@ -395,7 +395,7 @@ set (FIRMWARE_VERSION "No svn information")
...
@@ -395,7 +395,7 @@ set (FIRMWARE_VERSION "No svn information")
add_definitions
(
"-DFIRMWARE_VERSION=
\"
${
FIRMWARE_VERSION
}
\"
"
)
add_definitions
(
"-DFIRMWARE_VERSION=
\"
${
FIRMWARE_VERSION
}
\"
"
)
add_definitions
(
"-DPACKAGE_VERSION=
\"
Branch:
${
GIT_BRANCH
}
Abrev. Hash:
${
GIT_COMMIT_HASH
}
Date:
${
GIT_COMMIT_DATE
}
\"
"
)
add_definitions
(
"-DPACKAGE_VERSION=
\"
Branch:
${
GIT_BRANCH
}
Abrev. Hash:
${
GIT_COMMIT_HASH
}
Date:
${
GIT_COMMIT_DATE
}
\"
"
)
add_definitions
(
"-DPACKAGE_BUGREPORT=
\"
openair4g-devel@lists.eurecom.fr
\"
"
)
add_definitions
(
"-DPACKAGE_BUGREPORT=
\"
openair4g-devel@lists.eurecom.fr
\"
"
)
add_definitions
(
"-DASN_EMIT_DEBUG=1"
)
#
add_definitions("-DASN_EMIT_DEBUG=1")
# Debug related options
# Debug related options
...
...
openair1/SCHED_NR/nr_prach_procedures.c
View file @
2eacb866
...
@@ -51,7 +51,8 @@ extern uint8_t nfapi_mode;
...
@@ -51,7 +51,8 @@ extern uint8_t nfapi_mode;
extern
int
oai_nfapi_nr_rach_ind
(
nfapi_rach_indication_t
*
rach_ind
);
extern
int
oai_nfapi_nr_rach_ind
(
nfapi_rach_indication_t
*
rach_ind
);
/* Melissa, this is what fills the rach ind. It gets filled here in
the gNB. This is then sent to the proxy. */
void
L1_nr_prach_procedures
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
)
{
void
L1_nr_prach_procedures
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
)
{
uint16_t
max_preamble
[
4
]
=
{
0
},
max_preamble_energy
[
4
]
=
{
0
},
max_preamble_delay
[
4
]
=
{
0
};
uint16_t
max_preamble
[
4
]
=
{
0
},
max_preamble_energy
[
4
]
=
{
0
},
max_preamble_delay
[
4
]
=
{
0
};
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
2eacb866
...
@@ -2157,6 +2157,8 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
...
@@ -2157,6 +2157,8 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
LOG_D
(
PHY
,
"In %s:[%d.%d] getting PRACH resources
\n
"
,
__FUNCTION__
,
frame_tx
,
nr_slot_tx
);
LOG_D
(
PHY
,
"In %s:[%d.%d] getting PRACH resources
\n
"
,
__FUNCTION__
,
frame_tx
,
nr_slot_tx
);
nr_prach
=
nr_ue_get_rach
(
prach_resources
,
&
ue
->
prach_vars
[
0
]
->
prach_pdu
,
mod_id
,
ue
->
CC_id
,
frame_tx
,
gNB_id
,
nr_slot_tx
);
nr_prach
=
nr_ue_get_rach
(
prach_resources
,
&
ue
->
prach_vars
[
0
]
->
prach_pdu
,
mod_id
,
ue
->
CC_id
,
frame_tx
,
gNB_id
,
nr_slot_tx
);
/* Melissa: Every slot_ind that we get we need to call nr_ue_get_rach().
We will add this to IF MOD where we are doing measurements already */
}
}
...
@@ -2204,7 +2206,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
...
@@ -2204,7 +2206,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
ue
->
prach_vars
[
gNB_id
]
->
amp
);
ue
->
prach_vars
[
gNB_id
]
->
amp
);
if
(
ue
->
mac_enabled
==
1
)
if
(
ue
->
mac_enabled
==
1
)
nr_Msg1_transmitted
(
mod_id
,
ue
->
CC_id
,
frame_tx
,
gNB_id
);
nr_Msg1_transmitted
(
mod_id
,
ue
->
CC_id
,
frame_tx
,
gNB_id
);
//Once rach is = 1, then call this
}
else
if
(
nr_prach
==
2
)
{
}
else
if
(
nr_prach
==
2
)
{
...
...
openair2/RRC/LTE/rrc_UE.c
View file @
2eacb866
...
@@ -98,8 +98,6 @@ static int from_nr_ue_fd = -1;
...
@@ -98,8 +98,6 @@ static int from_nr_ue_fd = -1;
static
int
to_nr_ue_fd
=
-
1
;
static
int
to_nr_ue_fd
=
-
1
;
int
slrb_id
;
int
slrb_id
;
int
send_ue_information
=
0
;
int
send_ue_information
=
0
;
/* Melissa, this is a hack. Just created a ctxt global. Need to pass to process_nr_nsa_msg(). */
protocol_ctxt_t
ctxt_g
;
// for malloc_clear
// for malloc_clear
#include "PHY/defs_UE.h"
#include "PHY/defs_UE.h"
...
@@ -4869,7 +4867,6 @@ void *rrc_ue_task( void *args_p ) {
...
@@ -4869,7 +4867,6 @@ void *rrc_ue_task( void *args_p ) {
itti_receive_msg
(
TASK_RRC_UE
,
&
msg_p
);
itti_receive_msg
(
TASK_RRC_UE
,
&
msg_p
);
instance
=
ITTI_MSG_DESTINATION_INSTANCE
(
msg_p
);
instance
=
ITTI_MSG_DESTINATION_INSTANCE
(
msg_p
);
ue_mod_id
=
UE_INSTANCE_TO_MODULE_ID
(
instance
);
ue_mod_id
=
UE_INSTANCE_TO_MODULE_ID
(
instance
);
ctxt_g
=
ctxt
;
/* TODO: Add case to handle nr-UE messages we want from nrUE RRC layer */
/* TODO: Add case to handle nr-UE messages we want from nrUE RRC layer */
switch
(
ITTI_MSG_ID
(
msg_p
))
{
switch
(
ITTI_MSG_ID
(
msg_p
))
{
...
@@ -5000,6 +4997,7 @@ void *rrc_ue_task( void *args_p ) {
...
@@ -5000,6 +4997,7 @@ void *rrc_ue_task( void *args_p ) {
case
RRC_DCCH_DATA_COPY_IND
:
case
RRC_DCCH_DATA_COPY_IND
:
{
{
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
RRC_DCCH_DATA_COPY_IND
(
msg_p
).
module_id
,
ENB_FLAG_NO
,
RRC_DCCH_DATA_COPY_IND
(
msg_p
).
rnti
,
RRC_DCCH_DATA_COPY_IND
(
msg_p
).
frame
,
0
,
RRC_DCCH_DATA_COPY_IND
(
msg_p
).
eNB_index
);
LOG_I
(
RRC
,
"[UE %d] Received %s. Now calling rrc_ue_process_ueCapabilityEnquiry
\n
"
,
LOG_I
(
RRC
,
"[UE %d] Received %s. Now calling rrc_ue_process_ueCapabilityEnquiry
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
rrc_dcch_data_copy_t
*
dl_dcch_buffer
=
(
void
*
)
RRC_DCCH_DATA_COPY_IND
(
msg_p
).
sdu_p
;
rrc_dcch_data_copy_t
*
dl_dcch_buffer
=
(
void
*
)
RRC_DCCH_DATA_COPY_IND
(
msg_p
).
sdu_p
;
...
@@ -5016,6 +5014,7 @@ void *rrc_ue_task( void *args_p ) {
...
@@ -5016,6 +5014,7 @@ void *rrc_ue_task( void *args_p ) {
case
RRC_NRUE_CAP_INFO_IND
:
case
RRC_NRUE_CAP_INFO_IND
:
{
{
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
RRC_NRUE_CAP_INFO_IND
(
msg_p
).
module_id
,
ENB_FLAG_NO
,
RRC_NRUE_CAP_INFO_IND
(
msg_p
).
rnti
,
RRC_NRUE_CAP_INFO_IND
(
msg_p
).
frame
,
0
,
RRC_NRUE_CAP_INFO_IND
(
msg_p
).
eNB_index
);
LOG_I
(
RRC
,
"[UE %d] Received %s. Now calling rrc_ue_process_nrueCapabilityEnquiry
\n
"
,
LOG_I
(
RRC
,
"[UE %d] Received %s. Now calling rrc_ue_process_nrueCapabilityEnquiry
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
rrc_nrue_cap_info_t
*
nrue_cap_info
=
(
void
*
)
RRC_NRUE_CAP_INFO_IND
(
msg_p
).
sdu_p
;
rrc_nrue_cap_info_t
*
nrue_cap_info
=
(
void
*
)
RRC_NRUE_CAP_INFO_IND
(
msg_p
).
sdu_p
;
...
@@ -6547,6 +6546,8 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len)
...
@@ -6547,6 +6546,8 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len)
uint8_t
*
const
msg_buffer
=
msg
->
msg_buffer
;
uint8_t
*
const
msg_buffer
=
msg
->
msg_buffer
;
msg_len
-=
sizeof
(
msg
->
msg_type
);
msg_len
-=
sizeof
(
msg
->
msg_type
);
bool
received_nr_msg
=
true
;
bool
received_nr_msg
=
true
;
protocol_ctxt_t
ctxt
;
module_id_t
module_id
=
0
;
switch
(
msg_type
)
switch
(
msg_type
)
{
{
...
@@ -6561,12 +6562,14 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len)
...
@@ -6561,12 +6562,14 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len)
AssertFatal
(
msg_len
<=
sizeof
(
nrue_cap_buf
->
mesg
),
"msg_len = %d
\n
"
,
msg_len
);
AssertFatal
(
msg_len
<=
sizeof
(
nrue_cap_buf
->
mesg
),
"msg_len = %d
\n
"
,
msg_len
);
memcpy
(
nrue_cap_buf
->
mesg
,
msg_buffer
,
msg_len
);
memcpy
(
nrue_cap_buf
->
mesg
,
msg_buffer
,
msg_len
);
nrue_cap_buf
->
mesg_len
=
msg_len
;
nrue_cap_buf
->
mesg_len
=
msg_len
;
UE_RRC_INFO
*
info
=
&
UE_rrc_inst
[
ctxt_g
.
module_id
].
Info
[
0
];
UE_RRC_INFO
*
info
=
&
UE_rrc_inst
[
module_id
].
Info
[
0
];
nrue_cap_buf
->
dl_dcch_msg
=
info
->
dl_dcch_msg
;
nrue_cap_buf
->
dl_dcch_msg
=
info
->
dl_dcch_msg
;
info
->
dl_dcch_msg
=
NULL
;
info
->
dl_dcch_msg
=
NULL
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
0
,
RRC_NRUE_CAP_INFO_IND
);
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
0
,
RRC_NRUE_CAP_INFO_IND
);
RRC_NRUE_CAP_INFO_IND
(
message_p
).
sdu_p
=
(
void
*
)
nrue_cap_buf
;
RRC_NRUE_CAP_INFO_IND
(
message_p
).
sdu_p
=
(
void
*
)
nrue_cap_buf
;
RRC_NRUE_CAP_INFO_IND
(
message_p
).
sdu_size
=
sizeof
(
*
nrue_cap_buf
);
RRC_NRUE_CAP_INFO_IND
(
message_p
).
sdu_size
=
sizeof
(
*
nrue_cap_buf
);
RRC_NRUE_CAP_INFO_IND
(
message_p
).
module_id
=
module_id
;
RRC_NRUE_CAP_INFO_IND
(
message_p
).
rnti
=
info
->
rnti
;
RRC_NRUE_CAP_INFO_IND
(
message_p
).
eNB_index
=
0
;
RRC_NRUE_CAP_INFO_IND
(
message_p
).
eNB_index
=
0
;
itti_send_msg_to_task
(
TASK_RRC_UE
,
0
,
message_p
);
itti_send_msg_to_task
(
TASK_RRC_UE
,
0
,
message_p
);
LOG_I
(
RRC
,
"Sent itti RRC_NRUE_CAP_INFO_IND
\n
"
);
LOG_I
(
RRC
,
"Sent itti RRC_NRUE_CAP_INFO_IND
\n
"
);
...
@@ -6575,11 +6578,10 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len)
...
@@ -6575,11 +6578,10 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len)
case
UE_CAPABILITY_DUMMY
:
case
UE_CAPABILITY_DUMMY
:
{
{
fill_ue_capability
(
NULL
,
received_nr_msg
);
fill_ue_capability
(
NULL
,
received_nr_msg
);
for
(
module_id_t
module_id
=
0
;
module_id
<
NB_UE_INST
;
module_id
++
)
{
UE_rrc_inst
[
module_id
].
UECap
=
UE_rrc_inst
->
UECap
;
UE_rrc_inst
[
module_id
].
UECap
=
UE_rrc_inst
->
UECap
;
UE_rrc_inst
[
module_id
].
UECapability
=
UE_rrc_inst
->
UECap
->
sdu
;
UE_rrc_inst
[
module_id
].
UECapability
=
UE_rrc_inst
->
UECap
->
sdu
;
UE_rrc_inst
[
module_id
].
UECapability_size
=
UE_rrc_inst
->
UECap
->
sdu_size
;
UE_rrc_inst
[
module_id
].
UECapability_size
=
UE_rrc_inst
->
UECap
->
sdu_size
;
}
if
(
!
is_en_dc_supported
(
UE_rrc_inst
->
UECap
->
UE_EUTRA_Capability
))
if
(
!
is_en_dc_supported
(
UE_rrc_inst
->
UECap
->
UE_EUTRA_Capability
))
{
{
LOG_E
(
RRC
,
"en_dc is NOT supported! Not sending RRC_DCCH_DATA_COPY_IND to update UE_Capability_INFO
\n
"
);
LOG_E
(
RRC
,
"en_dc is NOT supported! Not sending RRC_DCCH_DATA_COPY_IND to update UE_Capability_INFO
\n
"
);
...
@@ -6591,15 +6593,17 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len)
...
@@ -6591,15 +6593,17 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len)
rrc_dcch_data_copy_t
*
dl_dcch_buffer
=
itti_malloc
(
TASK_RRC_NSA_UE
,
rrc_dcch_data_copy_t
*
dl_dcch_buffer
=
itti_malloc
(
TASK_RRC_NSA_UE
,
TASK_RRC_UE
,
TASK_RRC_UE
,
sizeof
(
rrc_dcch_data_copy_t
));
sizeof
(
rrc_dcch_data_copy_t
));
UE_RRC_INFO
*
info
=
&
UE_rrc_inst
[
ctxt_g
.
module_id
].
Info
[
0
];
UE_RRC_INFO
*
info
=
&
UE_rrc_inst
[
module_id
].
Info
[
0
];
dl_dcch_buffer
->
dl_dcch_msg
=
info
->
dl_dcch_msg
;
dl_dcch_buffer
->
dl_dcch_msg
=
info
->
dl_dcch_msg
;
info
->
dl_dcch_msg
=
NULL
;
info
->
dl_dcch_msg
=
NULL
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
0
,
RRC_DCCH_DATA_COPY_IND
);
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE
,
0
,
RRC_DCCH_DATA_COPY_IND
);
RRC_DCCH_DATA_COPY_IND
(
message_p
).
sdu_p
=
(
void
*
)
dl_dcch_buffer
;
RRC_DCCH_DATA_COPY_IND
(
message_p
).
sdu_p
=
(
void
*
)
dl_dcch_buffer
;
RRC_DCCH_DATA_COPY_IND
(
message_p
).
sdu_size
=
sizeof
(
rrc_dcch_data_copy_t
);
RRC_DCCH_DATA_COPY_IND
(
message_p
).
sdu_size
=
sizeof
(
rrc_dcch_data_copy_t
);
RRC_DCCH_DATA_COPY_IND
(
message_p
).
module_id
=
module_id
;
RRC_DCCH_DATA_COPY_IND
(
message_p
).
rnti
=
info
->
rnti
;
RRC_DCCH_DATA_COPY_IND
(
message_p
).
eNB_index
=
0
;
RRC_DCCH_DATA_COPY_IND
(
message_p
).
eNB_index
=
0
;
itti_send_msg_to_task
(
TASK_RRC_UE
,
0
,
message_p
);
itti_send_msg_to_task
(
TASK_RRC_UE
,
0
,
message_p
);
LOG_
D
(
RRC
,
"Sent itti RRC_DCCH_DATA_COPY_IND
\n
"
);
LOG_
I
(
RRC
,
"Sent itti RRC_DCCH_DATA_COPY_IND
\n
"
);
break
;
break
;
}
}
...
@@ -6660,7 +6664,11 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len)
...
@@ -6660,7 +6664,11 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len)
uint8_t t_id = rrc_saved->rrc_TransactionIdentifier;
uint8_t t_id = rrc_saved->rrc_TransactionIdentifier;
rrc_saved = NULL;
rrc_saved = NULL;
#endif
#endif
rrc_ue_generate_RRCConnectionReconfigurationComplete
(
&
ctxt_g
,
ctxt_g
.
eNB_index
,
0
,
&
rrcConfigurationComplete
);
UE_RRC_INFO
*
info
=
&
UE_rrc_inst
[
module_id
].
Info
[
0
];
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
module_id
,
ENB_FLAG_NO
,
info
->
rnti
,
0
,
0
,
0
);
rrc_ue_generate_RRCConnectionReconfigurationComplete
(
&
ctxt
,
ctxt
.
eNB_index
,
0
,
&
rrcConfigurationComplete
);
break
;
break
;
}
}
default:
default:
...
...
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