fix BWP switching
Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
This commit is contained in:
co-authored by
Luis Pereira
parent
21722a9fa1
commit
e74792586f
@@ -3933,7 +3933,8 @@ void nr_mac_trigger_reconfiguration(const gNB_MAC_INST *nrmac, NR_UE_info_t *UE,
|
||||
buf,
|
||||
sizeof(buf));
|
||||
AssertFatal(enc_rval.encoded > 0, "ASN1 encoding of CellGroupConfig failed, failed type %s\n", enc_rval.failed_type->name);
|
||||
UE->reestablish_rlc = true;
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, UE->reconfigCellGroup);
|
||||
UE->reconfigCellGroup = cellGroup_for_UE;
|
||||
du_to_cu_rrc_information_t du2cu = {
|
||||
.cellGroupConfig = buf,
|
||||
.cellGroupConfig_length = (enc_rval.encoded + 7) >> 3,
|
||||
@@ -3947,8 +3948,6 @@ void nr_mac_trigger_reconfiguration(const gNB_MAC_INST *nrmac, NR_UE_info_t *UE,
|
||||
.cause_value = F1AP_CauseRadioNetwork_action_desirable_for_radio_reasons,
|
||||
};
|
||||
nrmac->mac_rrc.ue_context_modification_required(&required);
|
||||
if (cellGroup_for_UE)
|
||||
free_cellGroupConfig(cellGroup_for_UE);
|
||||
}
|
||||
|
||||
long get_lcid_from_drbid(int drb_id)
|
||||
|
||||
@@ -3813,14 +3813,12 @@ NR_CellGroupConfig_t *update_cellGroupConfig_for_BWP_switch(NR_CellGroupConfig_t
|
||||
|
||||
// we temporarily need to keep both the old and the new BWP in the CG used by the gNB
|
||||
// while removing the old from the CG sent to the UE
|
||||
if (old_bwp > 0) {
|
||||
NR_CellGroupConfig_t *clone_cg = NULL;
|
||||
const int copy_result = asn_copy(&asn_DEF_NR_CellGroupConfig, (void **)&clone_cg, cellGroupConfig);
|
||||
AssertFatal(copy_result == 0, "unable to copy NR_CellGroupConfig for cloning\n");
|
||||
NR_CellGroupConfig_t *clone_cg = NULL;
|
||||
const int copy_result = asn_copy(&asn_DEF_NR_CellGroupConfig, (void **)&clone_cg, cellGroupConfig);
|
||||
AssertFatal(copy_result == 0, "unable to copy NR_CellGroupConfig for cloning\n");
|
||||
if (old_bwp > 0)
|
||||
clean_bwp_structures(clone_cg->spCellConfig);
|
||||
return clone_cg;
|
||||
}
|
||||
return NULL;
|
||||
return clone_cg;
|
||||
}
|
||||
|
||||
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
@@ -3933,11 +3931,6 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
}
|
||||
}
|
||||
|
||||
void free_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig)
|
||||
{
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, cellGroupConfig);
|
||||
}
|
||||
|
||||
int encode_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, uint8_t *buffer, int max_buffer_size)
|
||||
{
|
||||
asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, NULL, cellGroupConfig, buffer, max_buffer_size);
|
||||
|
||||
@@ -96,7 +96,6 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
const NR_UE_NR_Capability_t *uecap,
|
||||
const nr_mac_config_t *configuration,
|
||||
const NR_ServingCellConfigCommon_t *scc);
|
||||
void free_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig);
|
||||
int encode_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, uint8_t *buffer, int max_buffer_size);
|
||||
NR_CellGroupConfig_t *decode_cellGroupConfig(const uint8_t *buffer, int max_buffer_size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user