summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Stezenbach <js@sig21.net>2011-09-08 15:39:15 +0200
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-08-17 15:35:28 -0400
commit4d066bcdc9897593b0e122a4bde501a449a76b10 (patch)
tree2d732cfe90e43b75828c48d18474399daaaa43ab
parentbfaa681a1fa24010d0a26704429e4cc2dff793a4 (diff)
usbmon vs. tcpdump: fix dropped packet count
commit 236c448cb6e7f82096101e1ace4b77f8b38f82c8 upstream. Report the number of dropped packets instead of zero when using the binary usbmon interface with tcpdump. # tcpdump -i usbmon1 -w dump tcpdump: listening on usbmon1, link-type USB_LINUX_MMAPPED (USB with padded Linux header), capture size 65535 bytes ^C2155 packets captured 2155 packets received by filter 1019 packets dropped by kernel Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--drivers/usb/mon/mon_bin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c
index 6ee9d76d3833..45f9705df372 100644
--- a/drivers/usb/mon/mon_bin.c
+++ b/drivers/usb/mon/mon_bin.c
@@ -1080,7 +1080,7 @@ static int mon_bin_ioctl(struct inode *inode, struct file *file,
nevents = mon_bin_queued(rp);
sp = (struct mon_bin_stats __user *)arg;
- if (put_user(rp->cnt_lost, &sp->dropped))
+ if (put_user(ndropped, &sp->dropped))
return -EFAULT;
if (put_user(nevents, &sp->queued))
return -EFAULT;