summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wct4xxp/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dahdi/wct4xxp/base.c')
-rw-r--r--drivers/dahdi/wct4xxp/base.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c
index 7891c61..be172d2 100644
--- a/drivers/dahdi/wct4xxp/base.c
+++ b/drivers/dahdi/wct4xxp/base.c
@@ -1236,9 +1236,11 @@ static int t4_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long dat
else
clear_bit(chan->chanpos - 1, &ts->dtmfmutemask);
- channel = (chan->chanpos) << 3;
- if (!has_e1_span(wc))
- channel += (4 << 3);
+ channel = has_e1_span(wc) ? chan->chanpos : chan->chanpos + 4;
+ if (is_octal(wc))
+ channel = channel << 3;
+ else
+ channel = channel << 2;
channel |= chan->span->offset;
vpm450m_setdtmf(wc->vpm, channel, j & DAHDI_TONEDETECT_ON,
j & DAHDI_TONEDETECT_MUTE);