#include <linux/dma-mapping.h>
#include <linux/platform_device.h>
#include <linux/if_vlan.h>
+#include <linux/version.h>
#include <bcm63xx_dev_enet.h>
#include "bcm63xx_enet.h"
/* no more packet in rx/tx queue, remove device from poll
* queue */
- netif_rx_complete(dev, napi);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+ netif_rx_schedule(dev, napi);
+#else
+ napi_complete(napi);
+#endif
/* restore rx/tx interrupt */
enet_dma_writel(priv, ENETDMA_IR_PKTDONE_MASK,
enet_dma_writel(priv, 0, ENETDMA_IRMASK_REG(priv->rx_chan));
enet_dma_writel(priv, 0, ENETDMA_IRMASK_REG(priv->tx_chan));
- netif_rx_schedule(dev, &priv->napi);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+ netif_rx_schedul(dev, &priv->napi);
+#else
+ napi_schedule(&priv->napi);
+#endif
return IRQ_HANDLED;
}
if (priv->has_phy) {
bus = &priv->mii_bus;
bus->name = "bcm63xx_enet MII bus";
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
bus->dev = &pdev->dev;
+#else
+ bus->parent = &pdev->dev;
+#endif
bus->priv = priv;
bus->read = bcm_enet_mdio_read_phylib;
bus->write = bcm_enet_mdio_write_phylib;