diff options
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, | |||
372 | } | 372 | } |
373 | 373 | ||
374 | /* Wait upto 100ms for tx queue to empty */ | 374 | /* Wait upto 100ms for tx queue to empty */ |
375 | k = 100; | 375 | for (k = 100; k > 0; k--) { |
376 | do { | ||
377 | k--; | ||
378 | udelay(1000); | 376 | udelay(1000); |
379 | ret = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_TXQUEUEEMPTY, | 377 | ret = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_TXQUEUEEMPTY, |
380 | &xmitting); | 378 | &xmitting); |
381 | if (ret) | 379 | if (ret || !xmitting) |
382 | break; | 380 | break; |
383 | } while ((k > 0) && xmitting); | 381 | } |
384 | 382 | ||
385 | if (k == 0) | 383 | if (k == 0) |
386 | ret = -ETIMEDOUT; | 384 | ret = -ETIMEDOUT; |