mac80211: fix some monitor mode queue selection bugs
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 590-endian_fix.patch
1 --- a/net/mac80211/iface.c
2 +++ b/net/mac80211/iface.c
3 @@ -690,10 +690,10 @@ static u16 ieee80211_monitor_select_queu
4 return 0;
5
6 if (skb->len < 4 ||
7 - skb->len < rtap->it_len + 2 /* frame control */)
8 + skb->len < le16_to_cpu(rtap->it_len) + 2 /* frame control */)
9 return 0; /* doesn't matter, frame will be dropped */
10
11 - hdr = (void *)((u8 *)skb->data + rtap->it_len);
12 + hdr = (void *)((u8 *)skb->data + le16_to_cpu(rtap->it_len));
13
14 if (!ieee80211_is_data(hdr->frame_control)) {
15 skb->priority = 7;