|
@@ -532,8 +532,6 @@ struct et131x_adapter {
|
|
|
|
|
|
/* Stats */
|
|
|
struct ce_stats stats;
|
|
|
-
|
|
|
- struct net_device_stats net_stats;
|
|
|
};
|
|
|
|
|
|
static int eeprom_wait_ready(struct pci_dev *pdev, u32 *status)
|
|
@@ -2618,7 +2616,7 @@ static struct rfd *nic_rx_pkts(struct et131x_adapter *adapter)
|
|
|
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);
|
|
|
|
|
@@ -2666,7 +2664,7 @@ static void et131x_handle_recv_interrupt(struct et131x_adapter *adapter)
|
|
|
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)
|
|
@@ -3037,7 +3035,7 @@ static int et131x_send_packets(struct sk_buff *skb, struct net_device *netdev)
|
|
|
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) {
|
|
@@ -3046,7 +3044,7 @@ static int et131x_send_packets(struct sk_buff *skb, struct net_device *netdev)
|
|
|
*/
|
|
|
dev_kfree_skb_any(skb);
|
|
|
skb = NULL;
|
|
|
- adapter->net_stats.tx_dropped++;
|
|
|
+ adapter->netdev->stats.tx_dropped++;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -3065,7 +3063,7 @@ static inline void free_send_packet(struct et131x_adapter *adapter,
|
|
|
{
|
|
|
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;
|
|
|
|
|
@@ -3110,7 +3108,7 @@ static inline void free_send_packet(struct et131x_adapter *adapter,
|
|
|
/* 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;
|
|
@@ -4134,7 +4132,7 @@ out:
|
|
|
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 +
|
|
@@ -4426,7 +4424,7 @@ static void et131x_tx_timeout(struct net_device *netdev)
|
|
|
tcb->index,
|
|
|
tcb->flags);
|
|
|
|
|
|
- adapter->net_stats.tx_errors++;
|
|
|
+ adapter->netdev->stats.tx_errors++;
|
|
|
|
|
|
/* perform reset of tx/rx */
|
|
|
et131x_disable_txrx(netdev);
|