path: root/openbsc/src/input/ipaccess.c
diff options
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-26 16:02:04 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-26 16:02:04 +0800
commitd1b19f3308633a9712831264f8ba1e25352dd4bf (patch)
tree688858571e1f00e53c260e7343829742062e9011 /openbsc/src/input/ipaccess.c
parent33f531fd129a68205e97957fcf464130a9c396b7 (diff)
[ts] Make the e1inp_ts delay configurable
Currently the nanoBTS bootstrap code requires a high delay otherwise we are not bringing the device up properly. Changing the init code turns out harder than it seems like. So this is a workaround for that to allow a high speed RSL/OML connection after the bringup. The line driver can have a default TS delay. It is set to the current default for the nanoBTS and the BS11. For the ipaccess case we will set the delay lower for the RSL connection and inside the ipaccess-config we can set it low right away to have fast firmware flashing and such.
Diffstat (limited to 'openbsc/src/input/ipaccess.c')
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/input/ipaccess.c b/openbsc/src/input/ipaccess.c
index 8a8a1987d..100c85bee 100644
--- a/openbsc/src/input/ipaccess.c
+++ b/openbsc/src/input/ipaccess.c
@@ -265,6 +265,7 @@ static int ipaccess_rcvmsg(struct e1inp_line *line, struct msgb *msg,
trx->rsl_link = e1inp_sign_link_create(e1i_ts,
trx->rsl_tei, 0);
+ trx->rsl_link->ts->sign.delay = 10;
/* get rid of our old temporary bfd */
memcpy(newbfd, bfd, sizeof(*newbfd));
@@ -572,7 +573,7 @@ static int handle_ts1_write(struct bsc_fd *bfd)
e1i_ts->sign.tx_timer.data = e1i_ts;
/* Reducing this might break the nanoBTS 900 init. */
- bsc_schedule_timer(&e1i_ts->sign.tx_timer, 0, 100000);
+ bsc_schedule_timer(&e1i_ts->sign.tx_timer, 0, e1i_ts->sign.delay);
return ret;
@@ -606,6 +607,7 @@ static int ipaccess_fd_cb(struct bsc_fd *bfd, unsigned int what)
struct e1inp_driver ipaccess_driver = {
.name = "ip.access",
.want_write = ts_want_write,
+ .default_delay = 100000,
/* callback of the OML listening filedescriptor */