diff options
-rw-r--r-- | net/wireless/util.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index e77df75..9aa9db6 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -9,6 +9,7 @@ #include <linux/slab.h> #include <net/cfg80211.h> #include <net/ip.h> +#include <net/dsfield.h> #include "core.h" struct ieee80211_rate * @@ -650,7 +651,10 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb) switch (skb->protocol) { case htons(ETH_P_IP): - dscp = ip_hdr(skb)->tos & 0xfc; + dscp = ipv4_get_dsfield(ip_hdr(skb)) & 0xfc; + break; + case htons(ETH_P_IPV6): + dscp = ipv6_get_dsfield(ipv6_hdr(skb)) & 0xfc; break; default: return 0; |