laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/42596?usp=email )

Change subject: osmo-bts-omldummy: properly report NM_ATT_IPACC_SUPP_FEATURES
......................................................................

osmo-bts-omldummy: properly report NM_ATT_IPACC_SUPP_FEATURES

osmo-bts-omldummy is used as the OML backend in the ttcn3-bsc-test.
The common OML code encodes bts->support.* and trx->support.* fields
verbatim into the IPA Supported Features IE (NM_ATT_IPACC_SUPP_FEATURES)
in Get Attributes Responses.  Since bts_model_init() and
bts_model_trx_init() never initialized these fields, they were reported
as all-zeros to osmo-bsc.

osmo-bsc now inspects the supported channel modes before activating a
channel.  An all-zero chan_modes value (present but no bits set) causes
osmo-bsc to reject every speech mode, breaking all assignment-related
TTCN-3 test cases.

Initialize ciphers, gprs_codings, freq_bands, chan_types and chan_modes
to sensible values, matching what osmo-bts-virtual does, so that
osmo-bts-omldummy reports its capabilities correctly.

Change-Id: I7fe83f78c829c300e70a59509847b815a77974d7
Fixes: 0978d1df ("oml: implement handling of NM_ATT_IPACC_SUPP_FEATURES")
Related: OS#6324
---
M src/osmo-bts-omldummy/bts_model.c
1 file changed, 22 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  jolly: Looks good to me, but someone else must approve




diff --git a/src/osmo-bts-omldummy/bts_model.c 
b/src/osmo-bts-omldummy/bts_model.c
index 0690d9d..8abca39 100644
--- a/src/osmo-bts-omldummy/bts_model.c
+++ b/src/osmo-bts-omldummy/bts_model.c
@@ -172,6 +172,9 @@
 int bts_model_init(struct gsm_bts *bts)
 {
        bts->variant = BTS_OSMO_OMLDUMMY;
+       bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3) | 
CIPHER_A5(4);
+       bts->gprs.cell.support.gprs_codings = NM_IPAC_MASK_GPRS_CODING_CS
+                                           | NM_IPAC_MASK_GPRS_CODING_MCS;
        /* order alphabetically */
        osmo_bts_set_feature(bts->features, BTS_FEAT_BCCH_POWER_RED);
        osmo_bts_set_feature(bts->features, BTS_FEAT_CBCH);
@@ -186,6 +189,25 @@
        struct trx_power_params *tpp = &trx->power_params;
        /* Speed up shutdown, we don't care about power ramping in omldummy */
        tpp->ramp.step_interval_sec = 0;
+       /* Frequency bands indicated to the BSC */
+       trx->support.freq_bands = NM_IPAC_F_FREQ_BAND_PGSM
+                               | NM_IPAC_F_FREQ_BAND_EGSM
+                               | NM_IPAC_F_FREQ_BAND_RGSM
+                               | NM_IPAC_F_FREQ_BAND_DCS
+                               | NM_IPAC_F_FREQ_BAND_PCS
+                               | NM_IPAC_F_FREQ_BAND_850
+                               | NM_IPAC_F_FREQ_BAND_480
+                               | NM_IPAC_F_FREQ_BAND_450;
+
+       /* Channel types and modes indicated to the BSC */
+       trx->support.chan_types = NM_IPAC_MASK_CHANT_COMMON
+                               | NM_IPAC_F_CHANT_BCCH_SDCCH4_CBCH
+                               | NM_IPAC_F_CHANT_SDCCH8_CBCH
+                               | NM_IPAC_F_CHANT_PDCHF
+                               | NM_IPAC_F_CHANT_TCHF_PDCHF;
+       trx->support.chan_modes = NM_IPAC_MASK_CHANM_SPEECH
+                               | NM_IPAC_MASK_CHANM_CSD_NT
+                               | NM_IPAC_MASK_CHANM_CSD_T;
        return 0;
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42596?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I7fe83f78c829c300e70a59509847b815a77974d7
Gerrit-Change-Number: 42596
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>

Reply via email to