refactor: Use centralized get_sdap_Config in nr_reconfigure_sdap_entity
Replace inline parameter extraction with get_sdap_Config() function call to: - Eliminate code duplication in SDAP configuration handling - Streamline QFI release processing with structured config object - Ensure consistent SDAP configuration extraction across all SDAP operations
This commit is contained in:
@@ -704,26 +704,19 @@ void nr_reconfigure_sdap_entity(NR_SDAP_Config_t *sdap_config, ue_id_t ue_id, in
|
||||
ue_id,
|
||||
pdusession_id);
|
||||
/* QFI to DRB mapping */
|
||||
NR_QFI_t *mappedQFIs2Add = (NR_QFI_t *)sdap_config->mappedQoS_FlowsToAdd->list.array[0];
|
||||
uint8_t mappedQFIs2AddCount = sdap_config->mappedQoS_FlowsToAdd->list.count;
|
||||
bool has_sdap_rx = is_sdap_rx(is_gnb, sdap_config);
|
||||
bool has_sdap_tx = is_sdap_tx(is_gnb, sdap_config);
|
||||
sdap_config_t sdap = get_sdap_Config(is_gnb, sdap_config, drb_id);
|
||||
nr_sdap_ue_qfi2drb_config(sdap_entity,
|
||||
sdap_entity->default_drb,
|
||||
ue_id,
|
||||
mappedQFIs2Add,
|
||||
mappedQFIs2AddCount,
|
||||
sdap.mappedQFIs2Add,
|
||||
sdap.mappedQFIs2AddCount,
|
||||
drb_id,
|
||||
has_sdap_rx,
|
||||
has_sdap_tx);
|
||||
sdap.sdap_rx,
|
||||
sdap.sdap_tx);
|
||||
/* handle QFIs to DRB mapping rule to release */
|
||||
if (sdap_config->mappedQoS_FlowsToRelease) {
|
||||
NR_QFI_t *mappedQFIs2release = (NR_QFI_t *)sdap_config->mappedQoS_FlowsToRelease->list.array[0];
|
||||
uint8_t mappedQFIs2RemoveCount = sdap_config->mappedQoS_FlowsToRelease->list.count;
|
||||
for(int i = 0; i < mappedQFIs2RemoveCount; i++){
|
||||
uint8_t qfi = mappedQFIs2release[i];
|
||||
sdap_entity->qfi2drb_map_delete(sdap_entity, qfi);
|
||||
}
|
||||
for (int i = 0; i < sdap.mappedQFIs2ReleaseCount; i++) {
|
||||
uint8_t qfi = sdap.mappedQFIs2Release[i];
|
||||
sdap_entity->qfi2drb_map_delete(sdap_entity, qfi);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user