summaryrefslogtreecommitdiff
path: root/drivers/dahdi/tor2.c
diff options
context:
space:
mode:
authorRuss Meyerriecks <rmeyerriecks@digium.com>2010-02-22 16:18:45 +0000
committerRuss Meyerriecks <rmeyerriecks@digium.com>2010-02-22 16:18:45 +0000
commite940446337e727dfbc6fd6d82feeb7062fbb63ca (patch)
treea1bab9d8538cf26f8661e4a2602cc5f2102ce82e /drivers/dahdi/tor2.c
parentd3e9e1f2bc006ecc89e3e802df7a55bbddcc2e74 (diff)
Branch merge from the maintenance modes project
* Added logic for both the single and dual/quad span cards for supporting local loopback (virtual loopback plug), network loopback, network payload loopback, loopup, and loopback transmitting. * Added logic for the dual/quad span driver to support exporting the performance and error counters including : - errored seconds - framing errors - coding violations - bipolar violations - crc4 errors - ebit errors - fas errors * Moved the error and performance counters into a substructure for all drivers taking advantage of dahdi_span bpvcount. * Modified the DAHDI_SPANSTAT ioctl interface, so I moved the old interface to DAHDI_SPANSTAT_V1. The new interface comes with a nice, new shiny packed struct dahdi_spaninfo. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8061 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/tor2.c')
-rw-r--r--drivers/dahdi/tor2.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/dahdi/tor2.c b/drivers/dahdi/tor2.c
index 3cde7ec..cfafa11 100644
--- a/drivers/dahdi/tor2.c
+++ b/drivers/dahdi/tor2.c
@@ -1426,18 +1426,28 @@ DAHDI_IRQ_HANDLER(tor2_intr)
if (tor->cardtype == TYPE_E1)
{
/* add this second's BPV count to total one */
- tor->spans[i - 1].bpvcount += t1in(tor,i,1) + (t1in(tor,i,0) << 8);
+ tor->spans[i - 1].count.bpv +=
+ t1in(tor, i, 1) + (t1in(tor, i, 0)<<8);
+
if (tor->spans[i - 1].lineconfig & DAHDI_CONFIG_CRC4)
{
- tor->spans[i - 1].crc4count += t1in(tor,i,3) + ((t1in(tor,i,2) & 3) << 8);
- tor->spans[i - 1].ebitcount += t1in(tor,i,5) + ((t1in(tor,i,4) & 3) << 8);
+ tor->spans[i - 1].count.crc4 +=
+ t1in(tor, i, 3) +
+ ((t1in(tor, i, 2) & 3) << 8);
+ tor->spans[i - 1].count.ebit +=
+ t1in(tor, i, 5) +
+ ((t1in(tor, i, 4) & 3) << 8);
}
- tor->spans[i - 1].fascount += (t1in(tor,i,4) >> 2) + ((t1in(tor,i,2) & 0x3F) << 6);
+ tor->spans[i - 1].count.fas +=
+ (t1in(tor, i, 4) >> 2) +
+ ((t1in(tor, i, 2) & 0x3F) << 6);
}
else
{
/* add this second's BPV count to total one */
- tor->spans[i - 1].bpvcount += t1in(tor,i,0x24) + (t1in(tor,i,0x23) << 8);
+ tor->spans[i - 1].count.bpv +=
+ t1in(tor, i, 0x24) +
+ (t1in(tor, i, 0x23) << 8);
}
}
}