Merge remote-tracking branch 'origin/band_number_improv' into integration_2026_w09 (!3943)

Remove L1 dependence from NR band number

L1 band information relied on get_band function that couldn't provide an
unambiguous result. Also there is no SCF compliant parameter for L1 and
generally we don't really need that information in L1.

The MR also remove a RU section that used nr_band but was never really
accessed in NR.
This commit is contained in:
Robert Schmidt
2026-02-26 08:42:16 +01:00
27 changed files with 142 additions and 574 deletions
+2
View File
@@ -229,6 +229,7 @@ static void config_common_ue_sa(NR_UE_MAC_INST_t *mac, NR_ServingCellConfigCommo
cfg->ssb_table.ssb_offset_point_a = frequencyInfoDL->offsetToPointA;
cfg->ssb_table.ssb_period = scc->ssb_PeriodicityServingCell;
cfg->ssb_table.ssb_subcarrier_offset = mac->ssb_subcarrier_offset;
cfg->ssb_table.ssb_case = set_ssb_case(mac->numerology, mac->nr_band);
if (mac->frequency_range == FR1){
cfg->ssb_table.ssb_mask_list[0].ssb_mask = ((uint32_t) scc->ssb_PositionsInBurst.inOneGroup.buf[0]) << 24;
@@ -546,6 +547,7 @@ static void config_common_ue(NR_UE_MAC_INST_t *mac, NR_ServingCellConfigCommon_t
cfg->ssb_table.ssb_period = *scc->ssb_periodicityServingCell;
// NSA -> take ssb offset from SCS
cfg->ssb_table.ssb_subcarrier_offset = absolute_diff % (12 * scs_scaling);
cfg->ssb_table.ssb_case = set_ssb_case(*scc->ssbSubcarrierSpacing, mac->nr_band);
}
switch (scc->ssb_PositionsInBurst->present) {
+3 -4
View File
@@ -126,9 +126,9 @@ static void sl_prepare_phy_config(int module_id,
AssertFatal(SSB_ARFCN, "sl_AbsoluteFrequencySSB cannot be 0\n");
LOG_I(NR_MAC, "SIDELINK CONFIGs: AbsFreqSSB:%d, AbsFreqPointA:%d, SL band:%d\n",
SSB_ARFCN,pointA_ARFCN, sl_band);
LOG_I(NR_MAC, "SIDELINK CONFIGs: AbsFreqSSB:%d, AbsFreqPointA:%d, SL band:%d\n", SSB_ARFCN, pointA_ARFCN, sl_band);
phycfg->sl_carrier_config.band = sl_band;
//FREQSHIFT_7P5KHZ is DISABLED
phycfg->sl_carrier_config.sl_frequency_shift_7p5khz = 0;
phycfg->sl_carrier_config.sl_value_N = freqcfg->valueN_r16;
@@ -141,8 +141,7 @@ static void sl_prepare_phy_config(int module_id,
int bw_index = get_supported_band_index(carriercfg->subcarrierSpacing, FR1, carriercfg->carrierBandwidth);
phycfg->sl_carrier_config.sl_bandwidth = get_supported_bw_mhz(FR1, bw_index);
phycfg->sl_carrier_config.sl_frequency =
from_nrarfcn(sl_band,carriercfg->subcarrierSpacing,pointA_ARFCN); // freq in kHz
phycfg->sl_carrier_config.sl_frequency = from_nrarfcn(sl_band, carriercfg->subcarrierSpacing, pointA_ARFCN); // freq in kHz
phycfg->sl_carrier_config.sl_grid_size = carriercfg->carrierBandwidth;
//For sidelink offset to carrier is 0. hence not used
+12 -8
View File
@@ -397,8 +397,9 @@ static void config_common(gNB_MAC_INST *nrmac, const nr_mac_config_t *config, NR
nrmac->common_channels[0].ServingCellConfigCommon = scc;
// Carrier configuration
struct NR_FrequencyInfoDL *frequencyInfoDL = scc->downlinkConfigCommon->frequencyInfoDL;
frequency_range_t frequency_range = get_freq_range_from_band(*frequencyInfoDL->frequencyBandList.list.array[0]);
NR_FrequencyInfoDL_t *frequencyInfoDL = scc->downlinkConfigCommon->frequencyInfoDL;
NR_FreqBandIndicatorNR_t nr_band = *frequencyInfoDL->frequencyBandList.list.array[0];
frequency_range_t frequency_range = get_freq_range_from_band(nr_band);
int bw_index = get_supported_band_index(frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
frequency_range,
frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth);
@@ -406,7 +407,7 @@ static void config_common(gNB_MAC_INST *nrmac, const nr_mac_config_t *config, NR
cfg->carrier_config.dl_bandwidth.tl.tag = NFAPI_NR_CONFIG_DL_BANDWIDTH_TAG; // temporary
cfg->num_tlv++;
cfg->carrier_config.dl_frequency.value = from_nrarfcn(*frequencyInfoDL->frequencyBandList.list.array[0],
cfg->carrier_config.dl_frequency.value = from_nrarfcn(nr_band,
*scc->ssbSubcarrierSpacing,
frequencyInfoDL->absoluteFrequencyPointA)
/ 1000; // freq in kHz
@@ -462,8 +463,7 @@ static void config_common(gNB_MAC_INST *nrmac, const nr_mac_config_t *config, NR
}
}
NR_FreqBandIndicatorNR_t band = *frequencyInfoDL->frequencyBandList.list.array[0];
frame_type_t frame_type = get_frame_type(band, *scc->ssbSubcarrierSpacing);
frame_type_t frame_type = get_frame_type(nr_band, *scc->ssbSubcarrierSpacing);
nrmac->common_channels[0].frame_type = frame_type;
// Cell configuration
@@ -508,7 +508,7 @@ static void config_common(gNB_MAC_INST *nrmac, const nr_mac_config_t *config, NR
else {
// If absent, use SCS as derived from the prach-ConfigurationIndex (for 839)
int config_index = rach_ConfigCommon->rach_ConfigGeneric.prach_ConfigurationIndex;
int frame_type = get_frame_type(band, frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing);
int frame_type = get_frame_type(nr_band, frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing);
int format = get_nr_prach_format_from_index(config_index, UL_pointA, frame_type) & 0xff;
cfg->prach_config.prach_sub_c_spacing.value = get_delta_f_RA_long(format);
}
@@ -606,6 +606,10 @@ static void config_common(gNB_MAC_INST *nrmac, const nr_mac_config_t *config, NR
cfg->ssb_table.ssb_subcarrier_offset.tl.tag = NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG;
cfg->num_tlv++;
cfg->ssb_table.case_v3.value = set_ssb_case(*scc->ssbSubcarrierSpacing, nr_band);
cfg->ssb_table.case_v3.tl.tag = NFAPI_NR_FAPI_SSB_CASE_VENDOR_EXTENSION_TAG;
cfg->num_tlv++;
uint8_t *mib_payload = nrmac->common_channels[0].MIB_pdu;
uint32_t mib = (mib_payload[2] << 16) | (mib_payload[1] << 8) | mib_payload[0];
cfg->ssb_table.MIB.tl.tag = NFAPI_NR_CONFIG_MIB_TAG;
@@ -742,7 +746,7 @@ static void config_common(gNB_MAC_INST *nrmac, const nr_mac_config_t *config, NR
carr_ul - carr_dl,
bw,
mu,
band,
nr_band,
12 * prb_offset + sc_offset,
get_softmodem_params()->threequarter_fs ? "-E" : "");
} else {
@@ -751,7 +755,7 @@ static void config_common(gNB_MAC_INST *nrmac, const nr_mac_config_t *config, NR
carr_dl,
bw,
mu,
band,
nr_band,
12 * prb_offset + sc_offset,
get_softmodem_params()->threequarter_fs ? "-E" : "");
}