aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-trx/gsm0503_coding.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-01-09 17:53:30 +0100
committerHarald Welte <laforge@gnumonks.org>2016-01-16 17:48:26 +0100
commit6323d2e61707ac96d1f4c5c0218c0efe6c203697 (patch)
tree4efed29e8e3563bb12c08d362bba2911a0c698a0 /src/osmo-bts-trx/gsm0503_coding.c
parent601781f463d0f5798ac27fd90be63d9f15261683 (diff)
use existing #define for FR/EFR frame length (33/31)
Diffstat (limited to 'src/osmo-bts-trx/gsm0503_coding.c')
-rw-r--r--src/osmo-bts-trx/gsm0503_coding.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/osmo-bts-trx/gsm0503_coding.c b/src/osmo-bts-trx/gsm0503_coding.c
index fea25f9c..c56be5a2 100644
--- a/src/osmo-bts-trx/gsm0503_coding.c
+++ b/src/osmo-bts-trx/gsm0503_coding.c
@@ -30,6 +30,7 @@
#include <osmocom/codec/codec.h>
#include <osmo-bts/logging.h>
+#include <osmo-bts/gsm_data.h>
#include "gsm0503_conv.h"
#include "gsm0503_parity.h"
@@ -722,13 +723,13 @@ int tch_fr_decode(uint8_t *tch_data, sbit_t *bursts, int net_order, int efr,
tch_efr_reassemble(tch_data, s);
- len = 31;
+ len = GSM_EFR_BYTES;
} else {
tch_fr_d_to_b(w, d);
tch_fr_reassemble(tch_data, w, net_order);
- len = 33;
+ len = GSM_FR_BYTES;
}
return len;
@@ -741,7 +742,7 @@ int tch_fr_encode(ubit_t *bursts, uint8_t *tch_data, int len, int net_order)
int i;
switch (len) {
- case 31: /* TCH EFR */
+ case GSM_EFR_BYTES: /* TCH EFR */
tch_efr_disassemble(s, tch_data);
@@ -754,7 +755,7 @@ int tch_fr_encode(ubit_t *bursts, uint8_t *tch_data, int len, int net_order)
tch_efr_w_to_d(d, w);
goto coding_efr_fr;
- case 33: /* TCH FR */
+ case GSM_FR_BYTES: /* TCH FR */
tch_fr_disassemble(w, tch_data, net_order);
tch_fr_b_to_d(d, w);