summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/src/libabis/input/dahdi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/openbsc/src/libabis/input/dahdi.c b/openbsc/src/libabis/input/dahdi.c
index 6f8983763..a7b45a1af 100644
--- a/openbsc/src/libabis/input/dahdi.c
+++ b/openbsc/src/libabis/input/dahdi.c
@@ -421,11 +421,17 @@ static int dahdi_e1_setup(struct e1inp_line *line)
char openstr[128];
struct e1inp_ts *e1i_ts = &line->ts[idx];
struct osmo_fd *bfd = &e1i_ts->driver.dahdi.fd;
+ int dev_nr;
+
+ /* DAHDI device names/numbers just keep incrementing
+ * even over multiple boards. So TS1 of the second
+ * board will be 32 */
+ dev_nr = line->num * (NUM_E1_TS-1) + ts;
bfd->data = line;
bfd->priv_nr = ts;
bfd->cb = dahdi_fd_cb;
- snprintf(openstr, sizeof(openstr), "/dev/dahdi/%d", ts);
+ snprintf(openstr, sizeof(openstr), "/dev/dahdi/%d", dev_nr);
switch (e1i_ts->type) {
case E1INP_TS_TYPE_NONE: