diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2023-07-26 02:32:45 +0700 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2023-07-26 02:32:49 +0700 |
commit | d0be3909b88095717271631e957d8a4c13089cd1 (patch) | |
tree | af93099b7e44b04b7f18d52d1df4c08812dc897e /src/gsm | |
parent | a2d8bf8acc618fc27b7301cbc9cf5dfa4411ed5d (diff) |
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
Diffstat (limited to 'src/gsm')
-rw-r--r-- | src/gsm/gsm48_ie.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index e431e4f8..0cdcb7ca 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -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; |