Merge branch 'autosuspend' into for-next
[firefly-linux-kernel-4.4.55.git] / drivers / net / eexpress.c
index b751c1b96cfa77e2d445e3c182a4d2003cb8de73..1686dca2874865a7d012bbc39bd9d77c63b305eb 100644 (file)
@@ -967,7 +967,6 @@ static void eexp_hw_rx_pio(struct net_device *dev)
                                insw(ioaddr+DATAPORT, skb_put(skb,pkt_len),(pkt_len+1)>>1);
                                skb->protocol = eth_type_trans(skb,dev);
                                netif_rx(skb);
-                               dev->last_rx = jiffies;
                                dev->stats.rx_packets++;
                                dev->stats.rx_bytes += pkt_len;
                        }
@@ -1044,10 +1043,21 @@ static void eexp_hw_tx_pio(struct net_device *dev, unsigned short *buf,
        lp->last_tx = jiffies;
 }
 
+static const struct net_device_ops eexp_netdev_ops = {
+       .ndo_open               = eexp_open,
+       .ndo_stop               = eexp_close,
+       .ndo_start_xmit         = eexp_xmit,
+       .ndo_set_multicast_list = eexp_set_multicast,
+       .ndo_tx_timeout         = eexp_timeout,
+       .ndo_change_mtu         = eth_change_mtu,
+       .ndo_set_mac_address    = eth_mac_addr,
+       .ndo_validate_addr      = eth_validate_addr,
+};
+
 /*
  * Sanity check the suspected EtherExpress card
  * Read hardware address, reset card, size memory and initialize buffer
- * memory pointers. These are held in dev->priv, in case someone has more
+ * memory pointers. These are held in netdev_priv(), in case someone has more
  * than one card in a machine.
  */
 
@@ -1164,11 +1174,7 @@ static int __init eexp_hw_probe(struct net_device *dev, unsigned short ioaddr)
        lp->rx_buf_start = TX_BUF_START + (lp->num_tx_bufs*TX_BUF_SIZE);
        lp->width = buswidth;
 
-       dev->open = eexp_open;
-       dev->stop = eexp_close;
-       dev->hard_start_xmit = eexp_xmit;
-       dev->set_multicast_list = &eexp_set_multicast;
-       dev->tx_timeout = eexp_timeout;
+       dev->netdev_ops = &eexp_netdev_ops;
        dev->watchdog_timeo = 2*HZ;
 
        return register_netdev(dev);