summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-02-26 21:03:05 +0000
committerShaun Ruffell <sruffell@digium.com>2010-02-26 21:03:05 +0000
commit3d414c3dc5965d427a4f73d27c3e5f2b47a2e327 (patch)
tree223e8da4c126cd4cf19ecb2b650bd729f7af3fa7
parentdc2167891fb61686a58580fb480b63129cbe7e84 (diff)
dahdi: Change 'struct dahdi_spaninfo' in order to maintain Asterisk API compatibility.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8147 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/dahdi-base.c12
-rw-r--r--include/dahdi/kernel.h12
-rw-r--r--include/dahdi/user.h24
3 files changed, 34 insertions, 14 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index f207279..34eddd5 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -3838,7 +3838,17 @@ static int dahdi_common_ioctl(struct file *file, unsigned int cmd, unsigned long
stack.spaninfo.alarms = spans[i]->alarms; /* get alarm status */
stack.spaninfo.rxlevel = spans[i]->rxlevel; /* get rx level */
stack.spaninfo.txlevel = spans[i]->txlevel; /* get tx level */
- stack.spaninfo.count = spans[i]->count; /* get counters */
+
+ stack.spaninfo.bpvcount = spans[i]->count.bpv;
+ stack.spaninfo.crc4count = spans[i]->count.crc4;
+ stack.spaninfo.ebitcount = spans[i]->count.ebit;
+ stack.spaninfo.fascount = spans[i]->count.fas;
+ stack.spaninfo.fecount = spans[i]->count.fe;
+ stack.spaninfo.cvcount = spans[i]->count.cv;
+ stack.spaninfo.becount = spans[i]->count.be;
+ stack.spaninfo.prbs = spans[i]->count.prbs;
+ stack.spaninfo.errsec = spans[i]->count.errsec;
+
stack.spaninfo.irqmisses = spans[i]->irqmisses; /* get IRQ miss count */
stack.spaninfo.syncsrc = spans[i]->syncsrc; /* get active sync source */
stack.spaninfo.totalchans = spans[i]->channels;
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
index 8ce81b0..3f1bc54 100644
--- a/include/dahdi/kernel.h
+++ b/include/dahdi/kernel.h
@@ -701,6 +701,18 @@ enum {
DAHDI_FLAGBIT_HDLC56 = 20, /*!< Sets the given channel (if in HDLC mode) to use 56K HDLC instead of 64K */
};
+struct dahdi_count {
+ __u32 fe; /*!< Framing error counter */
+ __u32 cv; /*!< Coding violations counter */
+ __u32 bpv; /*!< Bipolar Violation counter */
+ __u32 crc4; /*!< CRC4 error counter */
+ __u32 ebit; /*!< current E-bit error count */
+ __u32 fas; /*!< current FAS error count */
+ __u32 be; /*!< current bit error count */
+ __u32 prbs; /*!< current PRBS detected pattern */
+ __u32 errsec; /*!< errored seconds */
+};
+
/* map flagbits to flag masks */
#define DAHDI_FLAG(x) (1 << (DAHDI_FLAGBIT_ ## x))
diff --git a/include/dahdi/user.h b/include/dahdi/user.h
index 5bd03d7..84cae22 100644
--- a/include/dahdi/user.h
+++ b/include/dahdi/user.h
@@ -532,18 +532,6 @@ struct dahdi_params {
*/
#define DAHDI_IOMUX _IOWR(DAHDI_CODE, 9, int)
-struct dahdi_count {
- __u32 fe; /*!< Framing error counter */
- __u32 cv; /*!< Coding violations counter */
- __u32 bpv; /*!< Bipolar Violation counter */
- __u32 crc4; /*!< CRC4 error counter */
- __u32 ebit; /*!< current E-bit error count */
- __u32 fas; /*!< current FAS error count */
- __u32 be; /*!< current bit error count */
- __u32 prbs; /*!< current PRBS detected pattern */
- __u32 errsec; /*!< errored seconds */
-};
-
/*
* Get Span Status
*/
@@ -554,7 +542,17 @@ struct dahdi_spaninfo {
int alarms; /* alarms status */
int txlevel; /* what TX level is set to */
int rxlevel; /* current RX level */
- struct dahdi_count count;/* Performance and Error counters */
+
+ int bpvcount; /* current BPV count */
+ int crc4count; /* current CRC4 error count */
+ int ebitcount; /* current E-bit error count */
+ int fascount; /* current FAS error count */
+ __u32 fecount; /* Framing error counter */
+ __u32 cvcount; /* Coding violations counter */
+ __u32 becount; /* current bit error count */
+ __u32 prbs; /* current PRBS detected pattern */
+ __u32 errsec; /* errored seconds */
+
int irqmisses; /* current IRQ misses */
int syncsrc; /* span # of current sync source,
or 0 for free run */