linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "voncken" <cedric.voncken@acksys.fr>
To: <johannes@sipsolutions.net>
Cc: <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH V2] vlan priority handling in WMM
Date: Mon, 1 Jul 2013 09:25:18 +0200	[thread overview]
Message-ID: <070e01ce762c$24fa5ff0$6eef1fd0$@acksys.fr> (raw)
In-Reply-To: <1372319520-29087-1-git-send-email-cedric.voncken@acksys.fr>

Any comments on this patch ? 

Cedric


-----Message d'origine-----
De : linux-wireless-owner@vger.kernel.org
[mailto:linux-wireless-owner@vger.kernel.org] De la part de
cedric.voncken@acksys.fr
Envoyé : jeudi 27 juin 2013 09:52
À : johannes@sipsolutions.net
Cc : linux-wireless@vger.kernel.org; cedric voncken
Objet : [PATCH V2] vlan priority handling in WMM

From: cedric voncken <cedric.voncken@acksys.fr>

If the VLAN tci is set in skb->vlan_tci use the priority field to determine
the WMM priority.

V2 modifications :
	Fix indentation
	Use symbolic constant
	include the header linux/if_vlan.h

Signed-off-by: cedric Voncken <cedric.voncken@acksys.fr>
---
 net/wireless/util.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/net/wireless/util.c b/net/wireless/util.c index
74458b7..13937db 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -10,6 +10,7 @@
 #include <net/cfg80211.h>
 #include <net/ip.h>
 #include <net/dsfield.h>
+#include <linux/if_vlan.h>
 #include "core.h"
 #include "rdev-ops.h"
 
@@ -685,6 +686,7 @@ EXPORT_SYMBOL(ieee80211_amsdu_to_8023s);
 unsigned int cfg80211_classify8021d(struct sk_buff *skb)  {
 	unsigned int dscp;
+	unsigned char vlan_priority;
 
 	/* skb->priority values from 256->263 are magic values to
 	 * directly indicate a specific 802.1d priority.  This is used @@
-694,6 +696,10 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb)
 	if (skb->priority >= 256 && skb->priority <= 263)
 		return skb->priority - 256;
 
+	vlan_priority = (skb->vlan_tci & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT;
+	if (vlan_priority > 0)
+		return vlan_priority;
+
 	switch (skb->protocol) {
 	case htons(ETH_P_IP):
 		dscp = ipv4_get_dsfield(ip_hdr(skb)) & 0xfc;
--
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org More majordomo info at
http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2013-07-01  7:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27  7:52 [PATCH V2] vlan priority handling in WMM cedric.voncken
2013-07-01  7:25 ` voncken [this message]
2013-07-04  7:18   ` voncken
2013-07-04  7:46     ` Johannes Berg
2013-07-04  7:59       ` voncken
2013-07-05  9:57 ` Johannes Berg
2013-07-05  9:59 ` Johannes Berg
2013-07-05 14:39   ` voncken
2013-07-08  8:51     ` Johannes Berg
2013-07-08 10:39       ` voncken
2013-07-08 12:15         ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='070e01ce762c$24fa5ff0$6eef1fd0$@acksys.fr' \
    --to=cedric.voncken@acksys.fr \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).