aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r--drivers/net/gianfar.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 3f7eab42aef1..eb8302c5ba8c 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -141,8 +141,6 @@ void gfar_start(struct net_device *dev);
141static void gfar_clear_exact_match(struct net_device *dev); 141static void gfar_clear_exact_match(struct net_device *dev);
142static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr); 142static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr);
143 143
144extern const struct ethtool_ops gfar_ethtool_ops;
145
146MODULE_AUTHOR("Freescale Semiconductor, Inc"); 144MODULE_AUTHOR("Freescale Semiconductor, Inc");
147MODULE_DESCRIPTION("Gianfar Ethernet Driver"); 145MODULE_DESCRIPTION("Gianfar Ethernet Driver");
148MODULE_LICENSE("GPL"); 146MODULE_LICENSE("GPL");
@@ -463,6 +461,9 @@ static int gfar_probe(struct of_device *ofdev,
463 goto register_fail; 461 goto register_fail;
464 } 462 }
465 463
464 device_init_wakeup(&dev->dev,
465 priv->device_flags & FSL_GIANFAR_DEV_HAS_MAGIC_PACKET);
466
466 /* fill out IRQ number and name fields */ 467 /* fill out IRQ number and name fields */
467 len_devname = strlen(dev->name); 468 len_devname = strlen(dev->name);
468 strncpy(&priv->int_name_tx[0], dev->name, len_devname); 469 strncpy(&priv->int_name_tx[0], dev->name, len_devname);
@@ -1200,6 +1201,8 @@ static int gfar_enet_open(struct net_device *dev)
1200 1201
1201 netif_start_queue(dev); 1202 netif_start_queue(dev);
1202 1203
1204 device_set_wakeup_enable(&dev->dev, priv->wol_en);
1205
1203 return err; 1206 return err;
1204} 1207}
1205 1208
@@ -1623,9 +1626,9 @@ static void gfar_schedule_cleanup(struct net_device *dev)
1623 spin_lock_irqsave(&priv->txlock, flags); 1626 spin_lock_irqsave(&priv->txlock, flags);
1624 spin_lock(&priv->rxlock); 1627 spin_lock(&priv->rxlock);
1625 1628
1626 if (netif_rx_schedule_prep(&priv->napi)) { 1629 if (napi_schedule_prep(&priv->napi)) {
1627 gfar_write(&priv->regs->imask, IMASK_RTX_DISABLED); 1630 gfar_write(&priv->regs->imask, IMASK_RTX_DISABLED);
1628 __netif_rx_schedule(&priv->napi); 1631 __napi_schedule(&priv->napi);
1629 } 1632 }
1630 1633
1631 spin_unlock(&priv->rxlock); 1634 spin_unlock(&priv->rxlock);
@@ -1882,7 +1885,7 @@ static int gfar_poll(struct napi_struct *napi, int budget)
1882 return budget; 1885 return budget;
1883 1886
1884 if (rx_cleaned < budget) { 1887 if (rx_cleaned < budget) {
1885 netif_rx_complete(napi); 1888 napi_complete(napi);
1886 1889
1887 /* Clear the halt bit in RSTAT */ 1890 /* Clear the halt bit in RSTAT */
1888 gfar_write(&priv->regs->rstat, RSTAT_CLEAR_RHALT); 1891 gfar_write(&priv->regs->rstat, RSTAT_CLEAR_RHALT);