kfree(adapter->rx_pool);
adapter->rx_pool = NULL;
- adapter->num_active_rx_scrqs = 0;
}
static int init_rx_pools(struct net_device *netdev)
return -1;
}
- adapter->num_active_rx_scrqs = 0;
-
for (i = 0; i < rxadd_subcrqs; i++) {
rx_pool = &adapter->rx_pool[i];
rx_pool->next_free = 0;
}
- adapter->num_active_rx_scrqs = rxadd_subcrqs;
-
return 0;
}
kfree(adapter->tx_pool);
adapter->tx_pool = NULL;
- adapter->num_active_tx_scrqs = 0;
}
static int init_tx_pools(struct net_device *netdev)
if (!adapter->tx_pool)
return -1;
- adapter->num_active_tx_scrqs = 0;
-
for (i = 0; i < tx_subcrqs; i++) {
tx_pool = &adapter->tx_pool[i];
tx_pool->producer_index = 0;
}
- adapter->num_active_tx_scrqs = tx_subcrqs;
-
return 0;
}
return rc;
rc = init_tx_pools(netdev);
+
+ adapter->num_active_tx_scrqs = adapter->req_tx_queues;
+ adapter->num_active_rx_scrqs = adapter->req_rx_queues;
+
return rc;
}
release_tx_pools(adapter);
init_rx_pools(netdev);
init_tx_pools(netdev);
+
+ adapter->num_active_tx_scrqs = adapter->req_tx_queues;
+ adapter->num_active_rx_scrqs = adapter->req_rx_queues;
} else {
rc = reset_tx_pools(adapter);
if (rc)