diff options
Diffstat (limited to 'drivers/net/hamachi.c')
-rw-r--r-- | drivers/net/hamachi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c index f7519a594945..c9ac46118e6f 100644 --- a/drivers/net/hamachi.c +++ b/drivers/net/hamachi.c | |||
@@ -407,10 +407,9 @@ that case. | |||
407 | /* A few values that may be tweaked. */ | 407 | /* A few values that may be tweaked. */ |
408 | /* Size of each temporary Rx buffer, calculated as: | 408 | /* Size of each temporary Rx buffer, calculated as: |
409 | * 1518 bytes (ethernet packet) + 2 bytes (to get 8 byte alignment for | 409 | * 1518 bytes (ethernet packet) + 2 bytes (to get 8 byte alignment for |
410 | * the card) + 8 bytes of status info + 8 bytes for the Rx Checksum + | 410 | * the card) + 8 bytes of status info + 8 bytes for the Rx Checksum |
411 | * 2 more because we use skb_reserve. | ||
412 | */ | 411 | */ |
413 | #define PKT_BUF_SZ 1538 | 412 | #define PKT_BUF_SZ 1536 |
414 | 413 | ||
415 | /* For now, this is going to be set to the maximum size of an ethernet | 414 | /* For now, this is going to be set to the maximum size of an ethernet |
416 | * packet. Eventually, we may want to make it a variable that is | 415 | * packet. Eventually, we may want to make it a variable that is |
@@ -1152,12 +1151,13 @@ static void hamachi_tx_timeout(struct net_device *dev) | |||
1152 | } | 1151 | } |
1153 | /* Fill in the Rx buffers. Handle allocation failure gracefully. */ | 1152 | /* Fill in the Rx buffers. Handle allocation failure gracefully. */ |
1154 | for (i = 0; i < RX_RING_SIZE; i++) { | 1153 | for (i = 0; i < RX_RING_SIZE; i++) { |
1155 | struct sk_buff *skb = netdev_alloc_skb(dev, hmp->rx_buf_sz); | 1154 | struct sk_buff *skb; |
1155 | |||
1156 | skb = netdev_alloc_skb_ip_align(dev, hmp->rx_buf_sz); | ||
1156 | hmp->rx_skbuff[i] = skb; | 1157 | hmp->rx_skbuff[i] = skb; |
1157 | if (skb == NULL) | 1158 | if (skb == NULL) |
1158 | break; | 1159 | break; |
1159 | 1160 | ||
1160 | skb_reserve(skb, 2); /* 16 byte align the IP header. */ | ||
1161 | hmp->rx_ring[i].addr = cpu_to_leXX(pci_map_single(hmp->pci_dev, | 1161 | hmp->rx_ring[i].addr = cpu_to_leXX(pci_map_single(hmp->pci_dev, |
1162 | skb->data, hmp->rx_buf_sz, PCI_DMA_FROMDEVICE)); | 1162 | skb->data, hmp->rx_buf_sz, PCI_DMA_FROMDEVICE)); |
1163 | hmp->rx_ring[i].status_n_length = cpu_to_le32(DescOwn | | 1163 | hmp->rx_ring[i].status_n_length = cpu_to_le32(DescOwn | |
@@ -1196,7 +1196,7 @@ static void hamachi_init_ring(struct net_device *dev) | |||
1196 | * card. -KDU | 1196 | * card. -KDU |
1197 | */ | 1197 | */ |
1198 | hmp->rx_buf_sz = (dev->mtu <= 1492 ? PKT_BUF_SZ : | 1198 | hmp->rx_buf_sz = (dev->mtu <= 1492 ? PKT_BUF_SZ : |
1199 | (((dev->mtu+26+7) & ~7) + 2 + 16)); | 1199 | (((dev->mtu+26+7) & ~7) + 16)); |
1200 | 1200 | ||
1201 | /* Initialize all Rx descriptors. */ | 1201 | /* Initialize all Rx descriptors. */ |
1202 | for (i = 0; i < RX_RING_SIZE; i++) { | 1202 | for (i = 0; i < RX_RING_SIZE; i++) { |