diff options
author | Max <msuraev@sysmocom.de> | 2019-03-06 18:17:32 +0100 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2019-03-27 12:32:04 +0000 |
commit | 6e96dd4665bf5f287283fbf1087f3d218222ea71 (patch) | |
tree | eb2b470b9987597a245a29b0578a89cd5cfff46a /tests/tbf/TbfTest.cpp | |
parent | 898dddb1d122068700694b59b9261fe07fa9cdef (diff) |
Fix Channel Coding Command for MCS
Previously result of ".to_num() - 1" was used without any checks which
means that in case of to_num() returning zero we would effectively try
to encode (uint8_t)(-1).
Let's fix this by using proper mcs_chan_code() function which returns
Channel Coding Command for MCS without the need to further correct it
and adjust expected tests output accordingly.
Change-Id: I868062a81fffe6714a811c032215f25a79259905
Diffstat (limited to 'tests/tbf/TbfTest.cpp')
-rw-r--r-- | tests/tbf/TbfTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 6dc802cf..151e7fac 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -739,7 +739,7 @@ static gprs_rlcmac_ul_tbf *puan_urbb_len_issue(BTS *the_bts, struct msgb *msg1 = ul_tbf->create_ul_ack(*fn, ts_no); - static uint8_t exp1[] = { 0x40, 0x24, 0x01, 0x3f, 0x3e, 0x24, 0x46, 0x68, 0x90, 0x87, 0xb0, 0x06, + static uint8_t exp1[] = { 0x40, 0x24, 0x01, 0x03, 0x3e, 0x24, 0x46, 0x68, 0x90, 0x87, 0xb0, 0x06, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b }; @@ -766,7 +766,7 @@ static gprs_rlcmac_ul_tbf *puan_urbb_len_issue(BTS *the_bts, msg1 = ul_tbf->create_ul_ack(*fn, ts_no); - static uint8_t exp2[] = { 0x40, 0x24, 0x01, 0x3f, 0x3e, 0x24, 0x46, 0x68, 0x90, 0x88, 0xb0, 0x06, 0x8b, + static uint8_t exp2[] = { 0x40, 0x24, 0x01, 0x03, 0x3e, 0x24, 0x46, 0x68, 0x90, 0x88, 0xb0, 0x06, 0x8b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b }; |