/* This function frees the memory allocated to the q_vectors. In addition if NAPI is enabled it will delete any references to the NAPI struct prior to freeing the q_vector.  */
static void ixgbe_free_q_vectors(struct ixgbe_adapter *adapter)
/* This function frees the memory allocated to the q_vectors. In addition if NAPI is enabled it will delete any references to the NAPI struct prior to freeing the q_vector.  */
static void ixgbe_free_q_vectors(struct ixgbe_adapter *adapter)
{
	int q_idx, num_q_vectors;
	if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED)
		num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;
	else
		num_q_vectors = 1;
	for (q_idx = 0; q_idx < num_q_vectors; q_idx++) {
		struct ixgbe_q_vector *q_vector = adapter->q_vector[q_idx];
		adapter->q_vector[q_idx] = NULL;
		netif_napi_del(&q_vector->napi);
		kfree(q_vector);
	}
}