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
lizhongxiao
OpenXG-RAN
Commits
6dc9ec77
Commit
6dc9ec77
authored
Sep 25, 2023
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
various improvements and fixes
parent
284b0721
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
53 additions
and
25 deletions
+53
-25
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+1
-1
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+11
-10
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+5
-0
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+1
-2
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+6
-2
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
+1
-1
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+26
-7
openair2/SDAP/nr_sdap/nr_sdap_entity.c
openair2/SDAP/nr_sdap/nr_sdap_entity.c
+2
-2
No files found.
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
View file @
6dc9ec77
...
...
@@ -673,7 +673,7 @@ typedef struct
}
fapi_nr_prach_config_t
;
typedef
struct
{
u
int16_t
target_Nid_cell
;
int16_t
target_Nid_cell
;
}
fapi_nr_synch_request_t
;
typedef
struct
{
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
6dc9ec77
...
...
@@ -675,9 +675,8 @@ static int lcid_cmp(const void *lc1, const void *lc2, void *mac_inst)
return
(
lc_config
[
id1
-
1
]
->
ul_SpecificParameters
->
priority
-
lc_config
[
id2
-
1
]
->
ul_SpecificParameters
->
priority
);
}
void
nr_release_mac_config_logicalChannelBearer
(
module_id_t
module_id
,
long
channel_identity
)
void
nr_release_mac_config_logicalChannelBearer
(
NR_UE_MAC_INST_t
*
mac
,
long
channel_identity
)
{
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
if
(
mac
->
logicalChannelConfig
[
channel_identity
-
1
]
!=
NULL
)
{
ASN_STRUCT_FREE
(
asn_DEF_NR_LogicalChannelConfig
,
mac
->
logicalChannelConfig
[
channel_identity
-
1
]);
mac
->
logicalChannelConfig
[
channel_identity
-
1
]
=
NULL
;
...
...
@@ -750,7 +749,7 @@ void nr_rrc_mac_config_req_ue_logicalChannelBearer(module_id_t module_id,
for
(
int
i
=
0
;
i
<
rlc_torelease_list
->
list
.
count
;
i
++
)
{
if
(
rlc_torelease_list
->
list
.
array
[
i
])
{
int
lc_identity
=
*
rlc_torelease_list
->
list
.
array
[
i
];
nr_release_mac_config_logicalChannelBearer
(
m
odule_id
,
lc_identity
);
nr_release_mac_config_logicalChannelBearer
(
m
ac
,
lc_identity
);
}
}
}
...
...
@@ -1351,19 +1350,20 @@ static void configure_common_BWP_ul(NR_UE_MAC_INST_t *mac, int bwp_id, NR_BWP_Up
}
}
void
nr_rrc_mac_config_req_reset
(
module_id_t
module_id
)
void
nr_rrc_mac_config_req_reset
(
module_id_t
module_id
,
NR_UE_MAC_reset_cause_t
reset_cause
)
{
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
reset_mac_inst
(
mac
);
}
void
nr_rrc_mac_config_req_release
(
module_id_t
module_id
)
{
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
reset_ra
(
&
mac
->
ra
);
release_mac_configuration
(
mac
);
for
(
int
i
=
0
;
i
<
NR_MAX_NUM_LCID
;
i
++
)
{
nr_release_mac_config_logicalChannelBearer
(
mac
,
i
+
1
);
memset
(
&
mac
->
lc_ordered_info
[
i
],
0
,
sizeof
(
nr_lcordered_info_t
));
}
mac
->
first_sync_frame
=
-
1
;
mac
->
get_sib1
=
false
;
mac
->
phy_config_request_sent
=
false
;
...
...
@@ -1375,6 +1375,7 @@ void nr_rrc_mac_config_req_release(module_id_t module_id)
mac
->
synch_request
.
CC_id
=
0
;
mac
->
synch_request
.
synch_req
.
target_Nid_cell
=
-
1
;
mac
->
if_module
->
synch_request
(
&
mac
->
synch_request
);
}
void
nr_rrc_mac_config_req_sib1
(
module_id_t
module_id
,
...
...
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
6dc9ec77
...
...
@@ -165,6 +165,11 @@ typedef enum {
UE_CONNECTED
}
NR_UE_L2_STATE_t
;
typedef
enum
{
GO_TO_IDLE
,
RE_ESTABLISHMENT
}
NR_UE_MAC_reset_cause_t
;
typedef
enum
{
RA_2STEP
=
0
,
RA_4STEP
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
6dc9ec77
...
...
@@ -170,8 +170,7 @@ void nr_rrc_mac_config_req_sib1(module_id_t module_id,
NR_SI_SchedulingInfo_t
*
si_SchedulingInfo
,
NR_ServingCellConfigCommonSIB_t
*
scc
);
void
nr_rrc_mac_config_req_reset
(
module_id_t
module_id
);
void
nr_rrc_mac_config_req_release
(
module_id_t
module_id
);
void
nr_rrc_mac_config_req_reset
(
module_id_t
module_id
,
NR_UE_MAC_reset_cause_t
cause
);
/**\brief initialization NR UE MAC instance(s), total number of MAC instance based on NB_NR_UE_MAC_INST*/
NR_UE_MAC_INST_t
*
nr_l2_init_ue
();
...
...
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
View file @
6dc9ec77
...
...
@@ -181,17 +181,21 @@ void reset_mac_inst(NR_UE_MAC_INST_t *nr_mac)
void
release_mac_configuration
(
NR_UE_MAC_INST_t
*
mac
)
{
if
(
mac
->
mib
)
if
(
mac
->
mib
)
{
ASN_STRUCT_FREE
(
asn_DEF_NR_MIB
,
mac
->
mib
);
mac
->
mib
=
NULL
;
}
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
NR_BWP_PDCCH_t
*
pdcch
=
&
mac
->
config_BWP_PDCCH
[
5
];
release_common_ss_cset
(
pdcch
);
for
(
int
j
=
0
;
j
<
pdcch
->
list_Coreset
.
count
;
j
++
)
asn_sequence_del
(
&
pdcch
->
list_Coreset
,
j
,
1
);
for
(
int
j
=
0
;
j
<
pdcch
->
list_SS
.
count
;
j
++
)
asn_sequence_del
(
&
pdcch
->
list_SS
,
j
,
1
);
asn_sequence_del
(
&
pdcch
->
list_SS
,
j
,
1
);
}
memset
(
&
mac
->
current_DL_BWP
,
0
,
sizeof
(
mac
->
current_DL_BWP
));
memset
(
&
mac
->
current_UL_BWP
,
0
,
sizeof
(
mac
->
current_UL_BWP
));
memset
(
&
mac
->
ssb_measurements
,
0
,
sizeof
(
mac
->
ssb_measurements
));
memset
(
&
mac
->
csirs_measurements
,
0
,
sizeof
(
mac
->
csirs_measurements
));
memset
(
&
mac
->
ul_time_alignment
,
0
,
sizeof
(
mac
->
ul_time_alignment
));
...
...
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
View file @
6dc9ec77
...
...
@@ -62,7 +62,7 @@ static void release_rlc_entity_from_lcid(nr_rlc_ue_t *ue, logical_chan_id_t chan
return
;
if
(
rb
->
type
==
NR_RLC_SRB
)
{
int
id
=
rb
->
choice
.
srb_id
-
1
;
AssertFatal
(
id
>
0
,
"logic bug: impossible to have srb0 here
\n
"
);
AssertFatal
(
id
>
=
0
,
"logic bug: impossible to have srb0 here
\n
"
);
if
(
ue
->
srb
[
id
])
{
ue
->
srb
[
id
]
->
delete_entity
(
ue
->
srb
[
id
]);
ue
->
srb
[
id
]
=
NULL
;
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
6dc9ec77
...
...
@@ -49,7 +49,6 @@
#include "rrc_defs.h"
#include "rrc_proto.h"
#include "LAYER2/NR_MAC_UE/mac_proto.h"
#include "COMMON/mac_rrc_primitives.h"
#include "intertask_interface.h"
...
...
@@ -1846,8 +1845,7 @@ void nr_rrc_going_to_IDLE(instance_t instance,
{
NR_UE_RRC_INST_t
*
rrc
=
&
NR_UE_rrc_inst
[
instance
];
NR_UE_Timers_Constants_t
*
tac
=
&
rrc
->
timers_and_constants
;
// reset MAC
nr_rrc_mac_config_req_reset
(
instance
);
// if going to RRC_IDLE was triggered by reception
// of the RRCRelease message including a waitTime
NR_RejectWaitTime_t
*
waitTime
=
NULL
;
...
...
@@ -1915,11 +1913,30 @@ void nr_rrc_going_to_IDLE(instance_t instance,
// discard the keys (only kgnb is stored)
memset
(
rrc
->
kgnb
,
0
,
sizeof
(
rrc
->
kgnb
));
//
TODO
release all radio resources, including release of the RLC entity,
// release all radio resources, including release of the RLC entity,
// the MAC configuration and the associated PDCP entity
// and SDAP for all established RBs
nr_pdcp_remove_UE
(
rrc
->
rnti
);
nr_rlc_remove_ue
(
rrc
->
rnti
);
for
(
int
j
=
0
;
j
<
NB_CNX_UE
;
j
++
)
{
rrcPerNB_t
*
nb
=
&
rrc
->
perNB
[
j
];
for
(
int
i
=
0
;
i
<
MAX_DRBS_PER_UE
;
i
++
)
{
if
(
nb
->
status_DRBs
[
i
]
!=
RB_NOT_PRESENT
)
{
nb
->
status_DRBs
[
i
]
=
RB_NOT_PRESENT
;
nr_pdcp_release_drb
(
rrc
->
rnti
,
i
);
}
}
for
(
int
i
=
1
;
i
<
NR_NUM_SRB
;
i
++
)
{
if
(
nb
->
Srb
[
i
]
!=
RB_NOT_PRESENT
)
{
nb
->
Srb
[
i
]
=
RB_NOT_PRESENT
;
nr_pdcp_release_srb
(
rrc
->
rnti
,
i
);
}
}
for
(
int
i
=
0
;
i
<
NR_MAX_NUM_LCID
;
i
++
)
{
if
(
nb
->
active_RLC_entity
[
i
])
{
nb
->
active_RLC_entity
[
i
]
=
false
;
nr_rlc_release_entity
(
rrc
->
rnti
,
i
);
}
}
}
if
(
rrc
->
meas_config
)
{
ASN_STRUCT_FREE
(
asn_DEF_NR_MeasConfig
,
rrc
->
meas_config
);
...
...
@@ -1987,7 +2004,9 @@ void nr_rrc_going_to_IDLE(instance_t instance,
}
}
nr_rrc_mac_config_req_release
(
instance
);
// reset MAC
NR_UE_MAC_reset_cause_t
cause
=
GO_TO_IDLE
;
nr_rrc_mac_config_req_reset
(
instance
,
cause
);
// enter RRC_IDLE
rrc
->
nrRrcState
=
RRC_STATE_IDLE_NR
;
...
...
openair2/SDAP/nr_sdap/nr_sdap_entity.c
View file @
6dc9ec77
...
...
@@ -491,7 +491,7 @@ bool nr_sdap_delete_entity(ue_id_t ue_id, int pdusession_id)
int
upperBound
=
0
;
if
(
entityPtr
==
NULL
&&
(
pdusession_id
)
*
(
pdusession_id
-
NGAP_MAX_PDU_SESSION
)
>
0
)
{
LOG_
W
(
SDAP
,
"SDAP entities not established or Invalid range of pdusession_id [0, 256].
\n
"
);
LOG_
E
(
SDAP
,
"SDAP entities not established or Invalid range of pdusession_id [0, 256].
\n
"
);
return
ret
;
}
LOG_D
(
SDAP
,
"Deleting SDAP entity for UE %lx and PDU Session id %d
\n
"
,
ue_id
,
entityPtr
->
pdusession_id
);
...
...
@@ -516,7 +516,7 @@ bool nr_sdap_delete_entity(ue_id_t ue_id, int pdusession_id)
ret
=
true
;
}
}
LOG_
W
(
SDAP
,
"Entity does not exist or it was not found.
\n
"
);
LOG_
E
(
SDAP
,
"Entity does not exist or it was not found.
\n
"
);
return
ret
;
}
...
...
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