Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
[linux-2.6.git] / drivers / net / hamradio / dmascc.c
index 881bf81..9ee76b4 100644 (file)
@@ -331,8 +331,8 @@ static int __init dmascc_init(void)
                        for (i = 0; i < MAX_NUM_DEVS && io[i]; i++) {
                                j = (io[i] -
                                     hw[h].io_region) / hw[h].io_delta;
-                               if (j >= 0 && j < hw[h].num_devs
-                                   && hw[h].io_region +
+                               if (j >= 0 && j < hw[h].num_devs &&
+                                   hw[h].io_region +
                                    j * hw[h].io_delta == io[i]) {
                                        base[j] = io[i];
                                }
@@ -396,8 +396,8 @@ static int __init dmascc_init(void)
                                        t_val =
                                            inb(t1[i]) + (inb(t1[i]) << 8);
                                        /* Also check whether counter did wrap */
-                                       if (t_val == 0
-                                           || t_val > TMR_0_HZ / HZ * 10)
+                                       if (t_val == 0 ||
+                                           t_val > TMR_0_HZ / HZ * 10)
                                                counting[i] = 0;
                                        delay[i] = jiffies - start[i];
                                }
@@ -445,6 +445,7 @@ static const struct net_device_ops scc_netdev_ops = {
        .ndo_stop = scc_close,
        .ndo_start_xmit = scc_send_packet,
        .ndo_do_ioctl = scc_ioctl,
+       .ndo_set_mac_address = scc_set_mac_address,
 };
 
 static int __init setup_adapter(int card_base, int type, int n)
@@ -584,7 +585,6 @@ static int __init setup_adapter(int card_base, int type, int n)
                dev->irq = irq;
                dev->netdev_ops = &scc_netdev_ops;
                dev->header_ops = &ax25_header_ops;
-               dev->set_mac_address = scc_set_mac_address;
        }
        if (register_netdev(info->dev[0])) {
                printk(KERN_ERR "dmascc: could not register %s\n",
@@ -959,7 +959,7 @@ static int scc_send_packet(struct sk_buff *skb, struct net_device *dev)
        spin_unlock_irqrestore(&priv->ring_lock, flags);
        dev_kfree_skb(skb);
 
-       return 0;
+       return NETDEV_TX_OK;
 }