aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-05-10 08:01:31 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-10 08:01:31 -0400
commit1ae5dc342ac78d7a42965fd1f323815f6f5ef2c1 (patch)
treed1955a7639e99832590df26466a34d5786a880ae /drivers/net/usb
parent2b0b05ddc04b6d45e71cd36405df512075786f1e (diff)
net: trans_start cleanups
Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/hso.c2
-rw-r--r--drivers/net/usb/kaweth.c1
-rw-r--r--drivers/net/usb/pegasus.c3
3 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index be0cc99e881a..a6227f892d1b 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -834,8 +834,6 @@ static netdev_tx_t hso_net_start_xmit(struct sk_buff *skb,
834 } else { 834 } else {
835 net->stats.tx_packets++; 835 net->stats.tx_packets++;
836 net->stats.tx_bytes += skb->len; 836 net->stats.tx_bytes += skb->len;
837 /* And tell the kernel when the last transmit started. */
838 net->trans_start = jiffies;
839 } 837 }
840 dev_kfree_skb(skb); 838 dev_kfree_skb(skb);
841 /* we're done */ 839 /* we're done */
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c
index c4c334d9770f..46890dc625dc 100644
--- a/drivers/net/usb/kaweth.c
+++ b/drivers/net/usb/kaweth.c
@@ -856,7 +856,6 @@ skip:
856 { 856 {
857 kaweth->stats.tx_packets++; 857 kaweth->stats.tx_packets++;
858 kaweth->stats.tx_bytes += skb->len; 858 kaweth->stats.tx_bytes += skb->len;
859 net->trans_start = jiffies;
860 } 859 }
861 860
862 spin_unlock_irq(&kaweth->device_lock); 861 spin_unlock_irq(&kaweth->device_lock);
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
index 41838773b568..1cd17d274a12 100644
--- a/drivers/net/usb/pegasus.c
+++ b/drivers/net/usb/pegasus.c
@@ -808,7 +808,7 @@ static void write_bulk_callback(struct urb *urb)
808 break; 808 break;
809 } 809 }
810 810
811 net->trans_start = jiffies; 811 net->trans_start = jiffies; /* prevent tx timeout */
812 netif_wake_queue(net); 812 netif_wake_queue(net);
813} 813}
814 814
@@ -909,7 +909,6 @@ static netdev_tx_t pegasus_start_xmit(struct sk_buff *skb,
909 } else { 909 } else {
910 pegasus->stats.tx_packets++; 910 pegasus->stats.tx_packets++;
911 pegasus->stats.tx_bytes += skb->len; 911 pegasus->stats.tx_bytes += skb->len;
912 net->trans_start = jiffies;
913 } 912 }
914 dev_kfree_skb(skb); 913 dev_kfree_skb(skb);
915 914