From 19399c505226dcae9cfaec0ab53889481f3ab819 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Fri, 26 Feb 2010 16:40:42 +0000 Subject: dahdi: Add line options for BRI NT/TE mode and termination resistance. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8120 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi-base.c | 3 ++- include/dahdi/user.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index 30668e6..f207279 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -4075,7 +4075,8 @@ static int dahdi_ctl_ioctl(struct file *file, unsigned int cmd, unsigned long da if (copy_from_user(&lc, user_data, sizeof(lc))) return -EFAULT; VALID_SPAN(lc.span); - if ((lc.lineconfig & 0x07f0 & spans[lc.span]->linecompat) != (lc.lineconfig & 0x07f0)) + if ((lc.lineconfig & 0x1ff0 & spans[lc.span]->linecompat) != + (lc.lineconfig & 0x1ff0)) return -EINVAL; if (spans[lc.span]->spanconfig) { spans[lc.span]->lineconfig = lc.lineconfig; diff --git a/include/dahdi/user.h b/include/dahdi/user.h index a5d6ed2..5bd03d7 100644 --- a/include/dahdi/user.h +++ b/include/dahdi/user.h @@ -56,6 +56,9 @@ #define DAHDI_CONFIG_HDB3 (1 << 9) /* HDB3 instead of AMI (line coding) */ #define DAHDI_CONFIG_CRC4 (1 << 10) /* CRC4 framing */ #define DAHDI_CONFIG_NOTOPEN (1 << 16) +/* These apply to BRI */ +#define DAHDI_CONFIG_NTTE (1 << 11) /* To enable NT mode, set this bit to 1, for TE this should be 0 */ +#define DAHDI_CONFIG_TERM (1 << 12) /* To enable Termination resistance set this bit to 1 */ /* Signalling types */ #define DAHDI_SIG_BROKEN (1 << 31) /* The port is broken and/or failed initialization */ -- cgit v1.2.3