linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: "John W. Linville" <linville@redhat.com>
Cc: "linux-wireless" <linux-wireless@vger.kernel.org>,
	rt2400-devel@lists.sourceforge.net
Subject: [PATCH 07/24] rt2x00: Use skbdesc fields for descriptor initialization
Date: Sun, 9 Mar 2008 22:41:53 +0100	[thread overview]
Message-ID: <200803092241.53703.IvDoorn@gmail.com> (raw)
In-Reply-To: <200803092237.43451.IvDoorn@gmail.com>

In rt2x00lib_write_tx_desc() the skb->data and skb->len fields
were incorrectly used. For USB drivers both of those values
contain invalid data (skb->data points to the device descriptor,
skb->len contains the frame _and_ descriptor length).

Instead of using the skbuffer fields we should use the skbdesc
fields which are correctly initialized and contain all the data
that we need.

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

diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 141b9b8..455d076 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -630,7 +630,7 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 {
 	struct txentry_desc txdesc;
 	struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb);
-	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
+	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skbdesc->data;
 	const struct rt2x00_rate *rate;
 	int tx_rate;
 	int length;
@@ -710,7 +710,7 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	txdesc.signal = rate->plcp;
 	txdesc.service = 0x04;
 
-	length = skb->len + FCS_LEN;
+	length = skbdesc->data_len + FCS_LEN;
 	if (rate->flags & DEV_RATE_OFDM) {
 		__set_bit(ENTRY_TXD_OFDM_RATE, &txdesc.flags);
 
-- 
1.5.4.3


  parent reply	other threads:[~2008-03-09 21:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-09 21:37 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
2008-03-09 21:38 ` [PATCH 01/24] rt2x00: Align RX descriptor to 4 bytes Ivo van Doorn
2008-03-09 21:38 ` [PATCH 02/24] rt2x00: Initialize TX control field in data entries Ivo van Doorn
2008-03-09 21:39 ` [PATCH 03/24] rt2x00: Use the correct size when copying the control info in txdone Ivo van Doorn
2008-03-09 21:40 ` [PATCH 04/24] rt2x00: Don't use uninitialized desc_len Ivo van Doorn
2008-03-09 21:40 ` [PATCH 05/24] rt2x00: never disable multicast because it disables broadcast too Ivo van Doorn
2008-03-09 21:41 ` [PATCH 06/24] rt2x00: Don't use unitialized rxdesc->size Ivo van Doorn
2008-03-09 21:41 ` Ivo van Doorn [this message]
2008-03-09 21:42 ` [PATCH 08/24] rt2x00: Add new D-Link USB ID Ivo van Doorn
2008-03-09 21:42 ` [PATCH 09/24] rt2x00: Only disable beaconing just before beacon update Ivo van Doorn
2008-03-09 21:43 ` [PATCH 10/24] rt2x00:correct rx packet length for USB devices Ivo van Doorn
2008-03-09 21:43 ` [PATCH 11/24] rt2x00: Fix trivial log message Ivo van Doorn
2008-03-09 21:44 ` [PATCH 12/24] rt2x00: Upgrade queue->lock to use irqsave Ivo van Doorn
2008-03-09 21:44 ` [PATCH 13/24] rt2x00: Move firmware checksumming to driver Ivo van Doorn
2008-03-09 21:45 ` [PATCH 14/24] rt2x00: Start bugging when rt2x00lib doesn't filter SW diversity Ivo van Doorn
2008-03-09 21:45 ` [PATCH 15/24] rt2x00: Check IEEE80211_TXCTL_SEND_AFTER_DTIM flag Ivo van Doorn
2008-03-09 21:46 ` [PATCH 16/24] rt2x00: Rename config_preamble() to config_erp() Ivo van Doorn
2008-03-09 21:46 ` [PATCH 17/24] rt2x00: Add suspend/resume handlers to rt2x00rfkill Ivo van Doorn
2008-03-09 21:47 ` [PATCH 18/24] rt2x00: Make rt2x00leds_register return void Ivo van Doorn
2008-03-09 21:47 ` [PATCH 19/24] rt2x00: Always enable TSF ticking Ivo van Doorn
2008-03-09 21:48 ` [PATCH 20/24] rt2x00: Fix basic rate initialization Ivo van Doorn
2008-03-09 21:48 ` [PATCH 21/24] rt2x00: Fix compile error when rfkill is disabled Ivo van Doorn
2008-03-09 21:48 ` [PATCH 22/24] rt2x00: Fix RX DMA ring initialization Ivo van Doorn
2008-03-09 21:49 ` [PATCH 23/24] rt2x00: Fix rt2400pci signal Ivo van Doorn
2008-03-09 21:49 ` [PATCH 24/24] rt2x00: Release rt2x00 2.1.4 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=200803092241.53703.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@redhat.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).