Subject: [PATCH 25/26] ixgb: remove skb->dev assignment

From: "Kok, Auke" <[email-masked]>
Date: Tue, 29 Aug 2006 09:45:10 -0700

Same change as e1000: remove skb->dev assignment, it's now done
by netdev_alloc_skb.

Signed-off-by: Auke Kok <[email-masked]>
---

 drivers/net/ixgb/ixgb_main.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index abca75f..ee12a85 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -1974,7 +1974,6 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a
 			    netdev_alloc_skb(netdev, length + NET_IP_ALIGN);
 			if (new_skb) {
 				skb_reserve(new_skb, NET_IP_ALIGN);
-				new_skb->dev = netdev;
 				memcpy(new_skb->data - NET_IP_ALIGN,
 				       skb->data - NET_IP_ALIGN,
 				       length + NET_IP_ALIGN);
@@ -2054,14 +2053,14 @@ ixgb_alloc_rx_buffers(struct ixgb_adapte
 	/* leave three descriptors unused */
 	while(--cleancount > 2) {
 		/* recycle! its good for you */
-		if (!(skb = buffer_info->skb))
-			skb = netdev_alloc_skb(netdev, adapter->rx_buffer_len
-			                    + NET_IP_ALIGN);
-		else {
+		skb = buffer_info->skb;
+		if (skb) {
 			skb_trim(skb, 0);
 			goto map_skb;
 		}
 
+		skb = netdev_alloc_skb(netdev, adapter->rx_buffer_len
+			               + NET_IP_ALIGN);
 		if (unlikely(!skb)) {
 			/* Better luck next round */
 			adapter->alloc_rx_buff_failed++;
@@ -2074,8 +2073,6 @@ ixgb_alloc_rx_buffers(struct ixgb_adapte
 		 */
 		skb_reserve(skb, NET_IP_ALIGN);
 
-		skb->dev = netdev;
-
 		buffer_info->skb = skb;
 		buffer_info->length = adapter->rx_buffer_len;
 map_skb:

---
Auke Kok <[email-masked]>