aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmo-bts/gsm_data.h3
-rw-r--r--src/osmo-bts-trx/scheduler.c3
-rw-r--r--src/osmo-bts-trx/trx_if.c6
3 files changed, 6 insertions, 6 deletions
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index 8f977980..82512380 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -15,6 +15,9 @@
#define GSM_HR_BYTES 14 /* TS 101318 Chapter 5.2: 112 bits, no sig */
#define GSM_EFR_BYTES 31 /* TS 101318 Chapter 5.3: 244 bits + 4bit sig */
+#define GSM_SUPERFRAME (26*51) /* 1326 TDMA frames */
+#define GSM_HYPERFRAME (2048*GSM_SUPERFRAME) /* GSM_HYPERFRAME frames */
+
#define GSM_BTS_AGCH_QUEUE_THRESH_LEVEL_DEFAULT 41
#define GSM_BTS_AGCH_QUEUE_THRESH_LEVEL_DISABLE 999999
#define GSM_BTS_AGCH_QUEUE_LOW_LEVEL_DEFAULT 41
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;
}