mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
arc_emac: Use net_device_stats from struct net_device
Instead of using a private copy of struct net_device_stats in struct arc_emac_priv, use stats from struct net_device. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
21621e93f2
commit
ff458f6f1e
2 changed files with 5 additions and 7 deletions
|
@ -140,7 +140,7 @@ static const struct ethtool_ops arc_emac_ethtool_ops = {
|
|||
static void arc_emac_tx_clean(struct net_device *ndev)
|
||||
{
|
||||
struct arc_emac_priv *priv = netdev_priv(ndev);
|
||||
struct net_device_stats *stats = &priv->stats;
|
||||
struct net_device_stats *stats = &ndev->stats;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < TX_BD_NUM; i++) {
|
||||
|
@ -202,7 +202,7 @@ static int arc_emac_rx(struct net_device *ndev, int budget)
|
|||
|
||||
for (work_done = 0; work_done < budget; work_done++) {
|
||||
unsigned int *last_rx_bd = &priv->last_rx_bd;
|
||||
struct net_device_stats *stats = &priv->stats;
|
||||
struct net_device_stats *stats = &ndev->stats;
|
||||
struct buffer_state *rx_buff = &priv->rx_buff[*last_rx_bd];
|
||||
struct arc_emac_bd *rxbd = &priv->rxbd[*last_rx_bd];
|
||||
unsigned int pktlen, info = le32_to_cpu(rxbd->info);
|
||||
|
@ -318,7 +318,7 @@ static irqreturn_t arc_emac_intr(int irq, void *dev_instance)
|
|||
{
|
||||
struct net_device *ndev = dev_instance;
|
||||
struct arc_emac_priv *priv = netdev_priv(ndev);
|
||||
struct net_device_stats *stats = &priv->stats;
|
||||
struct net_device_stats *stats = &ndev->stats;
|
||||
unsigned int status;
|
||||
|
||||
status = arc_reg_get(priv, R_STATUS);
|
||||
|
@ -529,7 +529,7 @@ static int arc_emac_stop(struct net_device *ndev)
|
|||
static struct net_device_stats *arc_emac_stats(struct net_device *ndev)
|
||||
{
|
||||
struct arc_emac_priv *priv = netdev_priv(ndev);
|
||||
struct net_device_stats *stats = &priv->stats;
|
||||
struct net_device_stats *stats = &ndev->stats;
|
||||
unsigned long miss, rxerr;
|
||||
u8 rxcrc, rxfram, rxoflow;
|
||||
|
||||
|
@ -565,7 +565,7 @@ static int arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
|
|||
{
|
||||
struct arc_emac_priv *priv = netdev_priv(ndev);
|
||||
unsigned int len, *txbd_curr = &priv->txbd_curr;
|
||||
struct net_device_stats *stats = &priv->stats;
|
||||
struct net_device_stats *stats = &ndev->stats;
|
||||
__le32 *info = &priv->txbd[*txbd_curr].info;
|
||||
dma_addr_t addr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue