[WEXT]: Move to net/wireless
[deliverable/linux.git] / net / core / dev.c
index c8f5ea9aea81c81c352b2778269d2525c0ef0b46..700e4b5081b6ee6da6fe1f49b53bc57dfd0f8f63 100644 (file)
@@ -225,12 +225,6 @@ extern void netdev_unregister_sysfs(struct net_device *);
 
 *******************************************************************************/
 
-/*
- *     For efficiency
- */
-
-static int netdev_nit;
-
 /*
  *     Add a protocol ID to the list. Now that the input handler is
  *     smarter we can dispense with all the messy stuff that used to be
@@ -265,10 +259,9 @@ void dev_add_pack(struct packet_type *pt)
        int hash;
 
        spin_lock_bh(&ptype_lock);
-       if (pt->type == htons(ETH_P_ALL)) {
-               netdev_nit++;
+       if (pt->type == htons(ETH_P_ALL))
                list_add_rcu(&pt->list, &ptype_all);
-       else {
+       else {
                hash = ntohs(pt->type) & 15;
                list_add_rcu(&pt->list, &ptype_base[hash]);
        }
@@ -295,10 +288,9 @@ void __dev_remove_pack(struct packet_type *pt)
 
        spin_lock_bh(&ptype_lock);
 
-       if (pt->type == htons(ETH_P_ALL)) {
-               netdev_nit--;
+       if (pt->type == htons(ETH_P_ALL))
                head = &ptype_all;
-       else
+       else
                head = &ptype_base[ntohs(pt->type) & 15];
 
        list_for_each_entry(pt1, head, list) {
@@ -1210,7 +1202,7 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)
        skb->mac_len = skb->network_header - skb->mac_header;
        __skb_pull(skb, skb->mac_len);
 
-       if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
+       if (WARN_ON(skb->ip_summed != CHECKSUM_PARTIAL)) {
                if (skb_header_cloned(skb) &&
                    (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
                        return ERR_PTR(err);
@@ -1330,7 +1322,7 @@ static int dev_gso_segment(struct sk_buff *skb)
 int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        if (likely(!skb->next)) {
-               if (netdev_nit)
+               if (!list_empty(&ptype_all))
                        dev_queue_xmit_nit(skb, dev);
 
                if (netif_needs_gso(dev, skb)) {
@@ -2944,7 +2936,7 @@ int dev_ioctl(unsigned int cmd, void __user *arg)
                                }
                                dev_load(ifr.ifr_name);
                                rtnl_lock();
-                               /* Follow me in net/core/wireless.c */
+                               /* Follow me in net/wireless/wext.c */
                                ret = wireless_process_ioctl(&ifr, cmd);
                                rtnl_unlock();
                                if (IW_IS_GET(cmd) &&
@@ -3024,9 +3016,7 @@ int register_netdevice(struct net_device *dev)
        spin_lock_init(&dev->queue_lock);
        spin_lock_init(&dev->_xmit_lock);
        dev->xmit_lock_owner = -1;
-#ifdef CONFIG_NET_CLS_ACT
        spin_lock_init(&dev->ingress_lock);
-#endif
 
        dev->iflink = -1;
 
@@ -3138,7 +3128,7 @@ out:
  *     chain. 0 is returned on success. A negative errno code is returned
  *     on a failure to set up the device, or if the name is a duplicate.
  *
- *     This is a wrapper around register_netdev that takes the rtnl semaphore
+ *     This is a wrapper around register_netdevice that takes the rtnl semaphore
  *     and expands the device name if you passed a format string to
  *     alloc_netdev.
  */
This page took 0.026358 seconds and 5 git commands to generate.