/* Stats */
struct ce_stats stats;
-
- struct net_device_stats net_stats;
};
static int eeprom_wait_ready(struct pci_dev *pdev, u32 *status)
return NULL;
}
- adapter->net_stats.rx_bytes += rfd->len;
+ adapter->netdev->stats.rx_bytes += rfd->len;
memcpy(skb_put(skb, rfd->len), fbr->virt[buff_index], rfd->len);
continue;
/* Increment the number of packets we received */
- adapter->net_stats.rx_packets++;
+ adapter->netdev->stats.rx_packets++;
/* Set the status on the packet, either resources or success */
if (rx_ring->num_ready_recv < RFD_LOW_WATER_MARK)
dev_kfree_skb_any(skb);
skb = NULL;
- adapter->net_stats.tx_dropped++;
+ adapter->netdev->stats.tx_dropped++;
} else {
status = send_packet(skb, adapter);
if (status != 0 && status != -ENOMEM) {
*/
dev_kfree_skb_any(skb);
skb = NULL;
- adapter->net_stats.tx_dropped++;
+ adapter->netdev->stats.tx_dropped++;
}
}
}
{
unsigned long flags;
struct tx_desc *desc = NULL;
- struct net_device_stats *stats = &adapter->net_stats;
+ struct net_device_stats *stats = &adapter->netdev->stats;
struct tx_ring *tx_ring = &adapter->tx_ring;
u64 dma_addr;
/* Add the TCB to the Ready Q */
spin_lock_irqsave(&adapter->tcb_ready_qlock, flags);
- adapter->net_stats.tx_packets++;
+ stats->tx_packets++;
if (tx_ring->tcb_qtail)
tx_ring->tcb_qtail->next = tcb;
static struct net_device_stats *et131x_stats(struct net_device *netdev)
{
struct et131x_adapter *adapter = netdev_priv(netdev);
- struct net_device_stats *stats = &adapter->net_stats;
+ struct net_device_stats *stats = &adapter->netdev->stats;
struct ce_stats *devstat = &adapter->stats;
stats->rx_errors = devstat->rx_length_errs +
tcb->index,
tcb->flags);
- adapter->net_stats.tx_errors++;
+ adapter->netdev->stats.tx_errors++;
/* perform reset of tx/rx */
et131x_disable_txrx(netdev);