iwlwifi: fix ct kill configuration for 5350
[safe/jmp/linux-2.6] / drivers / net / netx-eth.c
index b92430c..b9bed82 100644 (file)
@@ -17,7 +17,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/mii.h>
 
 #include <asm/io.h>
-#include <asm/hardware.h>
-#include <asm/arch/hardware.h>
-#include <asm/arch/netx-regs.h>
-#include <asm/arch/pfifo.h>
-#include <asm/arch/xc.h>
-#include <asm/arch/eth.h>
+#include <mach/hardware.h>
+#include <mach/netx-regs.h>
+#include <mach/pfifo.h>
+#include <mach/xc.h>
+#include <mach/eth.h>
 
 /* XC Fifo Offsets */
 #define EMPTY_PTR_FIFO(xcno)    (0 + ((xcno) << 3))    /* Index of the empty pointer FIFO */
@@ -98,7 +96,6 @@
 struct netx_eth_priv {
        void                    __iomem *sram_base, *xpec_base, *xmac_base;
        int                     id;
-       struct net_device_stats stats;
        struct mii_if_info      mii;
        u32                     msg_enable;
        struct xc               *xc;
@@ -130,8 +127,8 @@ netx_eth_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev)
                   FIFO_PTR_FRAMELEN(len));
 
        ndev->trans_start = jiffies;
-       priv->stats.tx_packets++;
-       priv->stats.tx_bytes += skb->len;
+       ndev->stats.tx_packets++;
+       ndev->stats.tx_bytes += skb->len;
 
        netif_stop_queue(ndev);
        spin_unlock_irq(&priv->lock);
@@ -157,7 +154,7 @@ static void netx_eth_receive(struct net_device *ndev)
        if (unlikely(skb == NULL)) {
                printk(KERN_NOTICE "%s: Low memory, packet dropped.\n",
                        ndev->name);
-               priv->stats.rx_dropped++;
+               ndev->stats.rx_dropped++;
                return;
        }
 
@@ -169,15 +166,14 @@ static void netx_eth_receive(struct net_device *ndev)
                FIFO_PTR_SEGMENT(seg) | FIFO_PTR_FRAMENO(frameno));
 
        ndev->last_rx = jiffies;
-       skb->dev = ndev;
        skb->protocol = eth_type_trans(skb, ndev);
        netif_rx(skb);
-       priv->stats.rx_packets++;
-       priv->stats.rx_bytes += len;
+       ndev->stats.rx_packets++;
+       ndev->stats.rx_bytes += len;
 }
 
 static irqreturn_t
-netx_eth_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+netx_eth_interrupt(int irq, void *dev_id)
 {
        struct net_device *ndev = dev_id;
        struct netx_eth_priv *priv = netdev_priv(ndev);
@@ -193,7 +189,7 @@ netx_eth_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 
                if ((status & ISR_CON_HI) || (status & ISR_IND_HI))
                        printk("%s: unexpected status: 0x%08x\n",
-                           __FUNCTION__, status);
+                           __func__, status);
 
                fill_level =
                    readl(NETX_PFIFO_FILL_LEVEL(IND_FIFO_PORT_LO(priv->id)));
@@ -212,18 +208,12 @@ netx_eth_interrupt(int irq, void *dev_id, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
-static struct net_device_stats *netx_eth_query_statistics(struct net_device *ndev)
-{
-       struct netx_eth_priv *priv = netdev_priv(ndev);
-       return &priv->stats;
-}
-
 static int netx_eth_open(struct net_device *ndev)
 {
        struct netx_eth_priv *priv = netdev_priv(ndev);
 
        if (request_irq
-           (ndev->irq, &netx_eth_interrupt, SA_SHIRQ, ndev->name, ndev))
+           (ndev->irq, &netx_eth_interrupt, IRQF_SHARED, ndev->name, ndev))
                return -EAGAIN;
 
        writel(ndev->dev_addr[0] |
@@ -325,7 +315,6 @@ static int netx_eth_enable(struct net_device *ndev)
        ndev->hard_start_xmit = netx_eth_hard_start_xmit;
        ndev->tx_timeout = netx_eth_timeout;
        ndev->watchdog_timeo = msecs_to_jiffies(5000);
-       ndev->get_stats = netx_eth_query_statistics;
        ndev->set_multicast_list = netx_eth_set_multicast_list;
 
        priv->msg_enable       = NETIF_MSG_LINK;
@@ -392,7 +381,6 @@ static int netx_eth_drv_probe(struct platform_device *pdev)
                ret = -ENOMEM;
                goto exit;
        }
-       SET_MODULE_OWNER(ndev);
        SET_NETDEV_DEV(ndev, &pdev->dev);
 
        platform_set_drvdata(pdev, ndev);
@@ -513,4 +501,4 @@ module_exit(netx_eth_cleanup);
 
 MODULE_AUTHOR("Sascha Hauer, Pengutronix");
 MODULE_LICENSE("GPL");
-
+MODULE_ALIAS("platform:" CARDNAME);