Commit ebec37ed21a220b824f9ac8f467c81d0955b01ce

Authored by Johannes Berg
Committed by Greg Kroah-Hartman
1 parent 9da59d2e28

mac80211: TDLS: fix skb queue/priority assignment

[ Upstream commit cb59bc14e830028d2244861216df038165d7625d ]

If the TDLS setup happens over a connection to an AP that
doesn't have QoS, we nevertheless assign a non-zero TID
(skb->priority) and queue mapping, which may confuse us or
drivers later.

Fix it by just assigning the special skb->priority and then
using ieee80211_select_queue() just like other data frames
would go through.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff

... ... @@ -16,6 +16,7 @@
16 16 #include "ieee80211_i.h"
17 17 #include "driver-ops.h"
18 18 #include "rate.h"
  19 +#include "wme.h"
19 20  
20 21 /* give usermode some time for retries in setting up the TDLS session */
21 22 #define TDLS_PEER_SETUP_TIMEOUT (15 * HZ)
22 23  
23 24  
... ... @@ -1006,14 +1007,13 @@
1006 1007 switch (action_code) {
1007 1008 case WLAN_TDLS_SETUP_REQUEST:
1008 1009 case WLAN_TDLS_SETUP_RESPONSE:
1009   - skb_set_queue_mapping(skb, IEEE80211_AC_BK);
1010   - skb->priority = 2;
  1010 + skb->priority = 256 + 2;
1011 1011 break;
1012 1012 default:
1013   - skb_set_queue_mapping(skb, IEEE80211_AC_VI);
1014   - skb->priority = 5;
  1013 + skb->priority = 256 + 5;
1015 1014 break;
1016 1015 }
  1016 + skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, skb));
1017 1017  
1018 1018 /*
1019 1019 * Set the WLAN_TDLS_TEARDOWN flag to indicate a teardown in progress.