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 <sruffell@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10212 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user