aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda
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/irda
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/irda')
-rw-r--r--drivers/net/irda/au1k_ir.c1
-rw-r--r--drivers/net/irda/donauboe.c2
-rw-r--r--drivers/net/irda/pxaficp_ir.c1
-rw-r--r--drivers/net/irda/sa1100_ir.c2
-rw-r--r--drivers/net/irda/sir_dev.c1
-rw-r--r--drivers/net/irda/smsc-ircc2.c2
-rw-r--r--drivers/net/irda/vlsi_ir.c1
-rw-r--r--drivers/net/irda/w83977af_ir.c2
8 files changed, 1 insertions, 11 deletions
diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c
index b5cbd39d0685..a3d696a9456a 100644
--- a/drivers/net/irda/au1k_ir.c
+++ b/drivers/net/irda/au1k_ir.c
@@ -546,7 +546,6 @@ static int au1k_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev)
546 546
547 dev_kfree_skb(skb); 547 dev_kfree_skb(skb);
548 aup->tx_head = (aup->tx_head + 1) & (NUM_IR_DESC - 1); 548 aup->tx_head = (aup->tx_head + 1) & (NUM_IR_DESC - 1);
549 dev->trans_start = jiffies;
550 return NETDEV_TX_OK; 549 return NETDEV_TX_OK;
551} 550}
552 551
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c
index b7e6625ca75e..48bd5ec9f29b 100644
--- a/drivers/net/irda/donauboe.c
+++ b/drivers/net/irda/donauboe.c
@@ -1002,8 +1002,6 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev)
1002 1002
1003 toshoboe_checkstuck (self); 1003 toshoboe_checkstuck (self);
1004 1004
1005 dev->trans_start = jiffies;
1006
1007 /* Check if we need to change the speed */ 1005 /* Check if we need to change the speed */
1008 /* But not now. Wait after transmission if mtt not required */ 1006 /* But not now. Wait after transmission if mtt not required */
1009 speed=irda_get_next_speed(skb); 1007 speed=irda_get_next_speed(skb);
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index 1a54f6bb68c5..c192c31e4c5c 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -556,7 +556,6 @@ static int pxa_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev)
556 } 556 }
557 557
558 dev_kfree_skb(skb); 558 dev_kfree_skb(skb);
559 dev->trans_start = jiffies;
560 return NETDEV_TX_OK; 559 return NETDEV_TX_OK;
561} 560}
562 561
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
index 1dcdce0631aa..da2705061a60 100644
--- a/drivers/net/irda/sa1100_ir.c
+++ b/drivers/net/irda/sa1100_ir.c
@@ -715,8 +715,6 @@ static int sa1100_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev)
715 Ser2HSCR0 = si->hscr0 | HSCR0_HSSP | HSCR0_TXE; 715 Ser2HSCR0 = si->hscr0 | HSCR0_HSSP | HSCR0_TXE;
716 } 716 }
717 717
718 dev->trans_start = jiffies;
719
720 return NETDEV_TX_OK; 718 return NETDEV_TX_OK;
721} 719}
722 720
diff --git a/drivers/net/irda/sir_dev.c b/drivers/net/irda/sir_dev.c
index de91cd14016b..1b051dab7b29 100644
--- a/drivers/net/irda/sir_dev.c
+++ b/drivers/net/irda/sir_dev.c
@@ -655,7 +655,6 @@ static netdev_tx_t sirdev_hard_xmit(struct sk_buff *skb,
655 655
656 if (likely(actual > 0)) { 656 if (likely(actual > 0)) {
657 dev->tx_skb = skb; 657 dev->tx_skb = skb;
658 ndev->trans_start = jiffies;
659 dev->tx_buff.data += actual; 658 dev->tx_buff.data += actual;
660 dev->tx_buff.len -= actual; 659 dev->tx_buff.len -= actual;
661 } 660 }
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index 6af84d88cd03..35e4e44040a2 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -868,7 +868,7 @@ static void smsc_ircc_timeout(struct net_device *dev)
868 spin_lock_irqsave(&self->lock, flags); 868 spin_lock_irqsave(&self->lock, flags);
869 smsc_ircc_sir_start(self); 869 smsc_ircc_sir_start(self);
870 smsc_ircc_change_speed(self, self->io.speed); 870 smsc_ircc_change_speed(self, self->io.speed);
871 dev->trans_start = jiffies; 871 dev->trans_start = jiffies; /* prevent tx timeout */
872 netif_wake_queue(dev); 872 netif_wake_queue(dev);
873 spin_unlock_irqrestore(&self->lock, flags); 873 spin_unlock_irqrestore(&self->lock, flags);
874} 874}
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
index e14505272870..c3d07382b7fa 100644
--- a/drivers/net/irda/vlsi_ir.c
+++ b/drivers/net/irda/vlsi_ir.c
@@ -1037,7 +1037,6 @@ static netdev_tx_t vlsi_hard_start_xmit(struct sk_buff *skb,
1037 wmb(); 1037 wmb();
1038 outw(0, iobase+VLSI_PIO_PROMPT); 1038 outw(0, iobase+VLSI_PIO_PROMPT);
1039 } 1039 }
1040 ndev->trans_start = jiffies;
1041 1040
1042 if (ring_put(r) == NULL) { 1041 if (ring_put(r) == NULL) {
1043 netif_stop_queue(ndev); 1042 netif_stop_queue(ndev);
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c
index cb0cb758be64..1f9c3f08d1a3 100644
--- a/drivers/net/irda/w83977af_ir.c
+++ b/drivers/net/irda/w83977af_ir.c
@@ -515,7 +515,6 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb,
515 /* Check for empty frame */ 515 /* Check for empty frame */
516 if (!skb->len) { 516 if (!skb->len) {
517 w83977af_change_speed(self, speed); 517 w83977af_change_speed(self, speed);
518 dev->trans_start = jiffies;
519 dev_kfree_skb(skb); 518 dev_kfree_skb(skb);
520 return NETDEV_TX_OK; 519 return NETDEV_TX_OK;
521 } else 520 } else
@@ -549,7 +548,6 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb,
549 switch_bank(iobase, SET0); 548 switch_bank(iobase, SET0);
550 outb(ICR_ETXTHI, iobase+ICR); 549 outb(ICR_ETXTHI, iobase+ICR);
551 } 550 }
552 dev->trans_start = jiffies;
553 dev_kfree_skb(skb); 551 dev_kfree_skb(skb);
554 552
555 /* Restore set register */ 553 /* Restore set register */