Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79484
b: refs/heads/master
c: a8bdf29
h: refs/heads/master
v: v3
  • Loading branch information
Guy Cohen authored and David S. Miller committed Jan 28, 2008
1 parent 1662fdd commit 9f66ecf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 69a73829dbb10e7c8554e66a80cb4fde57347fff
refs/heads/master: a8bdf29c6cd117644d27677962fe832b33036c77
9 changes: 5 additions & 4 deletions trunk/net/mac80211/wme.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ struct ieee80211_sched_data
struct sk_buff_head requeued[TC_80211_MAX_QUEUES];
};

static const char llc_ip_hdr[8] = {0xAA, 0xAA, 0x3, 0, 0, 0, 0x08, 0};

/* given a data frame determine the 802.1p/1d tag to use */
static inline unsigned classify_1d(struct sk_buff *skb, struct Qdisc *qd)
Expand All @@ -54,12 +55,12 @@ static inline unsigned classify_1d(struct sk_buff *skb, struct Qdisc *qd)
return skb->priority - 256;

/* check there is a valid IP header present */
offset = ieee80211_get_hdrlen_from_skb(skb) + 8 /* LLC + proto */;
if (skb->protocol != htons(ETH_P_IP) ||
skb->len < offset + sizeof(*ip))
offset = ieee80211_get_hdrlen_from_skb(skb);
if (skb->len < offset + sizeof(llc_ip_hdr) + sizeof(*ip) ||
memcmp(skb->data + offset, llc_ip_hdr, sizeof(llc_ip_hdr)))
return 0;

ip = (struct iphdr *) (skb->data + offset);
ip = (struct iphdr *) (skb->data + offset + sizeof(llc_ip_hdr));

dscp = ip->tos & 0xfc;
if (dscp & 0x1c)
Expand Down

0 comments on commit 9f66ecf

Please sign in to comment.