diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2016-11-08 16:16:15 +0100 |
---|---|---|
committer | Philipp <pmaier@sysmocom.de> | 2017-01-12 12:20:41 +0100 |
commit | 4d6518b655a227b1f68cf323ab104c433d0f336e (patch) | |
tree | 2a356fc0e8fc7f60103cf715e39bc075c4b690c0 | |
parent | f4ef54f9ba81aa60d93aebe39bf268d044f5f714 (diff) |
add e1inp_ericsson_set_altc() to unixsocket driver
e1inp_ericsson_set_altc() set the a-bis lower traffic channel mode.
timeslot is needed to bootstrap the siu.
superchannel is used for everything else
Change-Id: I3eeac681f238cdbc4bb19e18155f0b0e93aefeb7
-rw-r--r-- | include/osmocom/abis/e1_input.h | 3 | ||||
-rw-r--r-- | src/input/unixsocket.c | 24 |
2 files changed, 27 insertions, 0 deletions
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 4c7f8a0..078eaea 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -303,6 +303,9 @@ int e1inp_vty_init(void); struct gsm_network; int ipaccess_setup(struct gsm_network *gsmnet); +/* activate superchannel or deactive to use timeslots. only valid for unixsocket driver */ +void e1inp_ericsson_set_altc(struct e1inp_line *unixlinue, int superchannel); + extern struct llist_head e1inp_driver_list; extern struct llist_head e1inp_line_list; diff --git a/src/input/unixsocket.c b/src/input/unixsocket.c index 6f758e5..779c93e 100644 --- a/src/input/unixsocket.c +++ b/src/input/unixsocket.c @@ -214,3 +214,27 @@ void e1inp_unixsocket_init(void) tall_unixsocket_ctx = talloc_named_const(libosmo_abis_ctx, 1, "unixsocket"); e1inp_driver_register(&unixsocket_driver); } + +void e1inp_ericsson_set_altc(struct e1inp_line *unixline, int superchannel) +{ + struct unixsocket_line *config = unixline->driver_data; + struct msgb *msg; + + if (unixline->driver != &unixsocket_driver) { + LOGP(DLMI, LOGL_NOTICE, "altc is only supported by unixsocket\n"); + return; + } + + if (!config) { + LOGP(DLMI, LOGL_NOTICE, "e1inp driver not yet initialized.\n"); + return; + } + + msg = msgb_alloc_headroom(100, 100, "ALTTC"); + + /* magic */ + msgb_put_u32(msg, 0x23004200); + msgb_put_u8(msg, superchannel ? 1 : 0); + + unixsocket_write_msg(msg, &config->fd); +} |