From: Pavel Roskin <proski@gnu.org>
To: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Markus Baier <Markus_Baier@web.de>, linux-wireless@vger.kernel.org
Subject: Re: [BISECTED] [PATCH v2 8/8] rt2x00: Properly request tx headroom for alignment operations.
Date: Tue, 22 Dec 2009 00:25:49 -0500 [thread overview]
Message-ID: <1261459549.31982.2.camel@ct> (raw)
In-Reply-To: <4B2FA1CF.1010903@gmail.com>
Quoting Gertjan van Wingerde <gwingerde@gmail.com>:
>> Perhaps non-zero headroom is not handled correctly?
>>
>
> Hmmm, perhaps the problem is that the headroom is not a multiple of 4.
> Can you check what happens when you set the extra_tx_headroom fixed
> to e.g. 20?
I tried 64 and 2, and neither worked. rt2x00dev->ops->extra_tx_headroom
is 0 for me. When the rt2x00dev->hw->extra_tx_headroom is 2, I observed
invalid packets being emitted (using another interface). The packets
have two bytes inserted in the beginning of the frame:
0000 00 00 1c 00 6f 48 00 00 fc de ee 13 00 00 00 00 ....oH.. ........
0010 10 02 85 09 a0 00 b1 b7 00 00 00 00 00 00 40 00 ........ ......@.
radiotap, 28 bytes ---------------------->
2 extra bytes <--->
correct 802.11 header <----
0020 00 00 ff ff ff ff ff ff 00 d0 41 af ad 2c ff ff ........ ..A..,..
0030 ff ff cf 02 c0 02 00 05 77 62 65 6e 64 01 08 02 ........ wbend...
0040 04 0b 16 0c 12 18 24 32 04 30 48 e7 f8 07 9d ......$2 .0H....
Here's a patch that is working for me, but I would not vouch for its
correctness. Signing off just in case it happens to be correct ;-)
rt2x00: use correct headroom for transmission
Use rt2x00dev->ops->extra_tx_headroom, not
rt2x00dev->hw->extra_tx_headroom in the tx code, as the later includes
headroom only meant for the monitor mode.
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
drivers/net/wireless/rt2x00/rt2x00queue.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 3d8fb68..0b4801a 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -104,7 +104,7 @@ void rt2x00queue_map_txskb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb)
* is also mapped to the DMA so it can be used for transfering
* additional descriptor information to the hardware.
*/
- skb_push(skb, rt2x00dev->hw->extra_tx_headroom);
+ skb_push(skb, rt2x00dev->ops->extra_tx_headroom);
skbdesc->skb_dma =
dma_map_single(rt2x00dev->dev, skb->data, skb->len, DMA_TO_DEVICE);
@@ -112,7 +112,7 @@ void rt2x00queue_map_txskb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb)
/*
* Restore data pointer to original location again.
*/
- skb_pull(skb, rt2x00dev->hw->extra_tx_headroom);
+ skb_pull(skb, rt2x00dev->ops->extra_tx_headroom);
skbdesc->flags |= SKBDESC_DMA_MAPPED_TX;
}
@@ -134,7 +134,7 @@ void rt2x00queue_unmap_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb)
* by the driver, but it was actually mapped to DMA.
*/
dma_unmap_single(rt2x00dev->dev, skbdesc->skb_dma,
- skb->len + rt2x00dev->hw->extra_tx_headroom,
+ skb->len + rt2x00dev->ops->extra_tx_headroom,
DMA_TO_DEVICE);
skbdesc->flags &= ~SKBDESC_DMA_MAPPED_TX;
}
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2009-12-22 5:25 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-23 21:44 [PATCH v2 0/8] Assorted fixes and cleanups for rt2x00 and mac80211 Gertjan van Wingerde
2009-11-23 21:44 ` [PATCH v2 1/8] rt2x00: Only initialize HT on rt2800 devices that support it Gertjan van Wingerde
2009-11-23 21:44 ` [PATCH v2 2/8] rt2x00: Remove unused variable frame_control from rt2x00mac_tx Gertjan van Wingerde
2009-11-23 21:44 ` [PATCH v2 3/8] rt2x00: Clean up use of rt2x00_intf_is_pci Gertjan van Wingerde
2009-11-23 21:44 ` [PATCH v2 4/8] rt2x00: Fix typo (lengt --> length) in rt2x00queue.c Gertjan van Wingerde
2009-11-23 21:44 ` [PATCH v2 5/8] rt2x00: Whitespace cleanup Gertjan van Wingerde
2009-11-23 21:44 ` [PATCH v2 6/8] rt2x00: Centralize setting of extra TX headroom requested by rt2x00 Gertjan van Wingerde
2009-11-23 21:44 ` [PATCH v2 7/8] mac80211: Add define for TX headroom reserved by mac80211 itself Gertjan van Wingerde
2009-11-23 21:44 ` [PATCH v2 8/8] rt2x00: Properly request tx headroom for alignment operations Gertjan van Wingerde
2009-11-24 17:19 ` Ivo van Doorn
2009-11-24 19:12 ` Gertjan van Wingerde
2009-11-24 20:04 ` Ivo van Doorn
2009-11-25 19:47 ` John W. Linville
2009-11-25 21:29 ` Gertjan van Wingerde
2009-11-25 21:48 ` John W. Linville
2009-12-20 15:42 ` [BISECTED] " Markus Baier
2009-12-20 20:20 ` Gertjan van Wingerde
2009-12-21 0:45 ` Markus Baier
2009-12-21 6:33 ` Pavel Roskin
2009-12-21 16:26 ` Gertjan van Wingerde
2009-12-21 19:17 ` John W. Linville
2009-12-22 0:22 ` Gertjan van Wingerde
2009-12-22 5:25 ` Pavel Roskin [this message]
2009-12-22 8:13 ` Gertjan van Wingerde
2009-12-22 10:55 ` Markus Baier
2009-12-22 14:18 ` Gertjan van Wingerde
2009-12-22 15:03 ` Pavel Roskin
2009-11-23 23:22 ` [PATCH v2 7/8] mac80211: Add define for TX headroom reserved by mac80211 itself Johannes Berg
2009-11-24 17:13 ` [PATCH v2 6/8] rt2x00: Centralize setting of extra TX headroom requested by rt2x00 Ivo van Doorn
2009-11-24 17:13 ` [PATCH v2 5/8] rt2x00: Whitespace cleanup Ivo van Doorn
2009-11-23 22:18 ` [rt2x00-users] [PATCH v2 1/8] rt2x00: Only initialize HT on rt2800 devices that support it David Ellingsworth
2009-11-24 17:12 ` 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=1261459549.31982.2.camel@ct \
--to=proski@gnu.org \
--cc=Markus_Baier@web.de \
--cc=gwingerde@gmail.com \
--cc=linux-wireless@vger.kernel.org \
/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).