summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-01-08 19:00:00 +0100
committerJohn W. Linville <linville@tuxdriver.com>2010-01-08 15:49:29 -0500
commitb49bb574e44226b332c28439999d196ddec2f643 (patch)
tree39343a3c05998f27408af743c99d1f1795d28595 /net
parentd79074488083ec0d7ecd15352192dc1631f25643 (diff)
mac80211: fix endian error
I forgot to convert the radiotap length to CPU endian, which sparse found thankfully. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/iface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 44188ef80a63..d62ec0803bec 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -675,10 +675,10 @@ static u16 ieee80211_monitor_select_queue(struct net_device *dev,
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;