summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-02-26 16:40:42 +0000
committerShaun Ruffell <sruffell@digium.com>2010-02-26 16:40:42 +0000
commit19399c505226dcae9cfaec0ab53889481f3ab819 (patch)
tree8c8a50fd926b9cced14257c0b1e936a9cb9f33a8
parent2f87293c69d2a4f9957c431646ec55c44675e217 (diff)
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
-rw-r--r--drivers/dahdi/dahdi-base.c3
-rw-r--r--include/dahdi/user.h3
2 files changed, 5 insertions, 1 deletions
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 */