aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ipg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ipg.c')
-rw-r--r--drivers/net/ipg.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c
index 5c5653bd48c1..51d5f30e0afe 100644
--- a/drivers/net/ipg.c
+++ b/drivers/net/ipg.c
@@ -730,7 +730,7 @@ static int ipg_get_rxbuff(struct net_device *dev, int entry)
730 730
731 IPG_DEBUG_MSG("_get_rxbuff\n"); 731 IPG_DEBUG_MSG("_get_rxbuff\n");
732 732
733 skb = netdev_alloc_skb(dev, IPG_RXSUPPORT_SIZE + NET_IP_ALIGN); 733 skb = netdev_alloc_skb(dev, sp->rxsupport_size + NET_IP_ALIGN);
734 if (!skb) { 734 if (!skb) {
735 sp->rx_buff[entry] = NULL; 735 sp->rx_buff[entry] = NULL;
736 return -ENOMEM; 736 return -ENOMEM;
@@ -1270,7 +1270,7 @@ static void ipg_nic_rx_with_end(struct net_device *dev,
1270 framelen = le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFRAMELEN; 1270 framelen = le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFRAMELEN;
1271 1271
1272 endframelen = framelen - jumbo->current_size; 1272 endframelen = framelen - jumbo->current_size;
1273 if (framelen > IPG_RXSUPPORT_SIZE) 1273 if (framelen > sp->rxsupport_size)
1274 dev_kfree_skb_irq(jumbo->skb); 1274 dev_kfree_skb_irq(jumbo->skb);
1275 else { 1275 else {
1276 memcpy(skb_put(jumbo->skb, endframelen), 1276 memcpy(skb_put(jumbo->skb, endframelen),
@@ -1311,7 +1311,7 @@ static void ipg_nic_rx_no_start_no_end(struct net_device *dev,
1311 if (skb) { 1311 if (skb) {
1312 if (jumbo->found_start) { 1312 if (jumbo->found_start) {
1313 jumbo->current_size += sp->rxfrag_size; 1313 jumbo->current_size += sp->rxfrag_size;
1314 if (jumbo->current_size <= IPG_RXSUPPORT_SIZE) { 1314 if (jumbo->current_size <= sp->rxsupport_size) {
1315 memcpy(skb_put(jumbo->skb, 1315 memcpy(skb_put(jumbo->skb,
1316 sp->rxfrag_size), 1316 sp->rxfrag_size),
1317 skb->data, sp->rxfrag_size); 1317 skb->data, sp->rxfrag_size);
@@ -1744,7 +1744,7 @@ static int ipg_nic_open(struct net_device *dev)
1744 1744
1745 IPG_DEBUG_MSG("_nic_open\n"); 1745 IPG_DEBUG_MSG("_nic_open\n");
1746 1746
1747 sp->rx_buf_sz = IPG_RXSUPPORT_SIZE; 1747 sp->rx_buf_sz = sp->rxsupport_size;
1748 1748
1749 /* Check for interrupt line conflicts, and request interrupt 1749 /* Check for interrupt line conflicts, and request interrupt
1750 * line for IPG. 1750 * line for IPG.
@@ -2237,6 +2237,7 @@ static int __devinit ipg_probe(struct pci_dev *pdev,
2237 2237
2238 sp->is_jumbo = IPG_JUMBO; 2238 sp->is_jumbo = IPG_JUMBO;
2239 sp->rxfrag_size = IPG_RXFRAG_SIZE; 2239 sp->rxfrag_size = IPG_RXFRAG_SIZE;
2240 sp->rxsupport_size = IPG_RXSUPPORT_SIZE;
2240 2241
2241 /* Declare IPG NIC functions for Ethernet device methods. 2242 /* Declare IPG NIC functions for Ethernet device methods.
2242 */ 2243 */