linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, rt2400-devel@lists.sourceforge.net
Subject: [PATCH 05/19] rt2x00: Fix tx parameter initialization
Date: Sun, 3 Feb 2008 15:47:30 +0100	[thread overview]
Message-ID: <200802031547.30569.IvDoorn@gmail.com> (raw)
In-Reply-To: <200802031541.52167.IvDoorn@gmail.com>

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>
---
 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 411ed5d..380cc5b 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,
 	 * The passed variables are stored as real value ((2^n)-1).
 	 * Ralink registers require to know the bit number 'n'.
 	 */
-	if (params->cw_min)
+	if (params->cw_min > 0)
 		queue->cw_min = fls(params->cw_min);
 	else
 		queue->cw_min = 5; /* cw_min: 2^5 = 32. */
 
-	if (params->cw_max)
+	if (params->cw_max > 0)
 		queue->cw_max = fls(params->cw_max);
 	else
 		queue->cw_max = 10; /* cw_min: 2^10 = 1024. */
 
-	if (params->aifs)
+	if (params->aifs >= 0)
 		queue->aifs = params->aifs;
 	else
 		queue->aifs = 2;
-- 
1.5.3.8


  parent reply	other threads:[~2008-02-03 14:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-03 14:41 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
2008-02-03 14:42 ` [PATCH 01/19] rt2x00: Update copyright notice Ivo van Doorn
2008-02-03 14:45 ` [PATCH 02/19] rt2x00: Queue handling overhaul Ivo van Doorn
2008-02-03 14:46 ` [PATCH 03/19] rt2x00: don't write past the end when writing short descriptors on rt61 Ivo van Doorn
2008-02-03 14:47 ` [PATCH 04/19] rt2x00: Add new USB ID to rt2500usb Ivo van Doorn
2008-02-03 14:47 ` Ivo van Doorn [this message]
2008-02-03 14:48 ` [PATCH 06/19] rt2x00: Enable master and adhoc mode again Ivo van Doorn
2008-02-03 14:48 ` [PATCH 07/19] rt2x00: Driver requiring firmware should select crc algo Ivo van Doorn
2008-02-03 14:49 ` [PATCH 08/19] rt2x00: Add per-interface structure Ivo van Doorn
2008-02-03 14:50 ` [PATCH 09/19] rt2x00: Rate structure overhaul Ivo van Doorn
2008-02-03 14:51 ` [PATCH 10/19] rt2x00: Remove HWMODE_{A,B,G} Ivo van Doorn
2008-02-03 14:51 ` [PATCH 11/19] rt2x00: Remove TX_MGMT queue usage Ivo van Doorn
2008-02-03 14:52 ` [PATCH 12/19] rt2x00: Initialize QID from queue->qid Ivo van Doorn
2008-02-03 14:52 ` [PATCH 13/19] rt2x00: Use ieee80211_channel_to_frequency() Ivo van Doorn
2008-02-03 14:53 ` [PATCH 14/19] rt2x00: Make use of MAC80211_LED_TRIGGERS Ivo van Doorn
2008-02-03 14:54 ` [PATCH 15/19] rt2x00: Enable LED class support for rt2500usb/rt73usb Ivo van Doorn
2008-02-03 14:54 ` [PATCH 16/19] rt2x00: Fix rate initialization Ivo van Doorn
2008-02-03 14:54 ` [PATCH 17/19] rt2x00: Move beacon and atim queue defines into rt2x00 Ivo van Doorn
2008-02-03 14:55 ` [PATCH 18/19] rt2x00: Fix queue index handling Ivo van Doorn
2008-02-03 14:56 ` [PATCH 19/19] rt2x00: Release rt2x00 2.1.0 Ivo van Doorn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200802031547.30569.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rt2400-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).