aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorSylvain Munaut <246tnt@gmail.com>2009-12-22 13:43:26 +0100
committerHarald Welte <laforge@gnumonks.org>2009-12-22 13:43:26 +0100
commit4010f1e6f4d3f1c702be836a2342aefd8de73f2a (patch)
tree8ff802db314cb78a3b16452744a32fd28c0cd120 /openbsc/include
parentff1f19e199bbb0cb9da55e0994d9b1443bba85f7 (diff)
bts: Allow config of RACH control parameters tx-integer & max retrans
Tweaking theses can be useful especially tx-integer that influence both the spread of rach attemps and the delay between two attemps. Looking up GSM 04.08 3.3.1.1.2 & 10.5.2.29 can help determine good values. The default are choosed with a wide spacing between attemps (tx integer = 9 -> T=12 & S=217 (non-combined CCCH/SDCCH) or 115 (for combined CCCH/SDCCH)). This alleviates the problem of responding to several RACH attempts by a same MS, allocating several RF channels when only 1 is needed. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/gsm_utils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gsm_utils.h b/openbsc/include/openbsc/gsm_utils.h
index 5809221a3..56a4120a5 100644
--- a/openbsc/include/openbsc/gsm_utils.h
+++ b/openbsc/include/openbsc/gsm_utils.h
@@ -37,5 +37,12 @@ int ms_pwr_dbm(enum gsm_band band, u_int8_t lvl);
int rxlev2dbm(u_int8_t rxlev);
u_int8_t dbm2rxlev(int dbm);
+/* According to GSM 04.08 Chapter 10.5.2.29 */
+static inline int rach_max_trans_val2raw(int val) { return (val >> 1) & 3; }
+static inline int rach_max_trans_raw2val(int raw) {
+ const int tbl[4] = { 1, 2, 4, 7 };
+ return tbl[raw & 3];
+}
+
void generate_backtrace();
#endif