gsm48_ie: fix gsm48_encode_bearer_cap(): encode bcap->data.transp

Currently this function is hard-coding the "Connection element (octet
6c)" (see Table 10.5.101h/3GPP TS 24.008) to "Transparent" (0).  This
breaks non-transparent data calls.

Use the value from bcap->data.transp.  The decoding equivalent of
this function needs no changes, it does populate this field already.

Change-Id: I7339908864e8a2aef6f2b48a108650167e413c7f
Related: OS#6110, OS#4394
This commit is contained in:
Vadim Yanitskiy 2023-07-26 02:32:45 +07:00
parent a2d8bf8acc
commit d0be3909b8
1 changed files with 3 additions and 1 deletions

View File

@ -351,7 +351,9 @@ int gsm48_encode_bearer_cap(struct msgb *msg, int lv_only,
lv[i++] = (bcap->data.parity & 7) |
((bcap->data.interm_rate & 3) << 5);
/* octet 6c */
lv[i] = 0x80 | (bcap->data.modem_type & 0x1f);
lv[i] = 0x80 |
((bcap->data.transp & 3) << 5) |
(bcap->data.modem_type & 0x1f);
break;
default:
return -EINVAL;