tree-wide: fix assorted typos all over the place
[safe/jmp/linux-2.6] / drivers / net / sis900.c
index 2d4617b..9d94a14 100644 (file)
@@ -52,6 +52,7 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/kernel.h>
+#include <linux/sched.h>
 #include <linux/string.h>
 #include <linux/timer.h>
 #include <linux/errno.h>
@@ -214,7 +215,8 @@ static void sis900_check_mode (struct net_device *net_dev, struct mii_phy *mii_p
 static void sis900_tx_timeout(struct net_device *net_dev);
 static void sis900_init_tx_ring(struct net_device *net_dev);
 static void sis900_init_rx_ring(struct net_device *net_dev);
-static int sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev);
+static netdev_tx_t sis900_start_xmit(struct sk_buff *skb,
+                                    struct net_device *net_dev);
 static int sis900_rx(struct net_device *net_dev);
 static void sis900_finish_xmit (struct net_device *net_dev);
 static irqreturn_t sis900_interrupt(int irq, void *dev_instance);
@@ -1571,7 +1573,7 @@ static void sis900_tx_timeout(struct net_device *net_dev)
  *     tell upper layer if the buffer is full
  */
 
-static int
+static netdev_tx_t
 sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
 {
        struct sis900_private *sis_priv = netdev_priv(net_dev);
@@ -1584,7 +1586,7 @@ sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
        /* Don't transmit data before the complete of auto-negotiation */
        if(!sis_priv->autong_complete){
                netif_stop_queue(net_dev);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        spin_lock_irqsave(&sis_priv->lock, flags);
@@ -1628,7 +1630,7 @@ sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
                       "to slot %d.\n",
                       net_dev->name, skb->data, (int)skb->len, entry);
 
-       return 0;
+       return NETDEV_TX_OK;
 }
 
 /**
@@ -1758,7 +1760,7 @@ static int sis900_rx(struct net_device *net_dev)
                                sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE,
                                PCI_DMA_FROMDEVICE);
 
-                       /* refill the Rx buffer, what if there is not enought
+                       /* refill the Rx buffer, what if there is not enough
                         * memory for new socket buffer ?? */
                        if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) {
                                /*
@@ -1773,7 +1775,7 @@ static int sis900_rx(struct net_device *net_dev)
                        }
 
                        /* This situation should never happen, but due to
-                          some unknow bugs, it is possible that
+                          some unknown bugs, it is possible that
                           we are working on NULL sk_buff :-( */
                        if (sis_priv->rx_skbuff[entry] == NULL) {
                                if (netif_msg_rx_err(sis_priv))
@@ -2127,8 +2129,6 @@ static int mii_ioctl(struct net_device *net_dev, struct ifreq *rq, int cmd)
                return 0;
 
        case SIOCSMIIREG:               /* Write MII PHY register. */
-               if (!capable(CAP_NET_ADMIN))
-                       return -EPERM;
                mdio_write(net_dev, data->phy_id & 0x1f, data->reg_num & 0x1f, data->val_in);
                return 0;
        default: