Commit 78454311 authored by rmagueta's avatar rmagueta Committed by Robert Schmidt

UE handles handover between gNB-DUs with different carrier frequencies

parent 8e3f6e7f
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "LAYER2/nr_pdcp/nr_pdcp_oai_api.h" #include "LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
#include "LAYER2/nr_rlc/nr_rlc_oai_api.h" #include "LAYER2/nr_rlc/nr_rlc_oai_api.h"
#include "RRC/NR/MESSAGES/asn1_msg.h" #include "RRC/NR/MESSAGES/asn1_msg.h"
#include "PHY/MODULATION/nr_modulation.h"
/* /*
* NR SLOT PROCESSING SEQUENCE * NR SLOT PROCESSING SEQUENCE
...@@ -519,9 +520,17 @@ static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE, const UE_nr_rxtx_proc_t *proc ...@@ -519,9 +520,17 @@ static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE, const UE_nr_rxtx_proc_t *proc
// Start synchronization with a target gNB // Start synchronization with a target gNB
if (UE->synch_request.received_synch_request == 1) { if (UE->synch_request.received_synch_request == 1) {
fapi_nr_synch_request_t *synch_req = &UE->synch_request.synch_req;
if( synch_req->absoluteFrequencySSB != UINT64_MAX) {
UE->frame_parms.dl_CarrierFreq = synch_req->absoluteFrequencySSB;
UE->frame_parms.ul_CarrierFreq = synch_req->absoluteFrequencySSB;
nr_rf_card_config_freq(&openair0_cfg[UE->rf_map.card], UE->frame_parms.dl_CarrierFreq, UE->frame_parms.ul_CarrierFreq, 0);
UE->rfdevice.trx_set_freq_func(&UE->rfdevice, &openair0_cfg[0]);
init_symbol_rotation(&UE->frame_parms);
}
UE->is_synchronized = 0; UE->is_synchronized = 0;
UE->UE_scan_carrier = UE->synch_request.synch_req.ssb_bw_scan; UE->UE_scan_carrier = synch_req->ssb_bw_scan;
UE->target_Nid_cell = UE->synch_request.synch_req.target_Nid_cell; UE->target_Nid_cell = synch_req->target_Nid_cell;
clean_UE_harq(UE); clean_UE_harq(UE);
UE->synch_request.received_synch_request = 0; UE->synch_request.received_synch_request = 0;
} }
......
...@@ -681,6 +681,8 @@ typedef struct ...@@ -681,6 +681,8 @@ typedef struct
} fapi_nr_prach_config_t; } fapi_nr_prach_config_t;
typedef struct { typedef struct {
uint64_t absoluteFrequencySSB;
uint64_t absoluteFrequencyPointA;
int16_t target_Nid_cell; int16_t target_Nid_cell;
bool ssb_bw_scan; bool ssb_bw_scan;
} fapi_nr_synch_request_t; } fapi_nr_synch_request_t;
......
...@@ -1512,6 +1512,22 @@ static void handle_reconfiguration_with_sync(NR_UE_MAC_INST_t *mac, ...@@ -1512,6 +1512,22 @@ static void handle_reconfiguration_with_sync(NR_UE_MAC_INST_t *mac,
} }
if (reconfigurationWithSync->spCellConfigCommon) { if (reconfigurationWithSync->spCellConfigCommon) {
if (reconfigurationWithSync->spCellConfigCommon->downlinkConfigCommon && reconfigurationWithSync->spCellConfigCommon->downlinkConfigCommon->frequencyInfoDL) {
struct NR_FrequencyInfoDL *frequencyInfoDL = reconfigurationWithSync->spCellConfigCommon->downlinkConfigCommon->frequencyInfoDL;
mac->synch_request.synch_req.absoluteFrequencySSB = from_nrarfcn(*frequencyInfoDL->frequencyBandList.list.array[0],
frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
*frequencyInfoDL->absoluteFrequencySSB);
mac->synch_request.synch_req.absoluteFrequencyPointA = from_nrarfcn(*frequencyInfoDL->frequencyBandList.list.array[0],
frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
frequencyInfoDL->absoluteFrequencyPointA);
} else {
// UINT64_MAX is an invalid value
mac->synch_request.synch_req.absoluteFrequencySSB = UINT64_MAX;
mac->synch_request.synch_req.absoluteFrequencyPointA = UINT64_MAX;
}
NR_ServingCellConfigCommon_t *scc = reconfigurationWithSync->spCellConfigCommon; NR_ServingCellConfigCommon_t *scc = reconfigurationWithSync->spCellConfigCommon;
if (scc->physCellId) if (scc->physCellId)
mac->physCellId = *scc->physCellId; mac->physCellId = *scc->physCellId;
......
...@@ -29,10 +29,10 @@ gNBs = ...@@ -29,10 +29,10 @@ gNBs =
# downlinkConfigCommon # downlinkConfigCommon
#frequencyInfoDL #frequencyInfoDL
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP) # this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 641280; absoluteFrequencySSB = 630048;
dl_frequencyBand = 78; dl_frequencyBand = 78;
# this is 3600 MHz # this is 3600 MHz
dl_absoluteFrequencyPointA = 640008; dl_absoluteFrequencyPointA = 628776;
#scs-SpecificCarrierList #scs-SpecificCarrierList
dl_offstToCarrier = 0; dl_offstToCarrier = 0;
# subcarrierSpacing # subcarrierSpacing
......
...@@ -29,10 +29,10 @@ gNBs = ...@@ -29,10 +29,10 @@ gNBs =
# downlinkConfigCommon # downlinkConfigCommon
#frequencyInfoDL #frequencyInfoDL
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP) # this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 641280; absoluteFrequencySSB = 643296;
dl_frequencyBand = 78; dl_frequencyBand = 78;
# this is 3600 MHz # this is 3600 MHz
dl_absoluteFrequencyPointA = 640008; dl_absoluteFrequencyPointA = 642024;
#scs-SpecificCarrierList #scs-SpecificCarrierList
dl_offstToCarrier = 0; dl_offstToCarrier = 0;
# subcarrierSpacing # subcarrierSpacing
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment