mobile: fix rate adaption checking for MO/MT CSD calls
Currently we unconditionally expect the rate adaption (octet 5) in the Bearer Capability IE to be GSM48_BCAP_RA_V110_X30. This is correct for UDI (GSM48_BCAP_ITCAP_UNR_DIG_INF), but not for 3.1 kHz audio (GSM48_BCAP_ITCAP_3k1_AUDIO) and fax (GSM48_BCAP_ITCAP_FAX_G3) calls. For the later two it should be GSM48_BCAP_RA_NONE. Change-Id: I70d36b3540ed2469068e050809a17ed07b434ad7 Related: OS#4396
This commit is contained in:
parent
8fa524c397
commit
4b496a8c1c
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue