From: Gertjan van Wingerde <gwingerde@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Ivo van Doorn <IvDoorn@gmail.com>,
<linux-wireless@vger.kernel.org>, <users@rt2x00.serialmonkey.com>,
Gertjan van Wingerde <gwingerde@gmail.com>
Subject: [PATCH 2/4] rt2x00: Fix rt2800usb TX descriptor writing.
Date: Thu, 13 May 2010 21:16:04 +0200 [thread overview]
Message-ID: <1273778166-3833-3-git-send-email-gwingerde@gmail.com> (raw)
In-Reply-To: <1273778166-3833-1-git-send-email-gwingerde@gmail.com>
The recent changes to skb handling introduced a bug in the rt2800usb
TX descriptor writing whereby the length of the USB packet wasn't
calculated correctly.
Found via code inspection, as the devices themselves didn't seem to mind.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
---
drivers/net/wireless/rt2x00/rt2800usb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 33d7ac9..eaf0a7e 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -414,7 +414,7 @@ static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
*/
rt2x00_desc_read(txi, 0, &word);
rt2x00_set_field32(&word, TXINFO_W0_USB_DMA_TX_PKT_LEN,
- skb->len + TXWI_DESC_SIZE);
+ skb->len - TXINFO_DESC_SIZE);
rt2x00_set_field32(&word, TXINFO_W0_WIV,
!test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc->flags));
rt2x00_set_field32(&word, TXINFO_W0_QSEL, 2);
--
1.7.1
next prev parent reply other threads:[~2010-05-13 19:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 19:16 [PATCH 0/4] Final set of fixes and cleanups for 2.6.35 Gertjan van Wingerde
2010-05-13 19:16 ` [PATCH 1/4] rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions Gertjan van Wingerde
2010-05-13 19:30 ` Ivo Van Doorn
2010-05-13 20:03 ` Gertjan van Wingerde
2010-05-13 19:16 ` Gertjan van Wingerde [this message]
2010-05-13 19:30 ` [PATCH 2/4] rt2x00: Fix rt2800usb TX descriptor writing Ivo Van Doorn
2010-05-13 19:16 ` [PATCH 3/4] rt2x00: Clean up USB vendor request buffer functions Gertjan van Wingerde
2010-05-13 19:31 ` Ivo Van Doorn
2010-05-13 19:16 ` [PATCH 4/4] rt2x00: Centralize rt2800 beacon writing Gertjan van Wingerde
2010-05-13 19:32 ` 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=1273778166-3833-3-git-send-email-gwingerde@gmail.com \
--to=gwingerde@gmail.com \
--cc=IvDoorn@gmail.com \
--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 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).