* [PATCH] wireless: vlan priority handling in WMM
@ 2013-06-25 15:31 cedric.voncken
2013-06-26 7:33 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: cedric.voncken @ 2013-06-25 15:31 UTC (permalink / raw)
To: linux-wireless; +Cc: Cedric Voncken
From: Cedric Voncken <cedric.voncken@acksys.fr>
If the VLAN priority is set in skb->vlan_tci use it to determine the WMM priority.
Signed-off-by: Cedric Voncken <cedric.voncken@acksys.fr>
---
net/wireless/util.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 74458b7..6f57ae7 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -685,6 +685,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 +695,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 >> 13) & 0x07;
+ 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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] wireless: vlan priority handling in WMM
2013-06-25 15:31 [PATCH] wireless: vlan priority handling in WMM cedric.voncken
@ 2013-06-26 7:33 ` Johannes Berg
2013-06-26 9:36 ` voncken
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2013-06-26 7:33 UTC (permalink / raw)
To: cedric.voncken; +Cc: linux-wireless
On Tue, 2013-06-25 at 17:31 +0200, cedric.voncken@acksys.fr wrote:
> From: Cedric Voncken <cedric.voncken@acksys.fr>
>
> If the VLAN priority is set in skb->vlan_tci use it to determine the WMM priority.
What's the VLAN priority? How are you even running 802.1q on top of
wifi? heh.
> @@ -694,6 +695,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 >> 13) & 0x07;
Are there no symbolic constants for this?
> + if (vlan_priority > 0)
> + return vlan_priority;
I think you got indentation a bit confused :-)
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] wireless: vlan priority handling in WMM
2013-06-26 7:33 ` Johannes Berg
@ 2013-06-26 9:36 ` voncken
0 siblings, 0 replies; 3+ messages in thread
From: voncken @ 2013-06-26 9:36 UTC (permalink / raw)
To: 'Johannes Berg'; +Cc: linux-wireless
>>On Tue, 2013-06-25 at 17:31 +0200, cedric.voncken@acksys.fr wrote:
>> From: Cedric Voncken <cedric.voncken@acksys.fr>
>>
>> If the VLAN priority is set in skb->vlan_tci use it to determine the WMM priority.
>What's the VLAN priority? How are you even running 802.1q on top of wifi? heh.
I used the wireless as bridge (The wireless vif client is bridged with my eth0). The VLAN tag is already present in frame when I received it from eth0. The eth0 driver set the skb->vlan_tci.
>> @@ -694,6 +695,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 >> 13) & 0x07;
>Are there no symbolic constants for this?
Fix in V2
>> + if (vlan_priority > 0)
>> + return vlan_priority;
>I think you got indentation a bit confused :-)
Sorry, it will fix in V2.
Cedric
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-26 9:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-25 15:31 [PATCH] wireless: vlan priority handling in WMM cedric.voncken
2013-06-26 7:33 ` Johannes Berg
2013-06-26 9:36 ` voncken
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).