diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2018-01-25 18:59:42 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-02-19 08:38:21 +0000 |
commit | bf1fea0928183f51e994c3f2b0e0f0ca831fd7b8 (patch) | |
tree | e52f155143772553ddd2006e00dc4e43072cab94 /src/osmo-bts-octphy | |
parent | efa55a454174da12a44c750377b3605d9bfbf7ef (diff) |
rsl: do not allow MODE MODIFY request with unsupp. codec/rate
When the BSC sends a MODE MODIFY request with an unsupported
codec, the BTS must respond with a negative acknowledge.
Currently the codec parameter is not checked at all, which may
lead into malfunction or crash of the BTS.
- Introduce a mechanism to check the codec/rate against a
table that is set up in the phy specific code.
- Add tables with supported codec/rate combinations for
octphy, sysmobts, and trx.
Change-Id: Id9b222b7ab19ece90591718bc562b3a8c5e02023
Related: SYS#3212
Diffstat (limited to 'src/osmo-bts-octphy')
-rw-r--r-- | src/osmo-bts-octphy/l1_if.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index fce34841..dde993d5 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -76,6 +76,14 @@ /* timeout until which we expect PHY to respond */ #define CMD_TIMEOUT 5 +/* Table with channel rate / and codec configuration that are supported + * by the hardware bts_supports_cm() */ +static const struct bts_cm bts_model_supported_cm[] = { + { GSM_PCHAN_TCH_F, GSM48_CMODE_SPEECH_V1}, + { GSM_PCHAN_TCH_H, GSM48_CMODE_SPEECH_V1}, + { _GSM_PCHAN_MAX, 0 } +}; + /* allocate a msgb for a Layer1 primitive */ struct msgb *l1p_msgb_alloc(void) { @@ -776,6 +784,7 @@ int bts_model_init(struct gsm_bts *bts) bts->variant = BTS_OSMO_OCTPHY; btsb = bts_role_bts(bts); btsb->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3); + btsb->support.cm = bts_model_supported_cm; /* FIXME: what is the nominal transmit power of the PHY/board? */ bts->c0->nominal_power = 15; |