All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: John Linville <linville@tuxdriver.com>
Cc: "linux-wireless" <linux-wireless@vger.kernel.org>,
	users@rt2x00.serialmonkey.com,
	Benoit PAPILLAULT <benoit.papillault@free.fr>
Subject: [PATCH 5/7] rt2x00: wireless CLI ID and packet ID must not be 0
Date: Mon, 17 Aug 2009 18:55:15 +0200	[thread overview]
Message-ID: <200908171855.15390.IvDoorn@gmail.com> (raw)
In-Reply-To: <200908171854.50790.IvDoorn@gmail.com>

In the TX descriptor the Packet ID must not be 0,
so add 1 to the ID. The wireless CLI ID is not allowed
to be 0 either, but also must be initialized with the
wcid value rather then keyid.

Based on a patch for rt2800pci from Benoit

Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00/rt2800usb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 6de2eda..3633e58 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -1995,11 +1995,11 @@ static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXWI_W1_BW_WIN_SIZE, txdesc->ba_size);
 	rt2x00_set_field32(&word, TXWI_W1_WIRELESS_CLI_ID,
 			   test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ?
-			       txdesc->key_idx : 0xff);
+			       (skbdesc->entry->entry_idx + 1) : 0xff);
 	rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT,
 			   skb->len - txdesc->l2pad);
 	rt2x00_set_field32(&word, TXWI_W1_PACKETID,
-			   skbdesc->entry->entry_idx);
+			   skbdesc->entry->queue->qid + 1);
 	rt2x00_desc_write(txwi, 1, word);
 
 	/*
-- 
1.6.4


  reply	other threads:[~2009-08-17 16:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-17 16:53 [PATCH 1/7] rt2x00: Fix RFKILL polling Ivo van Doorn
2009-08-17 16:53 ` [PATCH 2/7] rt2x00: Fix for rt2800usb for SHARED_KEY_TABLE initializations Ivo van Doorn
2009-08-17 16:54   ` [PATCH 3/7] rt2x00: Add new RF chip defines Ivo van Doorn
     [not found]   ` <200908171854.19205.IvDoorn@gmail.com>
2009-08-17 16:54     ` [PATCH 4/7] rt2x00: Set SKBDESC_L2_PADDED in RX path Ivo van Doorn
2009-08-17 16:55       ` Ivo van Doorn [this message]
2009-08-17 16:55         ` [PATCH 6/7] rt2x00: Fix MCS register intialization Ivo van Doorn
2009-08-17 16:56           ` [PATCH 7/7] rt2x00: Add support for retry rates Ivo van Doorn
2009-08-17 20:46       ` [rt2x00-users] [PATCH 4/7] rt2x00: Set SKBDESC_L2_PADDED in RX path Benoit PAPILLAULT
2009-08-17 23:33         ` 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=200908171855.15390.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=benoit.papillault@free.fr \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=users@rt2x00.serialmonkey.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.