net: Fix IXP 2000 network driver building.
[linux-2.6.git] / drivers / net / ixp2000 / ixpdev.c
index 127243461a5161c09f33e5bdbf80f8cc1286712f..9aee0cc922c952191512be96d22433f0ec59b1fd 100644 (file)
@@ -21,6 +21,7 @@
 #include "ixp2400_tx.ucode"
 #include "ixpdev_priv.h"
 #include "ixpdev.h"
+#include "pm3386.h"
 
 #define DRV_MODULE_VERSION     "0.2"
 
@@ -271,6 +272,15 @@ static int ixpdev_close(struct net_device *dev)
        return 0;
 }
 
+static struct net_device_stats *ixpdev_get_stats(struct net_device *dev)
+{
+       struct ixpdev_priv *ip = netdev_priv(dev);
+
+       pm3386_get_stats(ip->channel, &(dev->stats));
+
+       return &(dev->stats);
+}
+
 static const struct net_device_ops ixpdev_netdev_ops = {
        .ndo_open               = ixpdev_open,
        .ndo_stop               = ixpdev_close,
@@ -278,6 +288,7 @@ static const struct net_device_ops ixpdev_netdev_ops = {
        .ndo_change_mtu         = eth_change_mtu,
        .ndo_validate_addr      = eth_validate_addr,
        .ndo_set_mac_address    = eth_mac_addr,
+       .ndo_get_stats          = ixpdev_get_stats,
 #ifdef CONFIG_NET_POLL_CONTROLLER
        .ndo_poll_controller    = ixpdev_poll_controller,
 #endif