linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / net / wireless / hostap / hostap_hw.c
index 328e9a1..b1f142d 100644 (file)
@@ -928,16 +928,16 @@ 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);
-
-               if (res == -ETIMEDOUT)
-                       prism2_hw_reset(dev);
+               return res;
        }
 
+       if (res == -ETIMEDOUT)
+               prism2_hw_reset(dev);
+
        return res;
 }