aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/util.c
diff options
context:
space:
mode:
authorDave Täht <dave.taht@bufferbloat.net>2011-12-22 15:55:08 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-04 14:30:43 -0500
commitb156579b1404871d97d2713c1f93c9526618e3ba (patch)
treec2665f99df8088555b3126c0d2f51c8fa02e303f /net/wireless/util.c
parent288e0713f469c03dbc412153b5341d6dfc2c9907 (diff)
wireless: Treat IPv6 diffserv the same as IPv4 for 802.11e
Wireless will select a different hardware queue based on the top 3 bits of the diffserv field, for ipv4. Extend that queue selection mechanism to ipv6, and make the calls orthogonal. Signed-off-by: Dave Täht <dave.taht@bufferbloat.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r--net/wireless/util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index e77df7585004..9aa9db6c8141 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -9,6 +9,7 @@
9#include <linux/slab.h> 9#include <linux/slab.h>
10#include <net/cfg80211.h> 10#include <net/cfg80211.h>
11#include <net/ip.h> 11#include <net/ip.h>
12#include <net/dsfield.h>
12#include "core.h" 13#include "core.h"
13 14
14struct ieee80211_rate * 15struct ieee80211_rate *
@@ -650,7 +651,10 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb)
650 651
651 switch (skb->protocol) { 652 switch (skb->protocol) {
652 case htons(ETH_P_IP): 653 case htons(ETH_P_IP):
653 dscp = ip_hdr(skb)->tos & 0xfc; 654 dscp = ipv4_get_dsfield(ip_hdr(skb)) & 0xfc;
655 break;
656 case htons(ETH_P_IPV6):
657 dscp = ipv6_get_dsfield(ipv6_hdr(skb)) & 0xfc;
654 break; 658 break;
655 default: 659 default:
656 return 0; 660 return 0;