From f9ef9d20b4b213ea0dedc752e6f347c18292635f Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 29 Sep 2011 16:11:50 +0000 Subject: wcte12xp: Set uncollected performance counters to -1. The intent here is to flag to users that the maintenance counters are not collected for spans exported by the wcte12xp driver. dahdi_maint before this change: # dahdi_maint -s 1 Span 1: >Framing Errors : 0: >CRC Errors : 0: >Code Violations : 0: >E-bit Count : 0: >General Errored Seconds : 0: And after: # dahdi_maint -s 1 Span 1: >Framing Errors : -1: >CRC Errors : -1: >Code Violations : -1: >E-bit Count : -1: >General Errored Seconds : -1: This can be combined with a change to dahdi_maint to recognize that the errors are -1 and print an even more explicit warning. Signed-off-by: Shaun Ruffell Acked-by: Russ Meyerriecks git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10212 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wcte12xp/base.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/dahdi/wcte12xp/base.c') diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index 80835c1..3b48b5d 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -2565,6 +2565,10 @@ static int __devinit te12xp_init_one(struct pci_dev *pdev, const struct pci_devi if (!wc) return -ENOMEM; + /* Set the performance counters to -1 since this card currently does + * not support collecting them. */ + memset(&wc->span.count, -1, sizeof(wc->span.count)); + wc->not_ready = 1; ifaces[index] = wc; -- cgit v1.2.3