blob: ebdaccfba277301f49e198082d88261f86cca205 [file] [log] [blame]
Matthew Fredricksond105e202010-02-16 22:07:04 +01001/* OpenBSC Abis input driver for DAHDI */
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +01002
Harald Welteba0db5b2011-02-04 21:33:14 +01003/* (C) 2008-2011 by Harald Welte <laforge@gnumonks.org>
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +01004 * (C) 2009 by Holger Hans Peter Freyther <zecke@selfish.org>
Matthew Fredricksond105e202010-02-16 22:07:04 +01005 * (C) 2010 by Digium and Matthew Fredrickson <creslin@digium.com>
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +01006 *
7 * All Rights Reserved
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 *
23 */
24
Harald Welteca17ef82011-02-05 15:13:27 +010025#include "../../bscconfig.h"
26
27#ifdef HAVE_DAHDI_USER_H
28
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +010029#include <stdio.h>
30#include <unistd.h>
31#include <stdlib.h>
32#include <errno.h>
33#include <string.h>
34#include <time.h>
35#include <sys/fcntl.h>
36#include <sys/types.h>
37#include <sys/socket.h>
38#include <sys/ioctl.h>
39#include <arpa/inet.h>
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -050040#include <dahdi/user.h>
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +010041
Harald Welte1dd68c32011-02-05 13:58:46 +010042#include <osmocore/select.h>
43#include <osmocore/msgb.h>
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +010044#include <openbsc/debug.h>
45#include <openbsc/gsm_data.h>
46#include <openbsc/abis_nm.h>
47#include <openbsc/abis_rsl.h>
48#include <openbsc/subchan_demux.h>
49#include <openbsc/e1_input.h>
Harald Welte1dd68c32011-02-05 13:58:46 +010050#include <osmocore/talloc.h>
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +010051
Matthew Fredricksonb1cb8eb2010-02-17 19:25:39 +010052#include "lapd.h"
53
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +010054#define TS1_ALLOC_SIZE 300
55
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +010056static int handle_ts1_read(struct bsc_fd *bfd)
57{
58 struct e1inp_line *line = bfd->data;
59 unsigned int ts_nr = bfd->priv_nr;
60 struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1];
61 struct e1inp_sign_link *link;
Matthew Fredricksonbc6649e2010-02-16 22:01:36 +010062 struct msgb *msg = msgb_alloc(TS1_ALLOC_SIZE, "DAHDI TS1");
Harald Welteba0db5b2011-02-04 21:33:14 +010063 lapd_mph_type prim;
64 unsigned int sapi, tei;
65 int ilen, ret;
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +010066
67 if (!msg)
68 return -ENOMEM;
69
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -050070 ret = read(bfd->fd, msg->data, TS1_ALLOC_SIZE - 16);
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +010071 if (ret < 0) {
Matthew Fredricksonb1cb8eb2010-02-17 19:25:39 +010072 perror("read ");
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +010073 }
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -050074 msgb_put(msg, ret - 2);
Matthew Fredricksonb1cb8eb2010-02-17 19:25:39 +010075 if (ret <= 3) {
76 perror("read ");
77 }
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +010078
Harald Welteba0db5b2011-02-04 21:33:14 +010079 sapi = msg->data[0] >> 2;
80 tei = msg->data[1] >> 1;
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -050081
Harald Welteba0db5b2011-02-04 21:33:14 +010082 DEBUGP(DMI, "<= len = %d, sapi(%d) tei(%d)", ret, sapi, tei);
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +010083
Matthew Fredricksonb1cb8eb2010-02-17 19:25:39 +010084 uint8_t *idata = lapd_receive(msg->data, msg->len, &ilen, &prim, bfd);
85
Matthew Fredricksonb1cb8eb2010-02-17 19:25:39 +010086 msgb_pull(msg, 2);
87
Harald Welteba0db5b2011-02-04 21:33:14 +010088 DEBUGP(DMI, "prim %08x\n", prim);
Matthew Fredricksonb1cb8eb2010-02-17 19:25:39 +010089
Harald Welteba0db5b2011-02-04 21:33:14 +010090 switch (prim) {
91 case 0:
Matthew Fredricksonb1cb8eb2010-02-17 19:25:39 +010092 break;
Harald Welteba0db5b2011-02-04 21:33:14 +010093 case LAPD_MPH_ACTIVATE_IND:
94 DEBUGP(DMI, "MPH_ACTIVATE_IND: sapi(%d) tei(%d)\n", sapi, tei);
95 ret = e1inp_event(e1i_ts, EVT_E1_TEI_UP, tei, sapi);
Matthew Fredricksonb1cb8eb2010-02-17 19:25:39 +010096 break;
Harald Welteba0db5b2011-02-04 21:33:14 +010097 case LAPD_MPH_DEACTIVATE_IND:
98 DEBUGP(DMI, "MPH_DEACTIVATE_IND: sapi(%d) tei(%d)\n", sapi, tei);
99 ret = e1inp_event(e1i_ts, EVT_E1_TEI_DN, tei, sapi);
Matthew Fredricksonb1cb8eb2010-02-17 19:25:39 +0100100 break;
Harald Welteba0db5b2011-02-04 21:33:14 +0100101 case LAPD_DL_DATA_IND:
102 case LAPD_DL_UNITDATA_IND:
Harald Welte1dd68c32011-02-05 13:58:46 +0100103 if (prim == LAPD_DL_DATA_IND)
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500104 msg->l2h = msg->data + 2;
105 else
106 msg->l2h = msg->data + 1;
107 DEBUGP(DMI, "RX: %s\n", hexdump(msgb_l2(msg), ret));
Harald Welteba0db5b2011-02-04 21:33:14 +0100108 ret = e1inp_rx_ts(e1i_ts, msg, tei, sapi);
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100109 break;
110 default:
Harald Welteba0db5b2011-02-04 21:33:14 +0100111 printf("ERROR: unknown prim\n");
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100112 break;
113 }
Harald Welteba0db5b2011-02-04 21:33:14 +0100114
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500115 DEBUGP(DMI, "Returned ok\n");
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100116 return ret;
117}
118
119static int ts_want_write(struct e1inp_ts *e1i_ts)
120{
Harald Welteba0db5b2011-02-04 21:33:14 +0100121 /* We never include the DAHDI B-Channel FD into the
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100122 * writeset, since it doesn't support poll() based
123 * write flow control */
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500124 if (e1i_ts->type == E1INP_TS_TYPE_TRAU) {
125 fprintf(stderr, "Trying to write TRAU ts\n");
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100126 return 0;
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500127 }
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100128
129 e1i_ts->driver.misdn.fd.when |= BSC_FD_WRITE;
130
131 return 0;
132}
133
134static void timeout_ts1_write(void *data)
135{
136 struct e1inp_ts *e1i_ts = (struct e1inp_ts *)data;
137
138 /* trigger write of ts1, due to tx delay timer */
139 ts_want_write(e1i_ts);
140}
141
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500142static void dahdi_write_msg(uint8_t *data, int len, void *cbdata)
143{
144 struct bsc_fd *bfd = cbdata;
145 int ret;
146
147 ret = write(bfd->fd, data, len + 2);
148
149 if (ret < 0)
150 fprintf(stderr, "%s write failed %d\n", __func__, ret);
151}
152
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100153static int handle_ts1_write(struct bsc_fd *bfd)
154{
155 struct e1inp_line *line = bfd->data;
156 unsigned int ts_nr = bfd->priv_nr;
157 struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1];
158 struct e1inp_sign_link *sign_link;
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100159 struct msgb *msg;
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100160
161 bfd->when &= ~BSC_FD_WRITE;
162
163 /* get the next msg for this timeslot */
164 msg = e1inp_tx_ts(e1i_ts, &sign_link);
165 if (!msg) {
166 /* no message after tx delay timer */
167 return 0;
168 }
169
Matthew Fredricksonb1cb8eb2010-02-17 19:25:39 +0100170 lapd_transmit(sign_link->tei, msg->data, msg->len, bfd);
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100171 msgb_free(msg);
172
173 /* set tx delay timer for next event */
174 e1i_ts->sign.tx_timer.cb = timeout_ts1_write;
175 e1i_ts->sign.tx_timer.data = e1i_ts;
176 bsc_schedule_timer(&e1i_ts->sign.tx_timer, 0, 50000);
177
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500178 return 0;
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100179}
180
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500181
182static int invertbits = 1;
183
184static u_int8_t flip_table[256];
185
186static void init_flip_bits(void)
187{
188 int i,k;
189
190 for (i = 0 ; i < 256 ; i++) {
191 u_int8_t sample = 0 ;
192 for (k = 0; k<8; k++) {
193 if ( i & 1 << k ) sample |= 0x80 >> k;
194 }
195 flip_table[i] = sample;
196 }
197}
198
199static u_int8_t * flip_buf_bits ( u_int8_t * buf , int len)
200{
201 int i;
creslin287cd8b86f2010-03-26 12:57:31 -0500202 u_int8_t * start = buf;
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500203
204 for (i = 0 ; i < len; i++) {
205 buf[i] = flip_table[(u_int8_t)buf[i]];
206 }
207
208 return start;
209}
210
creslin287cd8b86f2010-03-26 12:57:31 -0500211#define D_BCHAN_TX_GRAN 160
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100212/* write to a B channel TS */
213static int handle_tsX_write(struct bsc_fd *bfd)
214{
215 struct e1inp_line *line = bfd->data;
216 unsigned int ts_nr = bfd->priv_nr;
217 struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1];
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500218 u_int8_t tx_buf[D_BCHAN_TX_GRAN];
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100219 struct subch_mux *mx = &e1i_ts->trau.mux;
220 int ret;
221
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500222 ret = subchan_mux_out(mx, tx_buf, D_BCHAN_TX_GRAN);
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100223
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500224 if (ret != D_BCHAN_TX_GRAN) {
225 fprintf(stderr, "Huh, got ret of %d\n", ret);
226 if (ret < 0)
227 return ret;
228 }
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100229
230 DEBUGP(DMIB, "BCHAN TX: %s\n",
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500231 hexdump(tx_buf, D_BCHAN_TX_GRAN));
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100232
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500233 if (invertbits) {
234 flip_buf_bits(tx_buf, ret);
235 }
236
237 ret = write(bfd->fd, tx_buf, ret);
238 if (ret < D_BCHAN_TX_GRAN)
Harald Welte1dd68c32011-02-05 13:58:46 +0100239 fprintf(stderr, "send returns %d instead of %d\n", ret,
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500240 D_BCHAN_TX_GRAN);
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100241
242 return ret;
243}
244
creslin287cd8b86f2010-03-26 12:57:31 -0500245#define D_TSX_ALLOC_SIZE (D_BCHAN_TX_GRAN)
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100246/* FIXME: read from a B channel TS */
247static int handle_tsX_read(struct bsc_fd *bfd)
248{
249 struct e1inp_line *line = bfd->data;
250 unsigned int ts_nr = bfd->priv_nr;
251 struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1];
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500252 struct msgb *msg = msgb_alloc(D_TSX_ALLOC_SIZE, "DAHDI TSx");
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100253 int ret;
254
255 if (!msg)
256 return -ENOMEM;
257
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500258 ret = read(bfd->fd, msg->data, D_TSX_ALLOC_SIZE);
259 if (ret < 0 || ret != D_TSX_ALLOC_SIZE) {
260 fprintf(stderr, "read error %d %s\n", ret, strerror(errno));
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100261 return ret;
262 }
263
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500264 if (invertbits) {
265 flip_buf_bits(msg->data, ret);
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100266 }
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500267
268 msgb_put(msg, ret);
269
270 msg->l2h = msg->data;
271 DEBUGP(DMIB, "BCHAN RX: %s\n",
272 hexdump(msgb_l2(msg), ret));
273 ret = e1inp_rx_ts(e1i_ts, msg, 0, 0);
274 /* physical layer indicates that data has been sent,
275 * we thus can send some more data */
creslin287cd8b86f2010-03-26 12:57:31 -0500276 ret = handle_tsX_write(bfd);
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100277 msgb_free(msg);
278
279 return ret;
280}
281
282/* callback from select.c in case one of the fd's can be read/written */
283static int dahdi_fd_cb(struct bsc_fd *bfd, unsigned int what)
284{
285 struct e1inp_line *line = bfd->data;
286 unsigned int ts_nr = bfd->priv_nr;
287 unsigned int idx = ts_nr-1;
288 struct e1inp_ts *e1i_ts = &line->ts[idx];
289 int rc = 0;
290
291 switch (e1i_ts->type) {
292 case E1INP_TS_TYPE_SIGN:
293 if (what & BSC_FD_READ)
294 rc = handle_ts1_read(bfd);
295 if (what & BSC_FD_WRITE)
296 rc = handle_ts1_write(bfd);
297 break;
298 case E1INP_TS_TYPE_TRAU:
299 if (what & BSC_FD_READ)
300 rc = handle_tsX_read(bfd);
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500301 if (what & BSC_FD_WRITE)
302 rc = handle_tsX_write(bfd);
Harald Welteba0db5b2011-02-04 21:33:14 +0100303 /* We never include the DAHDI B-Channel FD into the
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100304 * writeset, since it doesn't support poll() based
305 * write flow control */
306 break;
307 default:
308 fprintf(stderr, "unknown E1 TS type %u\n", e1i_ts->type);
309 break;
310 }
311
312 return rc;
313}
314
Harald Welte1dd68c32011-02-05 13:58:46 +0100315static int dahdi_e1_line_update(struct e1inp_line *line);
316
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100317struct e1inp_driver dahdi_driver = {
318 .name = "DAHDI",
319 .want_write = ts_want_write,
Harald Welte1dd68c32011-02-05 13:58:46 +0100320 .line_update = &dahdi_e1_line_update,
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100321};
322
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500323void dahdi_set_bufinfo(int fd, int as_sigchan)
324{
325 struct dahdi_bufferinfo bi;
326 int x = 0;
327
328 if (ioctl(fd, DAHDI_GET_BUFINFO, &bi)) {
329 fprintf(stderr, "Error getting bufinfo\n");
330 exit(-1);
331 }
332
333 if (as_sigchan) {
334 bi.numbufs = 4;
335 bi.bufsize = 512;
336 } else {
creslin287cd8b86f2010-03-26 12:57:31 -0500337 bi.numbufs = 8;
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500338 bi.bufsize = D_BCHAN_TX_GRAN;
creslin287cd8b86f2010-03-26 12:57:31 -0500339 bi.txbufpolicy = DAHDI_POLICY_WHEN_FULL;
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500340 }
341
342 if (ioctl(fd, DAHDI_SET_BUFINFO, &bi)) {
343 fprintf(stderr, "Error setting bufinfo\n");
344 exit(-1);
345 }
346
347 if (!as_sigchan) {
348 if (ioctl(fd, DAHDI_AUDIOMODE, &x)) {
349 fprintf(stderr, "Error setting bufinfo\n");
350 exit(-1);
351 }
352 }
353
354}
355
Harald Welte50d369e2011-02-05 15:30:48 +0100356static int dahdi_e1_setup(struct e1inp_line *line, int release_l2)
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100357{
358 int ts, ret;
359
360 /* TS0 is CRC4, don't need any fd for it */
361 for (ts = 1; ts < NUM_E1_TS; ts++) {
362 unsigned int idx = ts-1;
363 char openstr[128];
364 struct e1inp_ts *e1i_ts = &line->ts[idx];
365 struct bsc_fd *bfd = &e1i_ts->driver.misdn.fd;
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100366
367 bfd->data = line;
368 bfd->priv_nr = ts;
369 bfd->cb = dahdi_fd_cb;
370 snprintf(openstr, sizeof(openstr), "/dev/dahdi/%d", ts);
371
372 switch (e1i_ts->type) {
373 case E1INP_TS_TYPE_NONE:
374 continue;
375 break;
376 case E1INP_TS_TYPE_SIGN:
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500377 bfd->fd = open(openstr, O_RDWR | O_NONBLOCK);
378 if (bfd->fd == -1) {
379 fprintf(stderr, "%s could not open %s %s\n",
380 __func__, openstr, strerror(errno));
381 exit(-1);
382 }
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100383 bfd->when = BSC_FD_READ;
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500384 dahdi_set_bufinfo(bfd->fd, 1);
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100385 break;
386 case E1INP_TS_TYPE_TRAU:
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500387 bfd->fd = open(openstr, O_RDWR | O_NONBLOCK);
388 if (bfd->fd == -1) {
389 fprintf(stderr, "%s could not open %s %s\n",
390 __func__, openstr, strerror(errno));
391 exit(-1);
392 }
393 dahdi_set_bufinfo(bfd->fd, 0);
Harald Welteba0db5b2011-02-04 21:33:14 +0100394 /* We never include the DAHDI B-Channel FD into the
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100395 * writeset, since it doesn't support poll() based
396 * write flow control */
creslin287cd8b86f2010-03-26 12:57:31 -0500397 bfd->when = BSC_FD_READ;// | BSC_FD_WRITE;
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100398 break;
399 }
400
401 if (bfd->fd < 0) {
402 fprintf(stderr, "%s could not open %s %s\n",
403 __func__, openstr, strerror(errno));
404 return bfd->fd;
405 }
406
407 ret = bsc_register_fd(bfd);
408 if (ret < 0) {
409 fprintf(stderr, "could not register FD: %s\n",
410 strerror(ret));
411 return ret;
412 }
413 }
414
415 return 0;
416}
417
Harald Welte1dd68c32011-02-05 13:58:46 +0100418static int dahdi_e1_line_update(struct e1inp_line *line)
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100419{
Matthew Fredricksonb1cb8eb2010-02-17 19:25:39 +0100420 int ret;
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100421
Matthew Fredricksonbc6649e2010-02-16 22:01:36 +0100422 if (line->driver != &dahdi_driver)
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100423 return -EINVAL;
424
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500425 init_flip_bits();
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100426
Harald Welte50d369e2011-02-05 15:30:48 +0100427 ret = dahdi_e1_setup(line, 1);
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100428 if (ret)
429 return ret;
430
Matthew Fredricksoncc2bc352010-03-15 12:22:37 -0500431 lapd_transmit_cb = dahdi_write_msg;
432
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100433 return 0;
434}
435
Harald Welte1dd68c32011-02-05 13:58:46 +0100436int e1inp_dahdi_init(void)
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100437{
438 /* register the driver with the core */
Harald Welte50d369e2011-02-05 15:30:48 +0100439 return e1inp_driver_register(&dahdi_driver);
Matthew Fredricksonb5ddc182010-02-16 21:55:50 +0100440}
Harald Welteca17ef82011-02-05 15:13:27 +0100441
442#endif /* HAVE_DAHDI_USER_H */