From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: fix endian error
Date: Fri, 08 Jan 2010 19:00:00 +0100 [thread overview]
Message-ID: <1262973600.32112.0.camel@johannes.local> (raw)
I forgot to convert the radiotap length to
CPU endian, which sparse found thankfully.
Apologies that the queue patch is requiring
so many fixups.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org
---
net/mac80211/iface.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- wireless-testing.orig/net/mac80211/iface.c 2010-01-08 18:24:05.000000000 +0100
+++ wireless-testing/net/mac80211/iface.c 2010-01-08 18:24:20.000000000 +0100
@@ -689,10 +689,10 @@ static u16 ieee80211_monitor_select_queu
return 0;
if (skb->len < 4 ||
- skb->len < rtap->it_len + 2 /* frame control */)
+ skb->len < le16_to_cpu(rtap->it_len) + 2 /* frame control */)
return 0; /* doesn't matter, frame will be dropped */
- hdr = (void *)((u8 *)skb->data + rtap->it_len);
+ hdr = (void *)((u8 *)skb->data + le16_to_cpu(rtap->it_len));
if (!ieee80211_is_data(hdr->frame_control)) {
skb->priority = 7;
reply other threads:[~2010-01-08 18:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1262973600.32112.0.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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