From patchwork Mon Jul 1 07:25:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: voncken X-Patchwork-Id: 2805731 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AE8619F3C3 for ; Mon, 1 Jul 2013 07:25:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A6A8020138 for ; Mon, 1 Jul 2013 07:25:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9160120136 for ; Mon, 1 Jul 2013 07:25:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752765Ab3GAHZZ (ORCPT ); Mon, 1 Jul 2013 03:25:25 -0400 Received: from smtp06.msg.oleane.net ([62.161.4.6]:53756 "EHLO smtp06.msg.oleane.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752680Ab3GAHZY convert rfc822-to-8bit (ORCPT ); Mon, 1 Jul 2013 03:25:24 -0400 Received: from RD8 ([195.6.104.67]) by smtp06.msg.oleane.net (MTA) with ESMTP id r617PI7r011007; Mon, 1 Jul 2013 09:25:20 +0200 X-Oleane-Rep: REPA From: "voncken" To: Cc: References: <1372319520-29087-1-git-send-email-cedric.voncken@acksys.fr> In-Reply-To: <1372319520-29087-1-git-send-email-cedric.voncken@acksys.fr> Subject: RE: [PATCH V2] vlan priority handling in WMM Date: Mon, 1 Jul 2013 09:25:18 +0200 Message-ID: <070e01ce762c$24fa5ff0$6eef1fd0$@acksys.fr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQEiF93CkRGnxxVTGdJzqI5ANXilNpqoJlGw Content-Language: fr X-PMX-Spam: Probability=8% X-PFSI-Info: PMX 5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.7.1.71219 (no antivirus check) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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 --- net/wireless/util.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) 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 -- 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 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 #include #include +#include #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)