diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-05-05 13:12:55 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-05-05 13:12:55 +0400 |
commit | f3831a592fe4332a70baad64a860b345398885b7 (patch) | |
tree | fd27b986295fe5a4f1c0924a804228f829a4c894 /drivers/net/wireless/orinoco/hw.c | |
parent | 376f7839b72ec526173cafb5d8eadfc61e2effdf (diff) | |
parent | 8560b9321f9050968f393ce1ec67e47c1a0bd5cf (diff) | |
download | linux-f3831a592fe4332a70baad64a860b345398885b7.tar.xz |
Merge commit 'takashi/topic/asoc' into for-2.6.31
Diffstat (limited to 'drivers/net/wireless/orinoco/hw.c')
-rw-r--r-- | drivers/net/wireless/orinoco/hw.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/orinoco/hw.c b/drivers/net/wireless/orinoco/hw.c index 081428d9409e..632fac86a308 100644 --- a/drivers/net/wireless/orinoco/hw.c +++ b/drivers/net/wireless/orinoco/hw.c @@ -372,15 +372,13 @@ int __orinoco_hw_set_tkip_key(hermes_t *hw, int key_idx, int set_tx, } /* Wait upto 100ms for tx queue to empty */ - k = 100; - do { - k--; + for (k = 100; k > 0; k--) { udelay(1000); ret = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_TXQUEUEEMPTY, &xmitting); - if (ret) + if (ret || !xmitting) break; - } while ((k > 0) && xmitting); + } if (k == 0) ret = -ETIMEDOUT; |