]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/core/dev.c
slub: Reduce #ifdef ZONE_DMA by moving kmalloc_caches_dma near dma logic
[linux-2.6-omap-h63xx.git] / net / core / dev.c
index 9549417250bba71650547e747226ba9e8c0a1882..460e7f99ce3e3c2e3d252dd31ff251ce49841d0a 100644 (file)
@@ -1071,8 +1071,6 @@ int dev_close(struct net_device *dev)
         */
        call_netdevice_notifiers(NETDEV_GOING_DOWN, dev);
 
-       dev_deactivate(dev);
-
        clear_bit(__LINK_STATE_START, &dev->state);
 
        /* Synchronize to scheduled poll. We cannot touch poll list,
@@ -1083,6 +1081,8 @@ int dev_close(struct net_device *dev)
         */
        smp_mb__after_clear_bit(); /* Commit netif_running(). */
 
+       dev_deactivate(dev);
+
        /*
         *      Call the device specific close. This cannot fail.
         *      Only if device is UP
@@ -2143,7 +2143,7 @@ static int process_backlog(struct napi_struct *napi, int quota)
  *
  * The entry's receive function will be scheduled to run
  */
-void fastcall __napi_schedule(struct napi_struct *n)
+void __napi_schedule(struct napi_struct *n)
 {
        unsigned long flags;
 
@@ -2900,7 +2900,7 @@ int __dev_addr_add(struct dev_addr_list **list, int *count,
                }
        }
 
-       da = kmalloc(sizeof(*da), GFP_ATOMIC);
+       da = kzalloc(sizeof(*da), GFP_ATOMIC);
        if (da == NULL)
                return -ENOMEM;
        memcpy(da->da_addr, addr, alen);
@@ -3038,8 +3038,7 @@ int dev_unicast_sync(struct net_device *to, struct net_device *from)
 EXPORT_SYMBOL(dev_unicast_sync);
 
 /**
- *     dev_unicast_unsync - Remove synchronized addresses from the destination
- *                          device
+ *     dev_unicast_unsync - Remove synchronized addresses from the destination device
  *     @to: destination device
  *     @from: source device
  *
@@ -3330,7 +3329,7 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
                        return -EOPNOTSUPP;
 
                case SIOCADDMULTI:
-                       if (!dev->set_multicast_list ||
+                       if ((!dev->set_multicast_list && !dev->set_rx_mode) ||
                            ifr->ifr_hwaddr.sa_family != AF_UNSPEC)
                                return -EINVAL;
                        if (!netif_device_present(dev))
@@ -3339,7 +3338,7 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
                                          dev->addr_len, 1);
 
                case SIOCDELMULTI:
-                       if (!dev->set_multicast_list ||
+                       if ((!dev->set_multicast_list && !dev->set_rx_mode) ||
                            ifr->ifr_hwaddr.sa_family != AF_UNSPEC)
                                return -EINVAL;
                        if (!netif_device_present(dev))