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
8ba20100
Commit
8ba20100
authored
Apr 20, 2023
by
Roberto Louro Magueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix reconfigurationWithSync
parent
6cc01f7c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
30 deletions
+24
-30
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+1
-1
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+4
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+19
-29
No files found.
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
8ba20100
...
...
@@ -823,7 +823,7 @@ int nr_rrc_mac_config_req_ue(module_id_t module_id,
mac
->
crnti
=
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
;
LOG_I
(
MAC
,
"Configuring CRNTI %x
\n
"
,
mac
->
crnti
);
nr_ue_
init_mac
(
module_id
);
nr_ue_
mac_default_configs
(
mac
);
if
(
!
get_softmodem_params
()
->
emulate_l1
)
{
mac
->
if_module
->
phy_config_request
(
&
mac
->
phy_config
);
mac
->
phy_config_request_sent
=
true
;
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
8ba20100
...
...
@@ -43,6 +43,10 @@
\param module_id module id */
void
nr_ue_init_mac
(
module_id_t
module_idP
);
/**\brief apply default configuration values in nr_mac instance
\param mac mac instance */
void
nr_ue_mac_default_configs
(
NR_UE_MAC_INST_t
*
mac
);
/**\brief decode mib pdu in NR_UE, from if_module ul_ind with P7 tx_ind message
\param module_id module id
\param cc_id component carrier id
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
8ba20100
...
...
@@ -150,59 +150,49 @@ const initial_pucch_resource_t initial_pucch_resource[16] = {
/* 15 */
{
1
,
0
,
14
,
0
,
4
,
{
0
,
3
,
6
,
9
}
},
};
void
nr_ue_init_mac
(
module_id_t
module_idP
)
{
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_idP
);
// default values as deined in 38.331 sec 9.2.2
LOG_I
(
NR_MAC
,
"[UE%d] Applying default macMainConfig
\n
"
,
module_idP
);
//mac->scheduling_info.macConfig=NULL;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_idP
);
nr_ue_mac_default_configs
(
mac
);
mac
->
first_sync_frame
=
-
1
;
mac
->
sib1_decoded
=
false
;
mac
->
phy_config_request_sent
=
false
;
mac
->
state
=
UE_NOT_SYNC
;
}
void
nr_ue_mac_default_configs
(
NR_UE_MAC_INST_t
*
mac
)
{
// default values as defined in 38.331 sec 9.2.2
mac
->
scheduling_info
.
retxBSR_Timer
=
NR_BSR_Config__retxBSR_Timer_sf10240
;
mac
->
scheduling_info
.
periodicBSR_Timer
=
NR_BSR_Config__periodicBSR_Timer_infinity
;
// mac->scheduling_info.periodicPHR_Timer = NR_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20;
// mac->scheduling_info.prohibitPHR_Timer = NR_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20;
// mac->scheduling_info.PathlossChange_db = NR_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1;
// mac->PHR_state = NR_MAC_MainConfig__phr_Config_PR_setup;
mac
->
scheduling_info
.
SR_COUNTER
=
0
;
mac
->
scheduling_info
.
sr_ProhibitTimer
=
0
;
mac
->
scheduling_info
.
sr_ProhibitTimer_Running
=
0
;
// mac->scheduling_info.maxHARQ_Tx = NR_MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
// mac->scheduling_info.ttiBundling = 0;
// mac->scheduling_info.extendedBSR_Sizes_r10 = 0;
// mac->scheduling_info.extendedPHR_r10 = 0;
// mac->scheduling_info.drx_config = NULL;
// mac->scheduling_info.phr_config = NULL;
// set init value 0xFFFF, make sure periodic timer and retx time counters are NOT active, after bsr transmission set the value configured by the NW.
// set init value 0xFFFF, make sure periodic timer and retx time counters are NOT active, after bsr transmission set the value
// configured by the NW.
mac
->
scheduling_info
.
periodicBSR_SF
=
MAC_UE_BSR_TIMER_NOT_RUNNING
;
mac
->
scheduling_info
.
retxBSR_SF
=
MAC_UE_BSR_TIMER_NOT_RUNNING
;
mac
->
BSR_reporting_active
=
BSR_TRIGGER_NONE
;
// mac->scheduling_info.periodicPHR_SF = nr_get_sf_perioidicPHR_Timer(mac->scheduling_info.periodicPHR_Timer);
// mac->scheduling_info.prohibitPHR_SF = nr_get_sf_prohibitPHR_Timer(mac->scheduling_info.prohibitPHR_Timer);
// mac->scheduling_info.PathlossChange_db = nr_get_db_dl_PathlossChange(mac->scheduling_info.PathlossChange);
// mac->PHR_reporting_active = 0;
for
(
int
i
=
0
;
i
<
NR_MAX_NUM_LCID
;
i
++
)
{
LOG_D
(
NR_MAC
,
"[UE%d] Applying default logical channel config for LCGID %d
\n
"
,
module_idP
,
i
);
LOG_D
(
NR_MAC
,
"Applying default logical channel config for LCGID %d
\n
"
,
i
);
mac
->
scheduling_info
.
Bj
[
i
]
=
-
1
;
mac
->
scheduling_info
.
bucket_size
[
i
]
=
-
1
;
if
(
i
<
UL_SCH_LCID_DTCH
)
{
// initialize all control channels lcgid to 0
if
(
i
<
UL_SCH_LCID_DTCH
)
{
// initialize all control channels lcgid to 0
mac
->
scheduling_info
.
LCGID
[
i
]
=
0
;
}
else
{
// initialize all the data channels lcgid to 1
}
else
{
// initialize all the data channels lcgid to 1
mac
->
scheduling_info
.
LCGID
[
i
]
=
1
;
}
mac
->
scheduling_info
.
LCID_status
[
i
]
=
LCID_EMPTY
;
mac
->
scheduling_info
.
LCID_buffer_remain
[
i
]
=
0
;
for
(
int
i
=
0
;
i
<
NR_MAX_HARQ_PROCESSES
;
i
++
)
mac
->
first_ul_tx
[
i
]
=
1
;
for
(
int
k
=
0
;
k
<
NR_MAX_HARQ_PROCESSES
;
k
++
)
mac
->
first_ul_tx
[
k
]
=
1
;
}
mac
->
first_sync_frame
=
-
1
;
mac
->
sib1_decoded
=
false
;
mac
->
phy_config_request_sent
=
false
;
mac
->
state
=
UE_NOT_SYNC
;
memset
(
&
mac
->
ssb_measurements
,
0
,
sizeof
(
mac
->
ssb_measurements
));
memset
(
&
mac
->
ul_time_alignment
,
0
,
sizeof
(
mac
->
ul_time_alignment
));
}
...
...
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