diff options
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r-- | 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 abca75fd2892..ee12a851e777 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 *adapter) | |||
1974 | netdev_alloc_skb(netdev, length + NET_IP_ALIGN); | 1974 | netdev_alloc_skb(netdev, length + NET_IP_ALIGN); |
1975 | if (new_skb) { | 1975 | if (new_skb) { |
1976 | skb_reserve(new_skb, NET_IP_ALIGN); | 1976 | skb_reserve(new_skb, NET_IP_ALIGN); |
1977 | new_skb->dev = netdev; | ||
1978 | memcpy(new_skb->data - NET_IP_ALIGN, | 1977 | memcpy(new_skb->data - NET_IP_ALIGN, |
1979 | skb->data - NET_IP_ALIGN, | 1978 | skb->data - NET_IP_ALIGN, |
1980 | length + NET_IP_ALIGN); | 1979 | length + NET_IP_ALIGN); |
@@ -2054,14 +2053,14 @@ ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter) | |||
2054 | /* leave three descriptors unused */ | 2053 | /* leave three descriptors unused */ |
2055 | while(--cleancount > 2) { | 2054 | while(--cleancount > 2) { |
2056 | /* recycle! its good for you */ | 2055 | /* recycle! its good for you */ |
2057 | if (!(skb = buffer_info->skb)) | 2056 | skb = buffer_info->skb; |
2058 | skb = netdev_alloc_skb(netdev, adapter->rx_buffer_len | 2057 | if (skb) { |
2059 | + NET_IP_ALIGN); | ||
2060 | else { | ||
2061 | skb_trim(skb, 0); | 2058 | skb_trim(skb, 0); |
2062 | goto map_skb; | 2059 | goto map_skb; |
2063 | } | 2060 | } |
2064 | 2061 | ||
2062 | skb = netdev_alloc_skb(netdev, adapter->rx_buffer_len | ||
2063 | + NET_IP_ALIGN); | ||
2065 | if (unlikely(!skb)) { | 2064 | if (unlikely(!skb)) { |
2066 | /* Better luck next round */ | 2065 | /* Better luck next round */ |
2067 | adapter->alloc_rx_buff_failed++; | 2066 | adapter->alloc_rx_buff_failed++; |
@@ -2074,8 +2073,6 @@ ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter) | |||
2074 | */ | 2073 | */ |
2075 | skb_reserve(skb, NET_IP_ALIGN); | 2074 | skb_reserve(skb, NET_IP_ALIGN); |
2076 | 2075 | ||
2077 | skb->dev = netdev; | ||
2078 | |||
2079 | buffer_info->skb = skb; | 2076 | buffer_info->skb = skb; |
2080 | buffer_info->length = adapter->rx_buffer_len; | 2077 | buffer_info->length = adapter->rx_buffer_len; |
2081 | map_skb: | 2078 | map_skb: |