summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6656/dpc.c
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2013-12-09 22:28:24 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-10 23:14:26 -0800
commit9a450f9a7a1257ec7ec72e6397a4f9980eab68d8 (patch)
tree73c5bf5b4f54d360051719911c41880749b89c16 /drivers/staging/vt6656/dpc.c
parent854f775a12d387bcd203b70b62b4feb4aeb3c5eb (diff)
staging: vt6656: s_uCalculateLinkQual use netstats rx values
Use netstats rx_packets and rx_frame_errors. Add frame errors to RXbBulkInProcessData The current scStatistic.RxFcsErrCnt only records USB errors not frame errors. The scStatistic.RxOkCnt only recorded successful USB transfers not actual successfully received packets. So a more accurate reading is to use netstats rx_packets and rx_frame_errors. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/dpc.c')
-rw-r--r--drivers/staging/vt6656/dpc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index 2bed31b741c0..84901c1e3b59 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -291,12 +291,14 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, struct vnt_rcb *pRCB,
if (BytesToIndicate != FrameSize) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"------- WRONG Length 1\n");
+ pStats->rx_frame_errors++;
return false;
}
if ((BytesToIndicate > 2372) || (BytesToIndicate <= 40)) {
// Frame Size error drop this packet.
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "---------- WRONG Length 2\n");
+ pStats->rx_frame_errors++;
return false;
}
@@ -314,6 +316,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, struct vnt_rcb *pRCB,
(BytesToIndicate < (*pwPLCP_Length)) ) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Wrong PLCP Length %x\n", (int) *pwPLCP_Length);
+ pStats->rx_frame_errors++;
return false;
}
for ( ii=RATE_1M;ii<MAX_RATE;ii++) {