]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wireless/hostap/hostap_hw.c
[PATCH] lockdep: annotate hostap netdev ->xmit_lock
[linux-2.6-omap-h63xx.git] / drivers / net / wireless / hostap / hostap_hw.c
index b1f142d9e232b39cc42f5195cf6fd7b8d11d84ca..dafaa5ff5aa693d065f85cc4777e1c53c3c7054a 100644 (file)
@@ -30,7 +30,6 @@
  */
 
 
-#include <linux/config.h>
 
 #include <asm/delay.h>
 #include <asm/uaccess.h>
@@ -928,15 +927,15 @@ static int hfa384x_set_rid(struct net_device *dev, u16 rid, void *buf, int len)
 
        res = hfa384x_cmd(dev, HFA384X_CMDCODE_ACCESS_WRITE, rid, NULL, NULL);
        up(&local->rid_bap_sem);
+
        if (res) {
                printk(KERN_DEBUG "%s: hfa384x_set_rid: CMDCODE_ACCESS_WRITE "
                       "failed (res=%d, rid=%04x, len=%d)\n",
                       dev->name, res, rid, len);
-               return res;
-       }
 
-       if (res == -ETIMEDOUT)
-               prism2_hw_reset(dev);
+               if (res == -ETIMEDOUT)
+                       prism2_hw_reset(dev);
+       }
 
        return res;
 }
@@ -3096,6 +3095,14 @@ static void prism2_clear_set_tim_queue(local_info_t *local)
 }
 
 
+/*
+ * HostAP uses two layers of net devices, where the inner
+ * layer gets called all the time from the outer layer.
+ * This is a natural nesting, which needs a split lock type.
+ */
+static struct lock_class_key hostap_netdev_xmit_lock_key;
+
+
 static struct net_device *
 prism2_init_local_data(struct prism2_helper_functions *funcs, int card_idx,
                       struct device *sdev)
@@ -3260,6 +3267,8 @@ while (0)
        SET_NETDEV_DEV(dev, sdev);
        if (ret >= 0)
                ret = register_netdevice(dev);
+
+       lockdep_set_class(&dev->_xmit_lock, &hostap_netdev_xmit_lock_key);
        rtnl_unlock();
        if (ret < 0) {
                printk(KERN_WARNING "%s: register netdevice failed!\n",