iwl3945: use iwl_get_hw_mode
[deliverable/linux.git] / drivers / net / gianfar.c
index efcbeb6c8673f569de72465c5eb327da4b2fd3b9..f5e6068f9b07006235168a1759ce9453cf3b5e30 100644 (file)
@@ -1423,15 +1423,11 @@ static void gfar_vlan_rx_register(struct net_device *dev,
 {
        struct gfar_private *priv = netdev_priv(dev);
        unsigned long flags;
-       struct vlan_group *old_grp;
        u32 tempval;
 
        spin_lock_irqsave(&priv->rxlock, flags);
 
-       old_grp = priv->vlgrp;
-
-       if (old_grp == grp)
-               return;
+       priv->vlgrp = grp;
 
        if (grp) {
                /* Enable VLAN tag insertion */
@@ -1622,10 +1618,18 @@ static int gfar_clean_tx_ring(struct net_device *dev)
 static void gfar_schedule_cleanup(struct net_device *dev)
 {
        struct gfar_private *priv = netdev_priv(dev);
-       if (netif_rx_schedule_prep(&priv->napi)) {
+       unsigned long flags;
+
+       spin_lock_irqsave(&priv->txlock, flags);
+       spin_lock(&priv->rxlock);
+
+       if (napi_schedule_prep(&priv->napi)) {
                gfar_write(&priv->regs->imask, IMASK_RTX_DISABLED);
-               __netif_rx_schedule(&priv->napi);
+               __napi_schedule(&priv->napi);
        }
+
+       spin_unlock(&priv->rxlock);
+       spin_unlock_irqrestore(&priv->txlock, flags);
 }
 
 /* Interrupt Handler for Transmit complete */
@@ -1878,7 +1882,7 @@ static int gfar_poll(struct napi_struct *napi, int budget)
                return budget;
 
        if (rx_cleaned < budget) {
-               netif_rx_complete(napi);
+               napi_complete(napi);
 
                /* Clear the halt bit in RSTAT */
                gfar_write(&priv->regs->rstat, RSTAT_CLEAR_RHALT);
This page took 0.02554 seconds and 5 git commands to generate.