[net-next PATCH 4/6] igb: misc cleanup to combine one if statement and set last_rx

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff Kirsher
Date: Thursday, February 12, 2009 - 9:18 pm

From: Alexander Duyck <alexander.h.duyck@intel.com>

This patch combines a pair of if statements into one and adds a line to
update netdev->last_rx.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/igb/igb_main.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 5a6bcef..712cfd6 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -2981,9 +2981,9 @@ static int igb_xmit_frame_ring_adv(struct sk_buff *skb,
 
 	if (tso)
 		tx_flags |= IGB_TX_FLAGS_TSO;
-	else if (igb_tx_csum_adv(adapter, tx_ring, skb, tx_flags))
-			if (skb->ip_summed == CHECKSUM_PARTIAL)
-				tx_flags |= IGB_TX_FLAGS_CSUM;
+	else if (igb_tx_csum_adv(adapter, tx_ring, skb, tx_flags) &&
+	         (skb->ip_summed == CHECKSUM_PARTIAL))
+		tx_flags |= IGB_TX_FLAGS_CSUM;
 
 	igb_tx_queue_adv(adapter, tx_ring, tx_flags,
 			 igb_tx_map_adv(adapter, tx_ring, skb, first),
@@ -3886,6 +3886,7 @@ send_up:
 
 		igb_receive_skb(rx_ring, staterr, rx_desc, skb);
 
+		netdev->last_rx = jiffies;
 next_desc:
 		rx_desc->wb.upper.status_error = 0;
 

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[net-next PATCH 4/6] igb: misc cleanup to combine one if s ..., Jeff Kirsher, (Thu Feb 12, 9:18 pm)
[net-next PATCH 5/6] igb: remove unused defines, Jeff Kirsher, (Thu Feb 12, 9:18 pm)
Re: [net-next PATCH 5/6] igb: remove unused defines, David Miller, (Mon Feb 16, 1:06 am)