diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-02-03 09:47:30 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:19:27 -0500 |
commit | 3b3618ad5117331b6fa7cafc41fc18935709e569 (patch) | |
tree | 592218a0d70536abc6c9d7a281b1899ac07c8f02 /drivers/net | |
parent | d7bafff3f94efd850f8744d683e63812ff8d55c5 (diff) |
rt2x00: Fix tx parameter initialization
Check if the aifs, cw_min and cw_max are above 0
when determining if the default should be used.
Tor aifs a negative number is used to determine
if the default should be used or not.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 411ed5d0859..380cc5b3313 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -396,17 +396,17 @@ int rt2x00mac_conf_tx(struct ieee80211_hw *hw, int queue_idx, | |||
396 | * The passed variables are stored as real value ((2^n)-1). | 396 | * The passed variables are stored as real value ((2^n)-1). |
397 | * Ralink registers require to know the bit number 'n'. | 397 | * Ralink registers require to know the bit number 'n'. |
398 | */ | 398 | */ |
399 | if (params->cw_min) | 399 | if (params->cw_min > 0) |
400 | queue->cw_min = fls(params->cw_min); | 400 | queue->cw_min = fls(params->cw_min); |
401 | else | 401 | else |
402 | queue->cw_min = 5; /* cw_min: 2^5 = 32. */ | 402 | queue->cw_min = 5; /* cw_min: 2^5 = 32. */ |
403 | 403 | ||
404 | if (params->cw_max) | 404 | if (params->cw_max > 0) |
405 | queue->cw_max = fls(params->cw_max); | 405 | queue->cw_max = fls(params->cw_max); |
406 | else | 406 | else |
407 | queue->cw_max = 10; /* cw_min: 2^10 = 1024. */ | 407 | queue->cw_max = 10; /* cw_min: 2^10 = 1024. */ |
408 | 408 | ||
409 | if (params->aifs) | 409 | if (params->aifs >= 0) |
410 | queue->aifs = params->aifs; | 410 | queue->aifs = params->aifs; |
411 | else | 411 | else |
412 | queue->aifs = 2; | 412 | queue->aifs = 2; |