summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-21 15:25:12 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-21 15:25:12 +0000
commitfb2dda0269a8a1451db3d4743161330cf3ac8e86 (patch)
tree65c1d25b3206291850137d01f2bd3a5384c5062e
parent504428845ffcd01f1edec1723b2fb8dfbd1afce8 (diff)
fix a bug in wct1xxp (pointed out on asterisk-dev) and a minor cleanup in wcte11xp.c
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3553 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--wct1xxp.c14
-rw-r--r--wcte11xp.c6
2 files changed, 8 insertions, 12 deletions
diff --git a/wct1xxp.c b/wct1xxp.c
index ce76ad9..bcfed97 100644
--- a/wct1xxp.c
+++ b/wct1xxp.c
@@ -774,22 +774,20 @@ static int t1xxp_software_init(struct t1xxp *wc)
wc->span.maint = t1xxp_maint;
wc->span.open = t1xxp_open;
wc->span.close = t1xxp_close;
- if (wc->ise1)
- wc->span.channels = 31;
- else
- wc->span.channels = 24;
wc->span.chans = wc->chans;
wc->span.flags = ZT_FLAG_RBS;
wc->span.ioctl = t1xxp_ioctl;
wc->span.pvt = wc;
if (wc->ise1) {
+ wc->span.channels = 31;
wc->span.deflaw = ZT_LAW_ALAW;
- wc->span.linecompat = ZT_CONFIG_AMI | ZT_CONFIG_B8ZS | ZT_CONFIG_D4 | ZT_CONFIG_ESF;
- wc->span.spantype = "T1";
- } else {
- wc->span.deflaw = ZT_LAW_MULAW;
wc->span.linecompat = ZT_CONFIG_HDB3 | ZT_CONFIG_CCS | ZT_CONFIG_CRC4;
wc->span.spantype = "E1";
+ } else {
+ wc->span.channels = 24;
+ wc->span.deflaw = ZT_LAW_MULAW;
+ wc->span.linecompat = ZT_CONFIG_AMI | ZT_CONFIG_B8ZS | ZT_CONFIG_D4 | ZT_CONFIG_ESF;
+ wc->span.spantype = "T1";
}
init_waitqueue_head(&wc->span.maintq);
for (x=0;x<wc->span.channels;x++) {
diff --git a/wcte11xp.c b/wcte11xp.c
index d5720a1..68cc827 100644
--- a/wcte11xp.c
+++ b/wcte11xp.c
@@ -989,10 +989,12 @@ static int t1xxp_software_init(struct t1 *wc)
wc->span.channels = 32;
else
wc->span.channels = 31;
+ wc->span.deflaw = ZT_LAW_ALAW;
wc->span.spantype = "E1";
wc->span.linecompat = ZT_CONFIG_HDB3 | ZT_CONFIG_CCS | ZT_CONFIG_CRC4;
} else {
wc->span.channels = 24;
+ wc->span.deflaw = ZT_LAW_MULAW;
wc->span.spantype = "T1";
wc->span.linecompat = ZT_CONFIG_AMI | ZT_CONFIG_B8ZS | ZT_CONFIG_D4 | ZT_CONFIG_ESF;
}
@@ -1000,10 +1002,6 @@ static int t1xxp_software_init(struct t1 *wc)
wc->span.flags = ZT_FLAG_RBS;
wc->span.ioctl = t1xxp_ioctl;
wc->span.pvt = wc;
- if (wc->spantype == TYPE_E1)
- wc->span.deflaw = ZT_LAW_ALAW;
- else
- wc->span.deflaw = ZT_LAW_MULAW;
init_waitqueue_head(&wc->span.maintq);
for (x=0;x<wc->span.channels;x++) {
sprintf(wc->chans[x].name, "WCT1/%d/%d", wc->num, x + 1);