- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly
For automated changes based on OAI PL v1.1:
perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml
The rest (cmake, files with missing license, cmake) manually.
50 lines
2.2 KiB
C
50 lines
2.2 KiB
C
/*
|
|
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
|
|
*/
|
|
|
|
#include "openair2/GNB_APP/gnb_config_common.h"
|
|
#include "common/config/config_paramdesc.h"
|
|
#include "common/config/config_userapi.h"
|
|
#include "RRC_nr_paramsvalues.h"
|
|
#include "gnb_paramdef.h"
|
|
#include "sctp_default_values.h"
|
|
|
|
uint16_t set_snssai_config(nssai_t *nssai, const int max_num_ssi, uint8_t k, uint8_t l)
|
|
{
|
|
char snssaistr[MAX_OPTNAME_SIZE * 2 + 8];
|
|
snprintf(snssaistr, sizeof(snssaistr), "%s.[%i].%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, k, GNB_CONFIG_STRING_PLMN_LIST, l);
|
|
GET_PARAMS_LIST(SNSSAIParamList,
|
|
SNSSAIParams,
|
|
GNBSNSSAIPARAMS_DESC,
|
|
GNB_CONFIG_STRING_SNSSAI_LIST,
|
|
snssaistr,
|
|
SNSSAIPARAMS_CHECK);
|
|
uint16_t num_ssi = SNSSAIParamList.numelt;
|
|
AssertFatal(num_ssi < max_num_ssi, "S-NSSAI size %d exceeds the max array size %d", num_ssi, max_num_ssi);
|
|
for (int s = 0; s < num_ssi; ++s) {
|
|
nssai[s].sst = *SNSSAIParamList.paramarray[s][GNB_SLICE_SERVICE_TYPE_IDX].uptr;
|
|
// SD is optional
|
|
// 0xffffff is "no SD", see 23.003 Sec 28.4.2
|
|
nssai[s].sd = *SNSSAIParamList.paramarray[s][GNB_SLICE_DIFFERENTIATOR_IDX].uptr;
|
|
AssertFatal(nssai[s].sd <= 0xffffff, "SD cannot be bigger than 0xffffff, but is %d\n", nssai[s].sd);
|
|
}
|
|
return num_ssi;
|
|
}
|
|
|
|
uint8_t set_plmn_config(plmn_id_t *p, uint8_t idx)
|
|
{
|
|
char gnbpath[MAX_OPTNAME_SIZE * 2 + 8];
|
|
snprintf(gnbpath, sizeof(gnbpath), "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, idx);
|
|
GET_PARAMS_LIST(PLMNParamList, PLMNParams, GNBPLMNPARAMS_DESC, GNB_CONFIG_STRING_PLMN_LIST, gnbpath, PLMNPARAMS_CHECK);
|
|
uint8_t num_plmn = PLMNParamList.numelt;
|
|
AssertFatal(num_plmn >= 1 && num_plmn <= 6, "The number of PLMN IDs must be in [1,6], but is %d\n", num_plmn);
|
|
for (int l = 0; l < num_plmn; ++l) {
|
|
plmn_id_t *plmn = &p[l];
|
|
plmn->mcc = *PLMNParamList.paramarray[l][GNB_MOBILE_COUNTRY_CODE_IDX].uptr;
|
|
plmn->mnc = *PLMNParamList.paramarray[l][GNB_MOBILE_NETWORK_CODE_IDX].uptr;
|
|
plmn->mnc_digit_length = *PLMNParamList.paramarray[l][GNB_MNC_DIGIT_LENGTH].u8ptr;
|
|
AssertFatal((plmn->mnc_digit_length == 2) || (plmn->mnc_digit_length == 3), "BAD MNC DIGIT LENGTH %d", plmn->mnc_digit_length);
|
|
}
|
|
return num_plmn;
|
|
}
|