diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-01-09 18:19:32 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-01-16 17:48:57 +0100 |
commit | 773ab8b2c52d0145561e113e8af7bb839bbe4749 (patch) | |
tree | d01b86db50d45fbadc749d6617ad63bcdd923b5e /src/osmo-bts-trx | |
parent | 69ace680dd6edf424389ed1b092faac6a81d900e (diff) |
TRX: replace some more 2715648 magic numbers with GSM_HYPERFRAME
Diffstat (limited to 'src/osmo-bts-trx')
-rw-r--r-- | src/osmo-bts-trx/scheduler.c | 3 | ||||
-rw-r--r-- | src/osmo-bts-trx/trx_if.c | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/osmo-bts-trx/scheduler.c b/src/osmo-bts-trx/scheduler.c index d1ed0556..44ed5659 100644 --- a/src/osmo-bts-trx/scheduler.c +++ b/src/osmo-bts-trx/scheduler.c @@ -46,9 +46,6 @@ #include "amr.h" #include "loops.h" -#define GSM_SUPERFRAME (26*51) /* 1326 TDMA frames */ -#define GSM_HYPERFRAME (2048*GSM_SUPERFRAME) /* GSM_HYPERFRAME frames */ - /* Enable this to multiply TOA of RACH by 10. * This is usefull to check tenth of timing advances with RSSI test tool. * Note that regular phones will not work when using this test! */ diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 69ad8415..419fea64 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -139,8 +139,8 @@ static int trx_clk_read_cb(struct osmo_fd *ofd, unsigned int what) sscanf(buf, "IND CLOCK %u", &fn); LOGP(DTRX, LOGL_INFO, "Clock indication: fn=%u\n", fn); - if (fn >= 2715648) { - fn %= 2715648; + if (fn >= GSM_HYPERFRAME) { + fn %= GSM_HYPERFRAME; LOGP(DTRX, LOGL_ERROR, "Indicated clock's FN is not wrapping " "correctly, correcting to fn=%u\n", fn); } @@ -437,7 +437,7 @@ static int trx_data_read_cb(struct osmo_fd *ofd, unsigned int what) LOGP(DTRX, LOGL_ERROR, "Illegal TS %d\n", tn); return -EINVAL; } - if (fn >= 2715648) { + if (fn >= GSM_HYPERFRAME) { LOGP(DTRX, LOGL_ERROR, "Illegal FN %u\n", fn); return -EINVAL; } |