lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1352463587-23899-1-git-send-email-oliver@neukum.org>
Date:	Fri,  9 Nov 2012 13:19:47 +0100
From:	Oliver Neukum <oliver@...kum.org>
To:	davem@...emloft.net, netdev@...r.kernel.org
Cc:	Oliver Neukum <oliver@...kum.org>, Oliver Neukum <oneukum@...e.de>
Subject: [PATCH] kaweth:BQL support

This adds the callbacks for the statistics necessary for BQL

Signed-off-by: Oliver Neukum <oneukum@...e.de>
---
 drivers/net/usb/kaweth.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c
index afb117c..f30e07f 100644
--- a/drivers/net/usb/kaweth.c
+++ b/drivers/net/usb/kaweth.c
@@ -715,6 +715,7 @@ static int kaweth_open(struct net_device *net)
 		usb_kill_urb(kaweth->rx_urb);
 		goto err_out;
 	}
+	netdev_reset_queue(net);
 	kaweth->opened = 1;
 
 	netif_start_queue(net);
@@ -783,6 +784,7 @@ static void kaweth_usb_transmit_complete(struct urb *urb)
 {
 	struct kaweth_device *kaweth = urb->context;
 	struct sk_buff *skb = kaweth->tx_skb;
+	struct net_device *net = kaweth->net;
 	int status = urb->status;
 
 	if (unlikely(status != 0))
@@ -790,7 +792,8 @@ static void kaweth_usb_transmit_complete(struct urb *urb)
 			dev_dbg(&urb->dev->dev, "%s: TX status %d.\n",
 				kaweth->net->name, status);
 
-	netif_wake_queue(kaweth->net);
+	netif_wake_queue(net);
+	netdev_completed_queue(net, 1, skb->len - 2);
 	dev_kfree_skb_irq(skb);
 }
 
@@ -854,6 +857,7 @@ skip:
 	{
 		kaweth->stats.tx_packets++;
 		kaweth->stats.tx_bytes += skb->len;
+		netdev_sent_queue(net, skb->len - 2);
 	}
 
 	spin_unlock_irq(&kaweth->device_lock);
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ