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
ae21d9a9
Commit
ae21d9a9
authored
Jun 05, 2024
by
Florian Kaltenberger
Committed by
Florian Kaltenberger
Jun 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storing relevant measurement request paramters properly in MAC
parent
7af01ea5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
69 deletions
+74
-69
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c
+25
-51
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+10
-13
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
+26
-4
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+13
-1
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c
View file @
ae21d9a9
...
...
@@ -694,11 +694,13 @@ void nr_schedule_srs(int module_id, frame_t frame, int slot)
*********************************************************************/
void
nr_schedule_srs_secondary
(
int
module_id
,
frame_t
frame
,
int
slot
)
{
if
(
RC
.
nrmac
[
module_id
]
->
do_srs_meas
==
0
)
return
;
const
int
CC_id
=
0
;
// lets configure SRS on the initial BWP. This will only work for cell sizes of 60MHz or lower.
// for anything else this needs to be adapted to use the dedicated BWP.
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
module_id
]
->
common_channels
[
CC_id
].
ServingCellConfigCommon
;
//NR_SRS_Config_t *srs_config = RC.nrmac[module_id]->setup_srs_config[0]->choice.setup;
...
...
@@ -707,35 +709,8 @@ void nr_schedule_srs_secondary(int module_id, frame_t frame, int slot) {
return
;
}
f1ap_measurement_req_t
*
f1ap_meas_req
=
RC
.
nrmac
[
module_id
]
->
f1ap_meas_req
;
if
(
!
f1ap_meas_req
)
{
LOG_D
(
MAC
,
"No F1AP Measurement Request, skipping SRS measurement
\n
"
);
return
;
}
LOG_D
(
MAC
,
"Got F1AP Measurement Request, programming SRS measurement
\n
"
);
f1ap_srs_configuration_t
*
srs_configuration
=
&
f1ap_meas_req
->
srs_configuration
;
if
(
!
srs_configuration
)
{
LOG_I
(
MAC
,
"no srs configuration in F1AP measurement reuqest, skipping
\n
"
);
return
;
}
for
(
int
srs_idx
=
0
;
srs_idx
<
srs_configuration
->
srs_carrier_list
.
srs_carrier_list_length
;
srs_idx
++
)
{
f1ap_srs_config_t
*
sRSConfig
=
&
srs_configuration
->
srs_carrier_list
.
srs_carrier_list_item
[
srs_idx
].
active_ul_bwp
.
sRSConfig
;
if
(
sRSConfig
->
sRSResource_List
.
srs_resource_list_length
!=
1
||
sRSConfig
->
sRSResourceSet_List
.
srs_resource_set_list_length
!=
1
)
{
LOG_I
(
MAC
,
"Need exactly 1 SRS Resoure and 1 SRS Resource set in F1AP measurment request
\n
"
);
return
;
}
f1ap_srs_resource_t
*
srs_resource
=
sRSConfig
->
sRSResource_List
.
srs_resource
;
f1ap_srs_resource_set_t
*
srs_resource_set
=
sRSConfig
->
sRSResourceSet_List
.
srs_resource_set
;
if
(
srs_resource
==
NULL
||
srs_resource_set
==
NULL
)
{
LOG_I
(
MAC
,
"SRS resource or resource set is Null
\n
"
);
return
;
}
f1ap_srs_resource_t
*
srs_resource
=
&
RC
.
nrmac
[
module_id
]
->
srs_resource
;
f1ap_srs_resource_set_t
*
srs_resource_set
=
&
RC
.
nrmac
[
module_id
]
->
srs_resource_set
;
NR_BWP_t
ubwp
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
;
...
...
@@ -758,7 +733,6 @@ void nr_schedule_srs_secondary(int module_id, frame_t frame, int slot) {
if
(
(
frame
*
n_slots_frame
+
slot
)
%
period
==
offset
)
{
LOG_I
(
NR_MAC
,
"Scheduling non-ue associated SRS measurement for %d.%d
\n
"
,
frame
,
offset
%
n_slots_frame
);
nr_fill_nfapi_srs
(
module_id
,
CC_id
,
&
dummy_ue_info
,
frame
,
offset
%
n_slots_frame
,
srs_resource_set
,
srs_resource
,
1
);
//RC.nrmac[module_id]->f1ap_meas_req = NULL;
}
RC
.
nrmac
[
module_id
]
->
do_srs_meas
=
0
;
}
}
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
ae21d9a9
...
...
@@ -1262,21 +1262,18 @@ void handle_nr_srs_measurements(const module_id_t module_id,
}
}
f1ap_measurement_req_t
*
req
=
nrmac
->
f1ap_meas_req
;
/* response has same type as request... */
f1ap_measurement_resp_t
resp
=
{
.
transaction_id
=
req
->
transaction_id
,
.
lmf_measurement_id
=
req
->
lmf_measurement_id
,
.
ran_measurement_id
=
req
->
ran_measurement_id
,
.
nrppa_msg_info
.
nrppa_transaction_id
=
req
->
nrppa_msg_info
.
nrppa_transaction_id
,
.
nrppa_msg_info
.
instance
=
req
->
nrppa_msg_info
.
instance
,
.
nrppa_msg_info
.
gNB_ue_ngap_id
=
req
->
nrppa_msg_info
.
gNB_ue_ngap_id
,
.
nrppa_msg_info
.
amf_ue_ngap_id
=
req
->
nrppa_msg_info
.
amf_ue_ngap_id
,
.
nrppa_msg_info
.
ue_rnti
=
req
->
nrppa_msg_info
.
ue_rnti
,
.
nrppa_msg_info
.
routing_id_buffer
=
req
->
nrppa_msg_info
.
routing_id_buffer
,
.
nrppa_msg_info
.
routing_id_length
=
req
->
nrppa_msg_info
.
routing_id_length
,
.
transaction_id
=
nrmac
->
f1ap_meas_resp_header
.
transaction_id
,
.
lmf_measurement_id
=
nrmac
->
f1ap_meas_resp_header
.
lmf_measurement_id
,
.
ran_measurement_id
=
nrmac
->
f1ap_meas_resp_header
.
ran_measurement_id
,
.
nrppa_msg_info
.
nrppa_transaction_id
=
nrmac
->
nrppa_msg_info
.
nrppa_transaction_id
,
.
nrppa_msg_info
.
instance
=
nrmac
->
nrppa_msg_info
.
instance
,
.
nrppa_msg_info
.
gNB_ue_ngap_id
=
nrmac
->
nrppa_msg_info
.
gNB_ue_ngap_id
,
.
nrppa_msg_info
.
amf_ue_ngap_id
=
nrmac
->
nrppa_msg_info
.
amf_ue_ngap_id
,
.
nrppa_msg_info
.
ue_rnti
=
nrmac
->
nrppa_msg_info
.
ue_rnti
,
.
nrppa_msg_info
.
routing_id_buffer
=
nrmac
->
nrppa_msg_info
.
routing_id_buffer
,
.
nrppa_msg_info
.
routing_id_length
=
nrmac
->
nrppa_msg_info
.
routing_id_length
,
};
...
...
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
View file @
ae21d9a9
...
...
@@ -826,13 +826,35 @@ void positioning_measurement_request(const f1ap_measurement_req_t *req)
AssertFatal
(
false
,
"Not implemented
\n
"
);
}
gNB_MAC_INST
*
mac
=
RC
.
nrmac
[
req
->
nrppa_msg_info
.
instance
];
//store SRS config from measurement in MAC
f1ap_srs_configuration_t
*
srs_configuration
=
&
req
->
srs_configuration
;
if
(
!
srs_configuration
)
{
LOG_I
(
MAC
,
"no srs configuration in F1AP measurement reuqest, skipping
\n
"
);
return
;
}
if
(
srs_configuration
->
srs_carrier_list
.
srs_carrier_list_length
!=
1
)
{
LOG_I
(
MAC
,
"expecting exactly 1 item in srs carrier list, skipping
\n
"
);
}
//store the whole measurement request (incl SRS config) from measurement in MAC
//TODO: we have to copy the whole memory of this nested structure
mac
->
f1ap_meas_req
=
req
;
f1ap_srs_config_t
*
sRSConfig
=
&
srs_configuration
->
srs_carrier_list
.
srs_carrier_list_item
[
0
].
active_ul_bwp
.
sRSConfig
;
if
(
sRSConfig
->
sRSResource_List
.
srs_resource_list_length
!=
1
||
sRSConfig
->
sRSResourceSet_List
.
srs_resource_set_list_length
!=
1
)
{
LOG_I
(
MAC
,
"Need exactly 1 SRS Resoure and 1 SRS Resource set in F1AP measurment request
\n
"
);
return
;
}
gNB_MAC_INST
*
mac
=
RC
.
nrmac
[
req
->
nrppa_msg_info
.
instance
];
mac
->
srs_resource
=
*
sRSConfig
->
sRSResource_List
.
srs_resource
;
mac
->
srs_resource_set
=
*
sRSConfig
->
sRSResourceSet_List
.
srs_resource_set
;
mac
->
f1ap_meas_resp_header
.
transaction_id
=
req
->
transaction_id
;
mac
->
f1ap_meas_resp_header
.
lmf_measurement_id
=
req
->
lmf_measurement_id
;
mac
->
f1ap_meas_resp_header
.
ran_measurement_id
=
req
->
ran_measurement_id
;
mac
->
nrppa_msg_info
=
req
->
nrppa_msg_info
;
mac
->
do_srs_meas
=
1
;
}
void
positioning_measurement_update
(
const
f1ap_measurement_update_t
*
update
)
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
ae21d9a9
...
...
@@ -683,6 +683,12 @@ typedef struct nr_mac_rrc_ul_if_s {
positioning_measurement_failure_indication_func_t
positioning_measurement_failure_indication
;
}
nr_mac_rrc_ul_if_t
;
typedef
struct
{
uint8_t
transaction_id
;
// IE 9.3.1.23 (M)
uint16_t
lmf_measurement_id
;
// (M)
uint16_t
ran_measurement_id
;
// (M)
}
f1ap_meas_resp_header_t
;
typedef
struct
{
uint8_t
pos_report_characteristics
;
// (M) // ondemand = 0, periodic = 1
uint8_t
pos_measurement_periodicity
;
//(C) if report characteristics periodic ms120=0, ms240=1, ms480=2, ms640=3, ms1024=4, ms20
...
...
@@ -863,7 +869,13 @@ typedef struct gNB_MAC_INST_s {
pthread_mutex_t
sched_lock
;
//holds the SRS config for NRPPa measurement request
f1ap_measurement_req_t
*
f1ap_meas_req
;
//f1ap_measurement_req_t *f1ap_meas_req;
uint8_t
do_srs_meas
;
f1ap_srs_resource_t
srs_resource
;
f1ap_srs_resource_set_t
srs_resource_set
;
f1ap_meas_resp_header_t
f1ap_meas_resp_header
;
nrppa_f1ap_info_t
nrppa_msg_info
;
//holds measurement response (non-ue associated)
NR_meas_pos_t
meas_pos_info
;
}
gNB_MAC_INST
;
...
...
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