linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cedric VONCKEN <cedric.voncken@acksys.fr>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: WMM doesn't work for VLAN frame
Date: Tue, 16 Mar 2021 15:15:48 +0000	[thread overview]
Message-ID: <PR3PR01MB67144B33C65712847FFB558D906B9@PR3PR01MB6714.eurprd01.prod.exchangelabs.com> (raw)

	Hi all,

	I have an issue with vlan frames and WMM management.
	I use an AP and a STA. The AP have a basic setings (wifi is bridged with lan interface).
	On the sta, I add a 802.1q device on wlan interface (vconfig add wlan0 7) and this interface is routed with the LAN. The settings works correctly I can ping the computer connected to the AP from a computer connect to the sta.

	On the computer connected to the sta I launch iperf with the parameter -S0xc0, with wireshark I checked the frame on the air, and the WMM priority is set to Best effort.
	I added some printk in my kernel, and the call order is
	[   64.134443] __dev_queue_xmit called
	[   64.137935] validate_xmit_vlan called
	[   64.144290] ieee80211_subif_start_xmit: called 
	[   64.151343] cfg80211_classify8021d: called 

	Explantation of the issue
		1. The validate_xmit_vlan function add the the vlan tag in the skb frame, set skb->protocol to VLAN protocol (0x8100) and set skb->vlan_tci to 0.
		2. The cfg80211_classify8021d use these fields to determine the frame priority, but the skb->protocol value (0x8100) is not handled byt this function and this function return a default value 0.

	I found this issue with the backport 5.4-rc8-1 from openwrt and the kernel 4.9

	With an older backport (2017-11-01) and the same kernel version the call order is differant
		[  536.195431] __dev_queue_xmit called
		[  536.198922] cfg80211_classify8021d called
		[  536.205799] validate_xmit_vlan called

	With this order the cfg80211_classify8021d work correctly and my traffic use the correct WMM class.

	Do you have any idea to fix this issue?
Regards

Cedric Voncken

             reply	other threads:[~2021-03-16 15:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 15:15 Cedric VONCKEN [this message]
2021-03-18 17:06 ` WMM doesn't work for VLAN frame 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=PR3PR01MB67144B33C65712847FFB558D906B9@PR3PR01MB6714.eurprd01.prod.exchangelabs.com \
    --to=cedric.voncken@acksys.fr \
    --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).