summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/layer23/src')
-rw-r--r--src/host/layer23/src/mobile/mnccms.c26
-rw-r--r--src/host/layer23/src/mobile/tch_data.c19
2 files changed, 34 insertions, 11 deletions
diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c
index 2a4989d6..67cf5a72 100644
--- a/src/host/layer23/src/mobile/mnccms.c
+++ b/src/host/layer23/src/mobile/mnccms.c
@@ -414,12 +414,28 @@ static int mncc_handle_bcap_speech(const struct gsm_mncc_bearer_cap *bcap,
static int mncc_handle_bcap_data(const struct gsm_mncc_bearer_cap *bcap,
const struct gsm_settings *set)
{
- if (bcap->data.rate_adaption != GSM48_BCAP_RA_V110_X30) {
- LOGP(DMNCC, LOGL_ERROR,
- "%s(): Rate adaption (octet 5) 0x%02x is not supported\n",
- __func__, bcap->data.rate_adaption);
- return -ENOTSUP;
+ switch (bcap->transfer) {
+ case GSM48_BCAP_ITCAP_UNR_DIG_INF:
+ if (bcap->data.rate_adaption != GSM48_BCAP_RA_V110_X30) {
+ LOGP(DMNCC, LOGL_ERROR,
+ "%s(): Rate adaption (octet 5) 0x%02x is not supported\n",
+ __func__, bcap->data.rate_adaption);
+ return -ENOTSUP;
+ }
+ break;
+ case GSM48_BCAP_ITCAP_3k1_AUDIO:
+ case GSM48_BCAP_ITCAP_FAX_G3:
+ if (bcap->data.rate_adaption != GSM48_BCAP_RA_NONE) {
+ LOGP(DMNCC, LOGL_ERROR,
+ "%s(): Rate adaption (octet 5) 0x%02x was expected to be NONE\n",
+ __func__, bcap->data.rate_adaption);
+ return -ENOTSUP;
+ }
+ break;
+ default:
+ break;
}
+
if (bcap->data.sig_access != GSM48_BCAP_SA_I440_I450) {
LOGP(DMNCC, LOGL_ERROR,
"%s(): Signalling access protocol (octet 5) 0x%02x is not supported\n",
diff --git a/src/host/layer23/src/mobile/tch_data.c b/src/host/layer23/src/mobile/tch_data.c
index 06df85f2..c93c8285 100644
--- a/src/host/layer23/src/mobile/tch_data.c
+++ b/src/host/layer23/src/mobile/tch_data.c
@@ -426,8 +426,21 @@ static int tch_data_check_bcap(const struct gsm_mncc_bearer_cap *bcap)
switch (bcap->transfer) {
case GSM48_BCAP_ITCAP_UNR_DIG_INF:
+ if (bcap->data.rate_adaption != GSM48_BCAP_RA_V110_X30) {
+ LOGP(DCSD, LOGL_ERROR,
+ "%s(): Rate adaption (octet 5) 0x%02x is not supported\n",
+ __func__, bcap->data.rate_adaption);
+ return -ENOTSUP;
+ }
+ break;
case GSM48_BCAP_ITCAP_3k1_AUDIO:
case GSM48_BCAP_ITCAP_FAX_G3:
+ if (bcap->data.rate_adaption != GSM48_BCAP_RA_NONE) {
+ LOGP(DCSD, LOGL_ERROR,
+ "%s(): Rate adaption (octet 5) 0x%02x was expected to be NONE\n",
+ __func__, bcap->data.rate_adaption);
+ return -ENOTSUP;
+ }
break;
default:
LOGP(DCSD, LOGL_ERROR,
@@ -436,12 +449,6 @@ static int tch_data_check_bcap(const struct gsm_mncc_bearer_cap *bcap)
return -ENOTSUP;
}
- if (bcap->data.rate_adaption != GSM48_BCAP_RA_V110_X30) {
- LOGP(DCSD, LOGL_ERROR,
- "%s(): Rate adaption (octet 5) 0x%02x is not supported\n",
- __func__, bcap->data.rate_adaption);
- return -ENOTSUP;
- }
if (bcap->data.sig_access != GSM48_BCAP_SA_I440_I450) {
LOGP(DCSD, LOGL_ERROR,
"%s(): Signalling access protocol (octet 5) 0x%02x is not supported\n",