From 98a0f3bde5689097fdd98c86b4934155c1857c5c Mon Sep 17 00:00:00 2001 From: kpfleming Date: Tue, 4 Dec 2007 15:01:51 +0000 Subject: when reporting devicetype for TE2xx and TE4xx cards, include the presence or absence of a VPM in the result git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3284 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- wct4xxp/base.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'wct4xxp') diff --git a/wct4xxp/base.c b/wct4xxp/base.c index a06ecfa..a47289d 100644 --- a/wct4xxp/base.c +++ b/wct4xxp/base.c @@ -1534,6 +1534,15 @@ static void init_spans(struct t4 *wc) "T%dXXP (PCI) Card %d Span %d", wc->numspans, wc->num, x+1); ts->span.manufacturer = "Digium"; strncpy(ts->span.devicetype, wc->variety, sizeof(ts->span.devicetype) - 1); + if (wc->vpm == T4_VPM_PRESENT) { + if (!wc->vpm450m) + strncat(ts->span.devicetype, " with VPM400M", sizeof(ts->span.devicetype) - 1); + else + strncat(ts->span.devicetype, (wc->numspans > 2) ? " with VPMOCT128" : " with VPMOCT064", + sizeof(ts->span.devicetype) - 1); + } + snprintf(ts->span.devicetype, sizeof(ts->span.devicetype) - 1, "%s%s", wc->variety, + (wc->vpm != T4_VPM_PRESENT) ? "" : (wc->vpm450m) ? " with VPM450M" : "with VPM400M"); snprintf(ts->span.location, sizeof(ts->span.location) - 1, "PCI%sBus %02d Slot %02d", ts->spanflags & FLAG_EXPRESS ? " Express" : " ", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1); -- cgit v1.2.3