mlx4_en renamed en_params.c to en_ethtool.c
[safe/jmp/linux-2.6] / drivers / net / hamradio / scc.c
index c17e39b..d712e7a 100644 (file)
 
 #include "z8530.h"
 
-static char banner[] __initdata = KERN_INFO "AX.25: Z8530 SCC driver version "VERSION".dl1bke\n";
+static const char banner[] __initdata = KERN_INFO \
+       "AX.25: Z8530 SCC driver version "VERSION".dl1bke\n";
 
 static void t_dwait(unsigned long);
 static void t_txdelay(unsigned long);
@@ -1518,7 +1519,7 @@ static int scc_net_alloc(const char *name, struct scc_channel *scc)
        if (!dev) 
                return -ENOMEM;
 
-       dev->priv = scc;
+       dev->ml_priv = scc;
        scc->dev = dev;
        spin_lock_init(&scc->lock);
        init_timer(&scc->tx_t);
@@ -1542,23 +1543,24 @@ static int scc_net_alloc(const char *name, struct scc_channel *scc)
 /* *                       Network driver methods                    * */
 /* ******************************************************************** */
 
+static const struct net_device_ops scc_netdev_ops = {
+       .ndo_open            = scc_net_open,
+       .ndo_stop            = scc_net_close,
+       .ndo_start_xmit      = scc_net_tx,
+       .ndo_set_mac_address = scc_net_set_mac_address,
+       .ndo_get_stats       = scc_net_get_stats,
+       .ndo_do_ioctl        = scc_net_ioctl,
+};
+
 /* ----> Initialize device <----- */
 
 static void scc_net_setup(struct net_device *dev)
 {
        dev->tx_queue_len    = 16;      /* should be enough... */
 
-       dev->open            = scc_net_open;
-       dev->stop            = scc_net_close;
-
-       dev->hard_start_xmit = scc_net_tx;
+       dev->netdev_ops      = &scc_netdev_ops;
        dev->header_ops      = &ax25_header_ops;
 
-       dev->set_mac_address = scc_net_set_mac_address;
-       dev->get_stats       = scc_net_get_stats;
-       dev->do_ioctl        = scc_net_ioctl;
-       dev->tx_timeout      = NULL;
-
        memcpy(dev->broadcast, &ax25_bcast,  AX25_ADDR_LEN);
        memcpy(dev->dev_addr,  &ax25_defaddr, AX25_ADDR_LEN);
  
@@ -1575,7 +1577,7 @@ static void scc_net_setup(struct net_device *dev)
 
 static int scc_net_open(struct net_device *dev)
 {
-       struct scc_channel *scc = (struct scc_channel *) dev->priv;
+       struct scc_channel *scc = (struct scc_channel *) dev->ml_priv;
 
        if (!scc->init)
                return -EINVAL;
@@ -1593,7 +1595,7 @@ static int scc_net_open(struct net_device *dev)
 
 static int scc_net_close(struct net_device *dev)
 {
-       struct scc_channel *scc = (struct scc_channel *) dev->priv;
+       struct scc_channel *scc = (struct scc_channel *) dev->ml_priv;
        unsigned long flags;
 
        netif_stop_queue(dev);
@@ -1627,7 +1629,6 @@ static void scc_net_rx(struct scc_channel *scc, struct sk_buff *skb)
        skb->protocol = ax25_type_trans(skb, scc->dev);
        
        netif_rx(skb);
-       scc->dev->last_rx = jiffies;
        return;
 }
 
@@ -1635,7 +1636,7 @@ static void scc_net_rx(struct scc_channel *scc, struct sk_buff *skb)
 
 static int scc_net_tx(struct sk_buff *skb, struct net_device *dev)
 {
-       struct scc_channel *scc = (struct scc_channel *) dev->priv;
+       struct scc_channel *scc = (struct scc_channel *) dev->ml_priv;
        unsigned long flags;
        char kisscmd;
 
@@ -1705,7 +1706,7 @@ static int scc_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
        struct scc_mem_config memcfg;
        struct scc_hw_config hwcfg;
        struct scc_calibrate cal;
-       struct scc_channel *scc = (struct scc_channel *) dev->priv;
+       struct scc_channel *scc = (struct scc_channel *) dev->ml_priv;
        int chan;
        unsigned char device_name[IFNAMSIZ];
        void __user *arg = ifr->ifr_data;
@@ -1952,7 +1953,7 @@ static int scc_net_set_mac_address(struct net_device *dev, void *addr)
 
 static struct net_device_stats *scc_net_get_stats(struct net_device *dev)
 {
-       struct scc_channel *scc = (struct scc_channel *) dev->priv;
+       struct scc_channel *scc = (struct scc_channel *) dev->ml_priv;
        
        scc->dev_stat.rx_errors = scc->stat.rxerrs + scc->stat.rx_over;
        scc->dev_stat.tx_errors = scc->stat.txerrs + scc->stat.tx_under;
@@ -2074,7 +2075,7 @@ static int scc_net_seq_show(struct seq_file *seq, void *v)
         return 0;
 }
 
-static struct seq_operations scc_net_seq_ops = {
+static const struct seq_operations scc_net_seq_ops = {
        .start  = scc_net_seq_start,
        .next   = scc_net_seq_next,
        .stop   = scc_net_seq_stop,